Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a bad answer, but I'm including it here to contribute to understanding of the question.</p> <p>It would seem that the answer would be "YES" you must implement INotifyPropertyChanged in your model for controls to get notified of their change (thus allow controls to update when they are changed).</p> <p>But if the above is true why can a TextBox databound to a entity cause changes in other controls.</p> <p>Try it! For example you can bind a TextBox's Text property to the SelectedItem of a DataGrid (which is bound to a ObservableCollection from a .Local) with UpdateSourceTrigger=PropertyChanged. Now run and select a row in the DataGrid and edit the TextBox and the text in the DataGrid row will update realtime! How does the text box force that change in the DataGrid!?!?!</p> <p>Here is the binding code of the above example:</p> <pre><code>&lt;TextBox Text="{Binding Path=SelectedItem.Name, UpdateSourceTrigger=PropertyChanged}" /&gt; </code></pre> <p>This works with a TextBox not just on the same View, but even if the entity is gathered from SelectedItem and passed in to a second view which then has a TextBox that binds to the entity. (Manages to update the first window's DataGrid realtime!)</p> <p>This is super cool! Now I wish I could find a way to in code SelectedItem.Name = "New Name", because no matter what I try that will not update the DataGrid. (I can't refresh the DataGrid directly because I'm using MVVM and have no access to it)</p> <p>Note: I'm using EF4.1 with DBContext &amp; POCO entities (ie. simple classes that do not implement any interfaces)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload