Browse Source

PropertyGrid: added Update() method which will allow you to update all property values in the PropertyGrid with the data from the SelectedObject. This is helpful when your SelectedObject does not implement the INotifyPropertyChanged interface.

import/raw
brianlagunas_cp 15 years ago
parent
commit
e64f54a73a
  1. 11
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

11
Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

@ -489,6 +489,17 @@ namespace Microsoft.Windows.Controls.PropertyGrid
Properties = null;
}
/// <summary>
/// Updates all property values in the PropertyGrid with the data from the SelectedObject
/// </summary>
public void Update()
{
foreach (var item in Properties)
{
BindingOperations.GetBindingExpressionBase(item, PropertyItem.ValueProperty).UpdateTarget();
}
}
#endregion //Methods
}
}

Loading…
Cancel
Save