I have a WPF / XAML form data-bound to a property in a dictionary, similar to this:
<
You can just create a class that implement INotifyPropertyChanged interface, wrap your value by this class and use it in Dictionary. I had a similar problem and did next:
class Parameter : INotifyPropertyChanged //wrapper
{
private string _Value;
public string Value //real value
{
get { return _Value; }
set { _Value = value; RaisePropertyChanged("Value"); }
}
public Parameter(string value)
{
Value = value;
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
public class ViewModel
{
public Dictionary Parameters
}
After that, if you change values in the dictionary, you will see the changes in UI.