RoleAddOrEditView.xaml
3.58 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
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
<Window
x:Class="HHECS.RobotTool.View.AccountView.RoleAddOrEditView"
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:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:HHECS.RobotTool.View.AccountView"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:HHECS.RobotTool.ViewModel.AccountVM"
Title="新增角色"
Width="800"
Height="450"
d:DataContext="{d:DesignInstance Type=viewmodel:RoleAddOrEditVM}"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<hc:UniformSpacingPanel
Grid.Row="0"
ChildWrapping="Wrap"
Orientation="Horizontal"
Spacing="10">
<TextBox
MinWidth="260"
hc:InfoElement.Necessary="True"
hc:InfoElement.Title="角色编码"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.TitleWidth="70"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Role.Code, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
MinWidth="260"
hc:InfoElement.Necessary="True"
hc:InfoElement.Title="角色名称"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.TitleWidth="70"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Role.Name, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
MinWidth="260"
hc:InfoElement.Necessary="False"
hc:InfoElement.Title="备注"
hc:InfoElement.TitlePlacement="Left"
hc:InfoElement.TitleWidth="70"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Role.Description, UpdateSourceTrigger=PropertyChanged}" />
</hc:UniformSpacingPanel>
<GroupBox
Grid.Row="1"
Padding="5"
Header="权限"
Style="{StaticResource GroupBoxTab.Small}">
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<TreeView ItemsSource="{Binding Permissions}" Style="{StaticResource TreeView.Small}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<CheckBox Content="{Binding Name}" IsChecked="{Binding CurrentNodeIsChanged}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Border>
</GroupBox>
<hc:UniformSpacingPanel
Grid.Row="2"
HorizontalAlignment="Center"
Spacing="60">
<Button
hc:IconElement.Geometry="{StaticResource SaveGeometry}"
Command="{Binding SaveCommand}"
Content="保存"
Style="{StaticResource ButtonPrimary}" />
<Button
hc:IconElement.Geometry="{StaticResource CloseGeometry}"
Command="{Binding CancelCommand}"
Content="取消"
Style="{StaticResource ButtonDefault}" />
</hc:UniformSpacingPanel>
</Grid>
</Window>