143 lines
7.3 KiB
Plaintext
143 lines
7.3 KiB
Plaintext
|
<!--布局界面-->
|
||
|
<UserControl x:Class="DM_Weight.Views.HomeWindow"
|
||
|
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
|
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||
|
TextElement.FontWeight="Regular"
|
||
|
TextElement.FontSize="13"
|
||
|
TextOptions.TextFormattingMode="Ideal"
|
||
|
TextOptions.TextRenderingMode="Auto"
|
||
|
xmlns:prism="http://prismlibrary.com/"
|
||
|
FontFamily="{DynamicResource MaterialDesignFont}"
|
||
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
|
mc:Ignorable="d" Cursor="Hand">
|
||
|
<Grid>
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto"></RowDefinition>
|
||
|
<RowDefinition></RowDefinition>
|
||
|
<RowDefinition Height="Auto"></RowDefinition>
|
||
|
</Grid.RowDefinitions>
|
||
|
<Grid Background="#00bcd4">
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="Auto" />
|
||
|
<ColumnDefinition />
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<Image Grid.Column="0" Margin="30 0 30 0" HorizontalAlignment="Left" Width="Auto" Height="26" Source="/Images/logo.png" />
|
||
|
<ListBox Name="ListBoxName" Grid.Column="1" ItemsSource="{Binding PremissionDmList}" HorizontalAlignment="Right" Cursor="Hand">
|
||
|
<i:Interaction.Triggers>
|
||
|
<i:EventTrigger EventName="SelectionChanged">
|
||
|
<i:InvokeCommandAction Command="{Binding SelectionCommon}" CommandParameter="{Binding ElementName=ListBoxName}"/>
|
||
|
</i:EventTrigger>
|
||
|
</i:Interaction.Triggers>
|
||
|
<ListBox.ItemsPanel>
|
||
|
<ItemsPanelTemplate>
|
||
|
<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
|
||
|
</ItemsPanelTemplate>
|
||
|
</ListBox.ItemsPanel>
|
||
|
<ListBox.ItemTemplate>
|
||
|
<DataTemplate>
|
||
|
<StackPanel Width="64" Height="64" >
|
||
|
<Image Width="48" Height="48" Source="{ Binding PremissionImage }" />
|
||
|
<TextBlock Foreground="{DynamicResource MaterialDesignPaper}" HorizontalAlignment="Center" FontSize="15" Text="{Binding PremissionName}" />
|
||
|
</StackPanel>
|
||
|
</DataTemplate>
|
||
|
</ListBox.ItemTemplate>
|
||
|
</ListBox>
|
||
|
</Grid>
|
||
|
<Grid Grid.Row="1" Margin="8,6,8,6">
|
||
|
<Grid.RowDefinitions>
|
||
|
<RowDefinition Height="Auto"/>
|
||
|
<RowDefinition/>
|
||
|
</Grid.RowDefinitions>
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition/>
|
||
|
<ColumnDefinition/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<materialDesign:Card Grid.Row="0" Grid.ColumnSpan="2">
|
||
|
|
||
|
<ListBox ItemsSource="{Binding SelectedMenu.Children}" SelectedItem="{ Binding SelectedChildMenu }" HorizontalAlignment="left" Cursor="Hand">
|
||
|
|
||
|
<ListBox.ItemsPanel>
|
||
|
<ItemsPanelTemplate>
|
||
|
<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
|
||
|
</ItemsPanelTemplate>
|
||
|
</ListBox.ItemsPanel>
|
||
|
<ListBox.ItemTemplate>
|
||
|
<DataTemplate>
|
||
|
<Border Padding="0,0,5,0" BorderThickness="0 0 1 0" BorderBrush="#31ccec">
|
||
|
<TextBlock FontWeight="Black" FontSize="14" FontFamily="楷书" Padding="4" Text="{Binding PremissionName}" />
|
||
|
</Border>
|
||
|
</DataTemplate>
|
||
|
</ListBox.ItemTemplate>
|
||
|
</ListBox>
|
||
|
</materialDesign:Card>
|
||
|
|
||
|
<!--<materialDesign:Card Grid.Row="0" Grid.Column="1">-->
|
||
|
<!--<Button HorizontalAlignment="Right"
|
||
|
Grid.Column="1"
|
||
|
Style="{StaticResource MaterialDesignRaisedButton}"
|
||
|
materialDesign:ButtonAssist.CornerRadius="5"
|
||
|
Command="{ Binding ShiftsCommand }"
|
||
|
Background="#42a5f5"
|
||
|
BorderBrush="#42a5f5" Cursor="Hand" IsDefault="True" Content="交接班"/>-->
|
||
|
<!--</materialDesign:Card>-->
|
||
|
<materialDesign:Card Grid.Row="1" Margin="0 8 0 8" Grid.ColumnSpan="2">
|
||
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Focusable="True">
|
||
|
|
||
|
<ContentControl prism:RegionManager.RegionName="ContentRegion" />
|
||
|
</ScrollViewer>
|
||
|
</materialDesign:Card>
|
||
|
</Grid>
|
||
|
<Grid Background="#2196f3" Grid.Row="2">
|
||
|
<Grid.ColumnDefinitions>
|
||
|
<ColumnDefinition Width="70*"/>
|
||
|
<ColumnDefinition Width="70*"/>
|
||
|
<ColumnDefinition Width="270*"/>
|
||
|
</Grid.ColumnDefinitions>
|
||
|
<Menu Grid.Column="0">
|
||
|
<MenuItem
|
||
|
Foreground="White"
|
||
|
Header="{Binding UserList.Nickname}">
|
||
|
<MenuItem
|
||
|
Command="{Binding OpenFingerDialog}"
|
||
|
CommandParameter="Operator"
|
||
|
Foreground="{DynamicResource MaterialDesignLightForeground}"
|
||
|
Header="录制指纹" />
|
||
|
<MenuItem
|
||
|
Command="{Binding OpenEditPasswordDialog}"
|
||
|
CommandParameter="Operator"
|
||
|
Foreground="{DynamicResource MaterialDesignLightForeground}"
|
||
|
Header="修改密码" />
|
||
|
</MenuItem>
|
||
|
</Menu>
|
||
|
<Menu Grid.Column="1" Visibility="{Binding MultiLogin, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||
|
<MenuItem
|
||
|
Foreground="White"
|
||
|
Header="{Binding UserList2.Nickname}">
|
||
|
<MenuItem
|
||
|
Command="{Binding OpenFingerDialog}"
|
||
|
CommandParameter="Reviewer"
|
||
|
Foreground="{DynamicResource MaterialDesignLightForeground}"
|
||
|
Header="录制指纹" />
|
||
|
<MenuItem
|
||
|
Command="{Binding OpenEditPasswordDialog}"
|
||
|
CommandParameter="Reviewer"
|
||
|
Foreground="{DynamicResource MaterialDesignLightForeground}"
|
||
|
Header="修改密码" />
|
||
|
</MenuItem>
|
||
|
</Menu>
|
||
|
<Grid Grid.Column="2">
|
||
|
<StackPanel Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
|
||
|
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
|
||
|
</StackPanel>
|
||
|
</Grid>
|
||
|
|
||
|
</Grid>
|
||
|
|
||
|
|
||
|
</Grid>
|
||
|
</UserControl>
|