-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComplexWindow.xaml
259 lines (259 loc) · 15.5 KB
/
ComplexWindow.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<dx:ThemedWindow
x:Class="ThemePreloadwithSplashscreen.ComplexWindow"
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: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:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:ThemePreloadwithSplashscreen"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="ComplexWindow"
Width="800"
Height="680"
mc:Ignorable="d">
<dx:ThemedWindow.Resources>
<DataTemplate x:Key="priorityCellTemplate">
<Border Background="Transparent">
<dx:DXImage
Width="16"
Height="16"
HorizontalAlignment="Center"
Source="{Binding Path=Image}" />
</Border>
</DataTemplate>
<DataTemplate x:Key="tasksDetailsTemplate">
<TextBlock
Margin="3,0"
Text="{Binding Path=Row.Description}"
TextWrapping="WrapWithOverflow" />
</DataTemplate>
</dx:ThemedWindow.Resources>
<Grid>
<dxlc:LayoutControl VerticalAlignment="Stretch" Orientation="Vertical">
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutGroup Orientation="Vertical">
<dxlc:LayoutGroup
Margin="5"
VerticalAlignment="Top"
Orientation="Horizontal">
<dxlc:LayoutGroup Orientation="Vertical">
<dxlc:LayoutItem AddColonToLabel="True" Label="First Name">
<dxe:TextEdit EditValue="{Binding Path=FirstName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Last Name">
<dxe:TextEdit EditValue="{Binding Path=LastName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Full Name">
<dxe:TextEdit EditValue="{Binding Path=FullName, Mode=OneWay}" IsReadOnly="True" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Birth Date">
<dxe:DateEdit EditValue="{Binding Path=BirthDate, Mode=TwoWay}" />
</dxlc:LayoutItem>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem AddColonToLabel="True" Label="Title">
<dxe:TextEdit EditValue="{Binding Path=Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem
HorizontalAlignment="Right"
AddColonToLabel="True"
Label="Prefix">
<dxe:ComboBoxEdit
MinWidth="75"
ApplyItemTemplateToSelectedItem="True"
EditValue="{Binding Path=Prefix, Mode=TwoWay}"
IsTextEditable="False">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EnumItemsSourceBehavior EnumType="{x:Type local:PersonPrefix}" ImageSize="16,16" />
</dxmvvm:Interaction.Behaviors>
</dxe:ComboBoxEdit>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
<dxlc:LayoutItem HorizontalAlignment="Right" VerticalAlignment="Top">
<dxe:ImageEdit Height="128" EditValue="{Binding Path=Photo, Mode=TwoWay}" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup
Margin="5"
VerticalAlignment="Top"
Orientation="Vertical">
<dxlc:LayoutItem AddColonToLabel="True" Label="Address">
<dxe:TextEdit EditValue="{Binding Path=Address.Line, Mode=TwoWay}" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="City">
<dxe:TextEdit EditValue="{Binding Path=Address.City, Mode=TwoWay}" />
</dxlc:LayoutItem>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem AddColonToLabel="True" Label="State">
<dxe:ComboBoxEdit
DisplayMember="Name"
EditValue="{Binding Path=Address.State, Mode=TwoWay}"
ItemsSource="{dxe:EnumItemsSource EnumType={x:Type local:StateEnum},
AllowImages=False}"
ValueMember="Value" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="ZIP code">
<dxe:TextEdit
EditValue="{Binding Path=Address.ZipCode, Mode=TwoWay}"
Mask="00000"
MaskType="Simple" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup
Margin="5"
VerticalAlignment="Top"
Orientation="Vertical">
<dxlc:LayoutItem AddColonToLabel="True" Label="Home Phone">
<dxe:ButtonEdit
AllowDefaultButton="False"
EditValue="{Binding Path=HomePhone, Mode=TwoWay}"
IsTextEditable="True"
Mask="(999) 000-0000"
MaskType="Simple"
MaskUseAsDisplayFormat="True">
<dxe:ImageButtonInfo Glyph="{dx:DXImage 'SvgImages/Outlook Inspired/Glyph_Phone.svg'}" />
</dxe:ButtonEdit>
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Mobile Phone">
<dxe:ButtonEdit
AllowDefaultButton="False"
EditValue="{Binding Path=MobilePhone, Mode=TwoWay, ValidatesOnDataErrors=True}"
IsTextEditable="True"
Mask="(999) 000-0000"
MaskType="Simple"
MaskUseAsDisplayFormat="True">
<dxe:ImageButtonInfo Glyph="{dx:DXImage 'SvgImages/Icon Builder/Electronics_PhoneIphone.svg'}" />
</dxe:ButtonEdit>
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Email">
<dxe:ButtonEdit
AllowDefaultButton="False"
EditValue="{Binding Path=Email, Mode=TwoWay, ValidatesOnDataErrors=True}"
IsTextEditable="True"
Mask="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}"
MaskType="RegEx"
ValidateOnTextInput="True">
<dxe:ImageButtonInfo Glyph="{dx:DXImage 'SvgImages/Outlook Inspired/Glyph_Mail.svg'}" />
</dxe:ButtonEdit>
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Skype">
<dxe:ButtonEdit
AllowDefaultButton="False"
EditValue="{Binding Path=Skype, Mode=TwoWay}"
IsTextEditable="True">
<dxe:ImageButtonInfo Glyph="{dx:DXImage 'SvgImages/HybridDemoIcons/Editors/HybridDemo_Skype.svg'}" />
</dxe:ButtonEdit>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Vertical">
<dxlc:LayoutGroup Margin="0,5" Orientation="Vertical">
<dxlc:LayoutItem AddColonToLabel="True" Label="Department">
<dxe:ComboBoxEdit
DisplayMember="Name"
EditValue="{Binding Path=Department, Mode=TwoWay}"
IsTextEditable="False"
ItemsSource="{dxe:EnumItemsSource EnumType=local:EmployeeDepartment,
AllowImages=False}"
ValueMember="Value" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Status">
<dxe:ComboBoxEdit
DisplayMember="Name"
EditValue="{Binding Path=Status, Mode=TwoWay}"
IsTextEditable="False"
ItemsSource="{dxe:EnumItemsSource EnumType=local:EmployeeStatus,
AllowImages=False}"
ValueMember="Value" />
</dxlc:LayoutItem>
<dxlc:LayoutItem AddColonToLabel="True" Label="Hire Date">
<dxe:DateEdit EditValue="{Binding Path=HireDate, Mode=TwoWay}" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutItem
Margin="0,5"
VerticalAlignment="Top"
Label="Evaluations"
LabelPosition="Top">
<dxg:GridControl Height="223" ItemsSource="{Binding Path=Evaluations}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="CreatedOn" FixedWidth="True">
<dxg:GridColumn.CellStyle>
<Style>
<Setter Property="TextBlock.FontWeight" Value="Bold" />
</Style>
</dxg:GridColumn.CellStyle>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Subject" />
<dxg:GridColumn FieldName="Manager" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView
AllowEditing="False"
AutoWidth="True"
NavigationStyle="Row"
ShowGroupPanel="False"
ShowHorizontalLines="False"
ShowIndicator="False"
ShowVerticalLines="False"
UseEvenRowBackground="True" />
</dxg:GridControl.View>
</dxg:GridControl>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
<dxlc:LayoutItem
Margin="5,0,0,0"
Label="Tasks"
LabelPosition="Top">
<dxg:GridControl Height="240" ItemsSource="{Binding Path=AssignedTasks}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Priority" FixedWidth="True">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings
HorizontalContentAlignment="Stretch"
AllowDefaultButton="False"
ApplyItemTemplateToSelectedItem="True"
IsTextEditable="False"
ItemTemplate="{StaticResource priorityCellTemplate}"
ItemsSource="{dxe:EnumItemsSource EnumType=local:EmployeeTaskPriority,
AllowImages=False}" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="DueDate" FixedWidth="True">
<dxg:GridColumn.CellStyle>
<Style>
<Setter Property="TextBlock.FontWeight" Value="Bold" />
</Style>
</dxg:GridColumn.CellStyle>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Subject" />
<dxg:GridColumn FieldName="Completion">
<dxg:GridColumn.EditSettings>
<dxe:ProgressBarEditSettings
ContentDisplayMode="Value"
DisplayFormat="p0"
IsPercent="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView
AllowEditing="False"
AutoWidth="True"
NavigationStyle="Row"
RowDetailsTemplate="{StaticResource tasksDetailsTemplate}"
RowDetailsVisibilityMode="Visible"
ShowGroupPanel="False"
ShowIndicator="False"
ShowVerticalLines="False" />
</dxg:GridControl.View>
</dxg:GridControl>
</dxlc:LayoutItem>
</dxlc:LayoutControl>
</Grid>
</dx:ThemedWindow>