WinRoleAddOrEdit.xaml
3.27 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
<base:BaseWindow
x:Class="HHECS.View.UserOperation.WinRoleAddOrEdit"
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:HHECS.View.UserOperation"
xmlns:base ="clr-namespace:HHECS.View.Win"
xmlns:model="clr-namespace:HHECS.Model;assembly=HHECS.Model"
mc:Ignorable="d"
Title="RoleAddOrEdit" Height="403.819" Width="474.583" Closing="Window_Closing">
<Grid x:Name="GridMain">
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
</Grid.RowDefinitions>
<Button x:Name="BtnSave" Click="BtnSave_Click" Content="保存" HorizontalAlignment="Left" Margin="272,20.6,0,0" Grid.Row="3" VerticalAlignment="Top" Width="75"/>
<Button x:Name="BtnCancel" Click="BtnCancel_Click" Content="取消" HorizontalAlignment="Left" Margin="372,20.6,0,0" Grid.Row="3" VerticalAlignment="Top" Width="75"/>
<TextBlock HorizontalAlignment="Left" Margin="29,23,0,0" TextWrapping="Wrap" Text="角色名:" VerticalAlignment="Top"/>
<TextBox x:Name="TxtName" Text="{Binding RoleName}" HorizontalAlignment="Left" Height="23" Margin="82,22,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
<TextBlock HorizontalAlignment="Left" Margin="41,17.4,0,0" Grid.Row="1" TextWrapping="Wrap" Text="备注:" VerticalAlignment="Top" RenderTransformOrigin="1.289,0.834"/>
<TextBox x:Name="TxtRemark" Text="{Binding Remark}" HorizontalAlignment="Left" Height="23" Margin="82,9.4,0,0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
<TreeView x:Name="treeMain" Grid.Row="2" TreeViewItem.Selected="treeMain_Selected" >
<TreeView.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type model:MenuOperation}" ItemsSource="{Binding Path=Children}">
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding HasPerm,Mode=TwoWay}" Tag="{Binding Id}" Click="CheckBox_Click"></CheckBox>
<Image VerticalAlignment="Center" Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,2,2"></Image>
<TextBlock VerticalAlignment="Center" Text="{Binding MenuName}"></TextBlock>
<Image VerticalAlignment="Center" Source="{Binding EditIcon}" Margin="2,0,0,0"></Image>
<StackPanel.ToolTip>
<TextBlock VerticalAlignment="Center" Text="{Binding Remark}" TextWrapping="Wrap" MaxWidth="200" ></TextBlock>
</StackPanel.ToolTip>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<Button x:Name="BtnUpdate" Click="BtnUpdate_Click" Content="刷新" HorizontalAlignment="Left" Margin="188,20.2,0,0" Grid.Row="3" VerticalAlignment="Top" Width="75"/>
</Grid>
</base:BaseWindow>