-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
29 lines (27 loc) · 1.52 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxprg="http://schemas.devexpress.com/winfx/2008/xaml/propertygrid"
xmlns:local="clr-namespace:WpfApplication57"
x:Class="WpfApplication57.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<Window.Resources>
<DataTemplate x:Key="PropertyTemplate">
<dxprg:PropertyDefinition Path="{Binding Name}"/>
</DataTemplate>
<DataTemplate x:Key="CollectionTemplate">
<dxprg:CollectionDefinition Path="{Binding CollectionName}"/>
</DataTemplate>
<local:PropertyDefinitionTemplateSelector x:Key="PropertyDefinitionTemplateSelector"
PropertyTemplate="{StaticResource PropertyTemplate}"
CollectionTemplate="{StaticResource CollectionTemplate}"/>
</Window.Resources>
<dxprg:PropertyGridControl SelectedObject="{Binding EditObject}"
PropertyDefinitionsSource="{Binding Properties}"
PropertyDefinitionTemplateSelector="{StaticResource PropertyDefinitionTemplateSelector}"
ShowProperties="WithPropertyDefinitions"
ExpandCategoriesWhenSelectedObjectChanged="True"/>
</Window>