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.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
7e8fd94c47
  1. 11
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/PropertyGrid/Implementation/PropertyGrid.cs

11
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