Open salmana66 opened 2 years ago
Hi,
The PropertyGrid will display the properties of its SelectedObject. If the SelectedObject do not have a "KeepRatio" property, the PropertyGrid won't show it. Are you trying to add a PropertyItem to the PropertyGrid when the SelectedObject does not have a "KeepRatio" property ? If so, this is not the purpose of the PropertyGrid. Adding a new PropertyItem wouldn't bind it with the SelectedObject.
Thank you
Hi,
I've been using a propertyGrid and i want to add a new property to keep the height and width ratio of any selected item. Anyone please help me how i can add a new property having type checkBox (bool).
i'm trying this var propertyDefinition = new PropertyDefinition() { Category = "Layout", DisplayName = "KeepRatio", TargetProperties = new string[] { "KeepRatio" }, HasAttribute = typeof(Boolean) }; propertyGrid1.PropertyDefinitions.Add(propertyDefinition);
Really appreciate your help!