Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Created Unassigned: PropertyGrid: Expand PropertyItem on load [21863]

$
0
0
I have a wpf application with PropertyGrid.

When I load PropertyGrid, I want to expand all the propertyitems by default.
In version 2.0, this behavior was there.
In version 2.4, all the property items are collapsed.

I tried expanding it through code, but its not working

```
public void ExpandPropertyGrid()
{
if (customerPropertyGrid.Properties == null)
return;

foreach (var property in customerPropertyGrid.Properties)
{
if ((property as PropertyItem).IsExpandable)
{
(property as PropertyItem).IsExpanded = true;
ExpandProperty((property as PropertyItem));
}
}
}

public void ExpandProperty(PropertyItem property)
{
if (property.Properties == null)
return;

foreach (var element in property.Properties)
{
(element as PropertyItem).IsExpanded = true;
ExpandProperty((element as PropertyItem));
}
}
}
```

Let me know how to expand all items.

Regards,
Sharda.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>