<pu:WindowX x:Class="HMI.MenuManage.RoleModal"
|
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:HMI.MenuManage"
|
xmlns:pw="https://opensource.panuon.com/wpf"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
|
mc:Ignorable="d"
|
Title="Form"
|
Width="600"
|
Height="800"
|
WindowStartupLocation="CenterOwner"
|
Style="{StaticResource ModalWindow}">
|
<Grid Margin="10">
|
<StackPanel x:Name="formPanel">
|
<pu:FormGroup x:Name="FgCode" Style="{StaticResource InputFormGroupStyle}"
|
Header="{DynamicResource HMI.Role.Code}"
|
dp:FormGroupHelper.IsRequired="True"
|
dp:FormGroupHelper.ValidateMethod="ValidateCode"
|
GroupName="MyFormGroup">
|
<TextBox x:Name="TbCode" Style="{StaticResource EditorTextBoxStyle}" />
|
</pu:FormGroup>
|
|
<pu:FormGroup x:Name="FgName" Style="{StaticResource InputFormGroupStyle}"
|
Header="{DynamicResource HMI.Role.Name}"
|
dp:FormGroupHelper.IsRequired="True" GroupName="MyFormGroup">
|
<TextBox x:Name="TbName" Style="{StaticResource EditorTextBoxStyle}" />
|
</pu:FormGroup>
|
|
<pu:FormGroup x:Name="FgMenu" Orientation="Vertical" Style="{StaticResource RequiredInputFormGroupStyle}"
|
Header="{DynamicResource HMI.Role.Permission}" GroupName="MyFormGroup">
|
<TreeView x:Name="menuTree" Grid.Column="1" Style="{StaticResource DefaultTreeView}"
|
|
MaxHeight="550"
|
ItemsSource="{Binding TreeDataSource}">
|
<TreeView.ItemTemplate>
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
<CheckBox VerticalAlignment="Center" IsChecked="{Binding Selected}"
|
Command="{Binding CheckCommand}"
|
CommandParameter="{Binding Path=IsChecked,RelativeSource={RelativeSource Mode=Self}}"/>
|
<Image Width="{StaticResource ContentFontSize}"
|
Height="{StaticResource ContentFontSize}" Margin="5" Source="{Binding MenuIcon,Converter={StaticResource path2Image},Mode=OneWay}"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding MenuName}"/>
|
</StackPanel>
|
</HierarchicalDataTemplate>
|
</TreeView.ItemTemplate>
|
</TreeView>
|
</pu:FormGroup>
|
</StackPanel>
|
</Grid>
|
</pu:WindowX>
|