SHARE
TWEET
Untitled
a guest
Jan 29th, 2018
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public class MeasurementPoint : ModelBase
- {
- private double _value;
- public double Value
- {
- get { return _value; }
- set
- {
- _value = value;
- NotifyPropertyChanged();
- }
- }
- }
- private void RefreshDataGridTolerance()
- {
- foreach (var measurementPoint in DataSet)
- {
- //TODO: Change this into a real way to raiseproperty changed without actually changing the value
- var temp = measurementPoint.Value;
- measurementPoint.Value = temp;
- // something like this doesnt work?
- // RaisePropertyChanged(nameof(measurementPoint.Value));
- }
- }
- public class MeasurementPoint : ModelBase
- {
- //...
- public void RefreshAllProperties()
- {
- foreach(var prop in this.GetType().GetProperties())
- this.OnPropertyChanged(prop.Name);
- }
- }
- var element = DataSet.First();
- element.RefreshAllProperties();
RAW Paste Data

