Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is not enough information to know the exact problem, but there are a few things to check when this sort of things happen.</p> <ol> <li><p>Check your <code>Output</code> window in Visual Studio. This will give you any binding errors. This will help solve some of the following problems:</p> <ul> <li><p>Not having your property set to <code>public</code></p></li> <li><p>Typo with your property name</p></li> <li><p>Not having the <code>DataContext</code> set</p></li> </ul></li> <li><p>Make sure your <code>DataContext</code> implements the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx" rel="nofollow"><code>INotifyPropertyChanged</code></a> interface. This is required by the implementation of <code>WPF</code> to update the binding. You would do this like the following:</p> <pre><code>public class YourDataContext : INotifyPropertyChanged { private object _myvalue; public object myvalue { get { return _myvalue; } set { if (_myvalue == value) return; _myvalue = value; OnPropertyChanged("myvalue"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } } </code></pre> <p>You can also look up several strategies to simplify this, like INotifyPropertyChanged weaving or a <code>BaseViewModel</code> class.</p></li> </ol> <h2>Edit</h2> <p>If <code>myvalue</code> is in your <code>ViewModel</code> that inherits from your <code>ViewModelBase</code> then all you need to do is change the implementation of your property to:</p> <pre><code>public string myValue { get { return _settings.myValue; } set { if (_settings.myValue == value) return; _settings.myValue = value; RaiseChangeNotification("myValue"); } } </code></pre>
    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. VO
      singulars
      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