-
Notifications
You must be signed in to change notification settings - Fork 1
/
Window1.xaml
53 lines (50 loc) · 2.2 KB
/
Window1.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<Window x:Class="EditorsDesignTime.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EditorsDesignTime"
xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
Title="Window1"
Width="400"
Height="300">
<Window.Resources>
<DataTemplate x:Key="booleanEditor">
<dxe:CheckEdit Name="PART_Editor" />
</DataTemplate>
<DataTemplate x:Key="buttonEditor">
<dxe:ButtonEdit Name="PART_Editor" />
</DataTemplate>
<DataTemplate x:Key="comboboxEditor">
<dxe:ComboBoxEdit Name="PART_Editor">
<dxe:ComboBoxEdit.ItemsSource>
<collections:ArrayList>
<dx:Alignment>Near</dx:Alignment>
<dx:Alignment>Center</dx:Alignment>
<dx:Alignment>Far</dx:Alignment>
</collections:ArrayList>
</dxe:ComboBoxEdit.ItemsSource>
</dxe:ComboBoxEdit>
</DataTemplate>
<DataTemplate x:Key="dateEditor">
<dxe:DateEdit Name="PART_Editor" />
</DataTemplate>
<DataTemplate x:Key="textEditor">
<dxe:TextEdit Name="PART_Editor" />
</DataTemplate>
</Window.Resources>
<dxg:GridControl Name="grid">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Editor" />
<dxg:GridColumn FieldName="Value">
<dxg:GridColumn.CellTemplateSelector>
<local:EditorTemplateSelector />
</dxg:GridColumn.CellTemplateSelector>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView Name="view" AutoWidth="True" EditorButtonShowMode="ShowAlways" />
</dxg:GridControl.View>
</dxg:GridControl>
</Window>