120 lines
4.4 KiB
XML
120 lines
4.4 KiB
XML
<UserControl
|
|
x:Class="SamplePre.UIWpf.ConfigManager.RoleView"
|
|
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:local="clr-namespace:SamplePre.UIWpf.ConfigManager"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
Background="#e6e6e6"
|
|
mc:Ignorable="d">
|
|
|
|
<Border
|
|
Margin="5"
|
|
Background="White"
|
|
CornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Margin="10,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
FontSize="13"
|
|
Text="用户列表" />
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnAdd"
|
|
Width="100"
|
|
Height="30"
|
|
Margin="5,0"
|
|
Command="{Binding BtnAddClickCommand}"
|
|
Content="新增"
|
|
Style="{StaticResource IconTextButtonStyle}"
|
|
Tag="PackageVariantClosedPlus" />
|
|
<Button
|
|
x:Name="btnEdit"
|
|
Width="100"
|
|
Height="30"
|
|
Margin="5,0"
|
|
Command="{Binding BtnEditClickCommand}"
|
|
Content="编辑"
|
|
Style="{StaticResource IconTextButtonStyle}"
|
|
Tag="ContentSaveEditOutline" />
|
|
<Button
|
|
x:Name="btnDele"
|
|
Width="100"
|
|
Height="30"
|
|
Margin="5,0"
|
|
Command="{Binding BtnDeleClickCommand}"
|
|
Content="删除"
|
|
Style="{StaticResource IconTextButtonStyle}"
|
|
Tag="DeleteForeverOutline" />
|
|
<Button
|
|
x:Name="btnPermisson"
|
|
Width="100"
|
|
Height="30"
|
|
Margin="5,0"
|
|
Command="{Binding BtnPermissonClickCommand}"
|
|
Content="权限"
|
|
Style="{StaticResource IconTextButtonStyle}"
|
|
Tag="LayersEdit" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
|
|
<!-- 用户列表 -->
|
|
<DataGrid
|
|
x:Name="dg_roles"
|
|
Grid.Row="1"
|
|
Margin="5"
|
|
AutoGenerateColumns="False"
|
|
Background="White"
|
|
CanUserAddRows="False"
|
|
CanUserSortColumns="True"
|
|
FrozenColumnCount="1"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
ItemsSource="{Binding RolesList}"
|
|
SelectedItem="{Binding ConfigRole}"
|
|
SelectionMode="Extended"
|
|
VerticalScrollBarVisibility="Auto">
|
|
|
|
<DataGrid.Columns>
|
|
<!--<DataGridTextColumn Header="动作" Binding="{Binding action_name}" Width="*"/>-->
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding id}"
|
|
Header="ID"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding name}"
|
|
Header="角色名称"
|
|
IsReadOnly="True" />
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding description}"
|
|
Header="描述"
|
|
IsReadOnly="True" />
|
|
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
|
|
</Grid>
|
|
</Border>
|
|
|
|
|
|
</UserControl>
|