Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4574304
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:54:17+00:00 2026-05-21T19:54:17+00:00

Sorry if the title is confusing but I don’t really know how to shorten

  • 0

Sorry if the title is confusing but I don’t really know how to shorten my question. Anyway, here it goes.

I’m using WPF, Entity Framework and MVVM.

Currently, in my ViewModel, I have a property

public Model.Document Document {get;set;} //Model.Document is an EF Entity

Then, in XAML, I bind to

<TextBox Text={Binding Path=Document.Title}/>

Title is of course a Property on the Model.

Now following question came to my mind:
To separate the Model from the View, wouldn’t it be better if I added a property to the ViewModel like so

    public string Title
    {
        get { return Document.Title; }
        set { Document.Title = value; }
    }

and then bind like this:

<TextBox Text={Binding Path=Title}/>

Which way is recommended?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:54:18+00:00Added an answer on May 21, 2026 at 7:54 pm

    If you take a look at How Data Binding References are Resolved, you can see that there can be performance issues to consider when deciding how to expose the property you are going to bind to.

    Does the Model.Document implement the INotifyPropertyChanged interface? If not, I would recommend adding a Title property to your view model and implement INotifyPropertyChanged on your view model such that when the Title is changed the PropertyChanged event is raised to notify the view.

    Another approach would be to expose the Title on your view model as a DependencyProperty as the binding and render time is faster.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the confusing title, but it basically says it all. Here's the structures
Sorry if the title is kinda confusing, and if the Android tags don't really
Sorry for the confusing title :P I'm sure I should know this but I
Sorry about the title, but I don't know how to say what I want.
sorry if the title is very confusing, but I'm not sure how to really
First of all I don't know how to phrase the question title, sorry if
Sorry if the title sounds confusing - but this is what I am trying
I'm sorry if the title is quite confusing but I am wondering if it's
sorry for the confusing title, its really hard for me to explain what i
Sorry if the question title is confusing. Let me explain further. I am building

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.