-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
140 lines (138 loc) · 8.71 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<dx:ThemedWindow x:Class="WpfDashboardCustomCaptionMenu.MainWindow" Width="800" Height="450" mc:Ignorable="d" dx:ThemeManager.ThemeName="LightGray"
Title="Custom Caption Toolbar and Context Menu"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxdash="http://schemas.devexpress.com/winfx/2008/xaml/dashboard"
xmlns:dxdasht="http://schemas.devexpress.com/winfx/2008/xaml/dashboard/themekeys"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
<Grid>
<dxdash:DashboardControl x:Name="dashboardControl1" TitleAlignment="Center" TitleContent="Title Content" TitleVisibility="Visible">
<dxdash:DashboardControl.TitleContentTemplate>
<DataTemplate>
<ToggleButton Content="{Binding}" />
</DataTemplate>
</dxdash:DashboardControl.TitleContentTemplate>
<dxdash:DashboardControl.TitleCustomizationsTemplate>
<DataTemplate>
<ItemsControl>
<dxb:BarSubItem AllowGlyphTheming="True" Content="My Title Item" dxb:CollectionAction.ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardTitle_ExportToPopupMenu}">
<dxb:BarButtonItem Content="Item1" />
<dxb:BarButtonItem Content="Item2" />
<dxb:BarButtonItem Content="Item3" />
</dxb:BarSubItem>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardTitle_Toolbar}" Index="0">
<dxb:InsertAction.Element>
<dxb:BarSubItem AllowGlyphTheming="True" Content="My Title Dropdown">
<dxb:BarButtonItem Content="Item1" />
<dxb:BarButtonItem Content="Item2" />
<dxb:BarButtonItem Content="Item3" />
</dxb:BarSubItem>
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</dxdash:DashboardControl.TitleCustomizationsTemplate>
<dxdash:DashboardControl.ItemGroupStyle>
<Style TargetType="{x:Type dxdash:DashboardLayoutGroup}">
<Setter Property="CaptionCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_Toolbar}">
<dxb:InsertAction.Element>
<dxb:BarCheckItem AllowGlyphTheming="True" Content="My Check Button" />
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ContextMenuCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_ContextMenu}">
<dxb:InsertAction.Element>
<dxb:BarButtonItem AllowGlyphTheming="True" Content="My GroupItem Context Menu" />
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</dxdash:DashboardControl.ItemGroupStyle>
<dxdash:DashboardControl.DashboardItemStyle>
<Style TargetType="{x:Type dxdash:DashboardLayoutItem}">
<Setter Property="CaptionCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_Toolbar}">
<dxb:InsertAction.Element>
<dxb:BarSubItem AllowGlyphTheming="True" Content="My Caption Item">
<dxb:BarButtonItem Content="Item1" />
<dxb:BarButtonItem Content="Item2" />
<dxb:BarButtonItem Content="Item3" />
</dxb:BarSubItem>
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ContextMenuCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_ContextMenu}">
<dxb:InsertAction.Element>
<dxb:BarSubItem AllowGlyphTheming="True" Content="My Context Menu">
<dxb:BarButtonItem Content="Menu Item 1" />
<dxb:BarButtonItem Content="Menu Item 2" />
<dxb:BarButtonItem Content="Menu Item 3" />
</dxb:BarSubItem>
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</dxdash:DashboardControl.DashboardItemStyle>
<dxdash:DashboardControl.GridItemStyle>
<Style TargetType="{x:Type dxdash:GridDashboardLayoutItem}">
<Setter Property="CaptionCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_Toolbar}">
<dxb:InsertAction.Element>
<dxb:BarButtonItem AllowGlyphTheming="True" Content="My Grid Caption Item" />
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="ContextMenuCustomizationsTemplate">
<Setter.Value>
<DataTemplate>
<ItemsControl>
<dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_ContextMenu}">
<dxb:InsertAction.Element>
<dxb:BarButtonItem AllowGlyphTheming="True" Content="My Grid Context Menu" />
</dxb:InsertAction.Element>
</dxb:InsertAction>
</ItemsControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</dxdash:DashboardControl.GridItemStyle>
</dxdash:DashboardControl>
</Grid>
</dx:ThemedWindow>