Hi,
Instead of modifying the existing code for the Value binding, I've you thought about using the PropertyGrid.Properties property instead of PropertyGrid.SelectedObject property ? You could define your own CustomPropertyItems.
Since you don't seem to need the binding, this could be an option :
Instead of modifying the existing code for the Value binding, I've you thought about using the PropertyGrid.Properties property instead of PropertyGrid.SelectedObject property ? You could define your own CustomPropertyItems.
Since you don't seem to need the binding, this could be an option :
<xctk:PropertyGrid x:Name="_propertyGrid" Width="450" MaxHeight="375" Margin="10">
<xctk:PropertyGrid.CategoryGroupDescription>
<PropertyGroupDescription PropertyName="Category"/>
</xctk:PropertyGrid.CategoryGroupDescription>
</xctk:PropertyGrid>
var obj2 = new CustomPropertyItem
{
Description = "Propiedades da lista de usúarios",
DisplayName = "UsersList",
IsExpandable = true,
Category = "Componentes",
Value = "Componente 1",
Properties =
{
new CustomPropertyItem
{
Description = "Id da configuração de pesquisa de úsuario",
Category = "Propiedades",
DisplayName = "UserSearchId",
Value = 0
},
new CustomPropertyItem
{
Description = "Id da tabela de visualização de úsuarios",
Category = "Propiedades",
DisplayName = "UserTableId",
Value = 0
},
},
};
_propertyGrid.Properties.Add( obj2 );
Please note that the subItems may not have the Category added. We are aware of this and try to do a fix for it.