Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

WPF End-User Report Designer - How to hide a property in the Properties window

$
0
0
This example demonstrates how to hide the "DataSource", "DataMember", and "DataAdapter" properties in the Properties window.

First, get the Property Grid from the visual tree. I completed this by using the LayoutTreeHelper class. Then, get a property definition instance from the PropertyGridControl.PropertyDefinitions collection and set PropertyDefinitionBase.Visibility to Collapsed to hide a property.
Here are some points regarding how to get a property from the PropertyGridControl.PropertyDefinitions collection. Some properties are determined by the PropertyDefinitionBase.Path property (for instance, the "DataSource" and "PrinterName" properties). To hide them, compare the PropertyDefinitionBase.Path property value with the string value (e.g. "DataSource") to get a property object from PropertyGridControl.PropertyDefinitions.
Other properties are determined by the type. To hide them, create a brand new PropertyDefinitionBase object (set up its Path as required) and add it to the PropertyGridControl.PropertyDefinitions.

WinForms: WinForms End-User Report Designer - How to hide a property in the Properties window

Viewing all articles
Browse latest Browse all 7205

Trending Articles



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