Hi,
I am not able to make property item to hide/collapse state. Please find below code.
[Requirement:
- Property control must be populated from code-behind/dynamically using propGrid.Properties.Add(...) method.]
PropertyGridPropertyItem item = new PropertyGridPropertyItem();
item.DisplayName = "Simple Propety";
item.Category = "General Properties";
item.Visibility = Visibility.Collapsed; // or Visibility.Hidden
propGrid.Properties.Add(item as IPropertyDataAccessor);
Q - 1: When above code executed it display "Sample Property" in property control EVEN IF Visibility set to Collapsed/Hidden. What can I do?
LATER I need to set property's Visibility to "Visible" when some event occures or condition satisfied. So, I have to add it.
I am not able to make property item to hide/collapse state. Please find below code.
[Requirement:
- Property control must be populated from code-behind/dynamically using propGrid.Properties.Add(...) method.]
PropertyGridPropertyItem item = new PropertyGridPropertyItem();
item.DisplayName = "Simple Propety";
item.Category = "General Properties";
item.Visibility = Visibility.Collapsed; // or Visibility.Hidden
propGrid.Properties.Add(item as IPropertyDataAccessor);
Q - 1: When above code executed it display "Sample Property" in property control EVEN IF Visibility set to Collapsed/Hidden. What can I do?
LATER I need to set property's Visibility to "Visible" when some event occures or condition satisfied. So, I have to add it.