This project has moved. For the latest updates, please go here.

Possible Regular Expression Pattern to set specific data template to properties

May 27, 2014 at 2:02 AM
Edited May 27, 2014 at 2:03 AM
Hello, as one of Gibbo2D developers (https://github.com/Whitebeard86/Gibbo2D ; www.gibbo2d.com) and since we're using your toolkit in order to create a properties inspector, I've been wondering if it is possible override the original properties autogenerate for a given object by searching for a pattern instead of searching for a specific property name.

According to the following documentation:
http://wpftoolkit.codeplex.com/wikipage?title=PropertyGrid

We're able to search for a specific property name, and set a custom data template:
<xctk:PropertyGrid.PropertyDefinitions>
                    <xctk:PropertyDefinition Name="PropertyName" />
                    <!---->
Now, let's say that instead of wanting to set a certain custom data template to this property (PropertyName) only, I want to set it to every property starting with "Property". That way, "PropertyOne", "PropertyTwo", "PropertyName" would have the same template.

Is it possible? Something as the following:
<xctk:PropertyGrid.PropertyDefinitions>
                    <xctk:PropertyDefinition Name="Property%" />
One last thing, I believe it would be possible by using a custom class, but since the engine's users do not have access to the toolkit itself inside their scripts (solution), it would be impossible to use that class without having the right references.

Thanks
Developer
May 27, 2014 at 8:36 PM