-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.xaml
More file actions
52 lines (52 loc) · 2.48 KB
/
Test.xaml
File metadata and controls
52 lines (52 loc) · 2.48 KB
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
<Window x:Class="QLBH.Test"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:QLBH"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:uc="clr-namespace:QLBH.UserControlQ"
xmlns:rules="clr-namespace:QLBH.ValidationRules"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
DataContext="{StaticResource ObjectVM}"
WindowStyle="None"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Name="Window"
Title="Người dùng" Height="450" Width="800">
<Grid>
<ComboBox
Margin="5 5 15 -4"
materialDesign:HintAssist.Hint="Chức vụ"
IsEditable="False"
ItemsSource="{Binding List}"
SelectedItem="{Binding SelectedUserRole , Mode=TwoWay , UpdateSourceTrigger=PropertyChanged}">
<ComboBox.Text>
<Binding Path="SelectedUserRoleText" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<rules:NotEmptyRule ValidatesOnTargetUpdated="True"></rules:NotEmptyRule>
</Binding.ValidationRules>
</Binding>
</ComboBox.Text>
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding DisplayName}"/>
<Rectangle Margin="5 0 0 0" HorizontalAlignment="Center" Height="20" Width="20" >
<Rectangle.Fill>
<ImageBrush ImageSource="{Binding Image}"/>
</Rectangle.Fill>
</Rectangle>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</Window>