Gets or sets a value indicating whether the PropertyGrid will generate all properties for a given object.
'Declaration
Public Property AutoGenerateProperties As Boolean
'Usage
Dim instance As PropertyGrid
Dim value As Boolean
instance.AutoGenerateProperties = value
value = instance.AutoGenerateProperties
public bool AutoGenerateProperties {get; set;}
Property Value
true if the PropertyGrid will generate all properties for a given object; false otherwise. By default, true.
The following shows how to create a PropertyGrid that doesn't not automatically generate all the properties for a given object by setting the AutoGenerateProperties property to False and providing a collection of PropertyDefinitions of the properties you would like to show.
<xctk:PropertyGrid x:Name="_propertyGrid" Width="450" Margin="10"
AutoGenerateProperties="False">
<!-- Only the following properties will be displayed in the PropertyGrid -->
<xctk:PropertyGrid.PropertyDefinitions>
<xctk:PropertyDefinition Name="FirstName" />
<xctk:PropertyDefinition Name="FavoriteColor" />
<xctk:PropertyDefinition Name="PetNames" />
</xctk:PropertyGrid.PropertyDefinitions>
</xctk:PropertyGrid>
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2