Takes a list of strings in parameter that represent the names of properties that affect the current property. It is placed over any properties of the PropertyGrid's selectedObject.
[Editor( typeof( FirstNameEditor ), typeof( FirstNameEditor ) )]
[DependsOn( "IsMale", "LastName" )]
public string FirstName { get; set; }
Here, the property "FirstName" has its own editor. If the properties "IsMale" or "LastName" are modified, the editor of property "FirstName" will be re-evaluated. This allows a user to modify the editor to change its background, ItemsSources, or create a new editor.
It is also possible to have different properties with the same "DependsOn".
[Editor( typeof( FirstNameEditor ), typeof( FirstNameEditor ) )]
[DependsOn( "IsMale" )]
public string FirstName { get; set; }
[Editor( typeof( LastNameEditor ), typeof( LastNameEditor ) )]
[DependsOn( "IsMale" )]
public string LasttName { get; set; }
Here, the editors of properties "FirstName" and "LastName" will be re-evaluated if the property "IsMale" is changed.
System.Object
System.Attribute
Xceed.Wpf.Toolkit.PropertyGrid.Attributes.DependsOnAttribute