187 lines
8.2 KiB
XML
187 lines
8.2 KiB
XML
<syncfusion:ChromelessWindow
|
|
x:Class="FATrace.WPLApp.Views.MainView"
|
|
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:FATrace.WPLApp"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
|
|
xmlns:syncfusionskin="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
|
|
Title="格力高原料追溯管理系统"
|
|
Width="1920"
|
|
Height="1080"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=MaterialLight}"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowState="Maximized"
|
|
WindowStyle="None"
|
|
mc:Ignorable="d" Closing="ChromelessWindow_Closing" Closed="ChromelessWindow_Closed">
|
|
<syncfusion:ChromelessWindow.Resources>
|
|
<!-- NavigationItem的容器样式 {Binding IsParent} -->
|
|
<Style x:Key="NavItemStyle" TargetType="syncfusion:NavigationItem">
|
|
<Setter Property="Header" Value="{Binding Name}" />
|
|
<Setter Property="CommandParameter" Value="{Binding CmdPar}" />
|
|
<Setter Property="FontSize" Value="18" />
|
|
<Setter Property="Command" Value="{Binding DataContext.OpenCommand, RelativeSource={RelativeSource AncestorType=syncfusion:SfNavigationDrawer}}" />
|
|
<Setter Property="ItemsSource" Value="{x:Null}" />
|
|
<Setter Property="IconTemplate">
|
|
<Setter.Value>
|
|
<!-- Text="{Binding RelativeSource={RelativeSource AncestorType=syncfusion:NavigationItem}, Path=DataContext.Icon}" 给子节点展示图标用 -->
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Margin="10,0,0,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="18"
|
|
Text="{Binding RelativeSource={RelativeSource AncestorType=syncfusion:NavigationItem}, Path=DataContext.Icon}" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsParent}" Value="True">
|
|
<Setter Property="ItemsSource" Value="{Binding ChildrenNavItemDtos}" />
|
|
<Setter Property="IsExpanded" Value="True" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
<!--<Setter Property="Icon">
|
|
<Setter.Value>
|
|
<TextBlock
|
|
Margin="10,0,0,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Text="{Binding Icon}" />
|
|
</Setter.Value>
|
|
</Setter>-->
|
|
</Style>
|
|
</syncfusion:ChromelessWindow.Resources>
|
|
<Grid Margin="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="30" />
|
|
</Grid.RowDefinitions>
|
|
<!-- 顶部区域 - 加载HeadView -->
|
|
<ContentControl
|
|
Grid.Row="0"
|
|
prism:RegionManager.RegionName="HeadRegion"
|
|
Background="Gray"
|
|
BorderBrush="#DDDDDD"
|
|
BorderThickness="0,1,0,0" />
|
|
|
|
<syncfusion:SfNavigationDrawer
|
|
x:Name="navigationDrawer"
|
|
Grid.Row="1"
|
|
prism:RegionManager.RegionName="ContentRegion"
|
|
AutoChangeDisplayMode="True"
|
|
DisplayMode="Expanded"
|
|
ExpandedModeThresholdWidth="700"
|
|
ItemContainerStyle="{StaticResource NavItemStyle}"
|
|
ItemsSource="{Binding NavigationItems}">
|
|
<syncfusion:SfNavigationDrawer.ToggleButtonContentTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="功能模块" />
|
|
</DataTemplate>
|
|
</syncfusion:SfNavigationDrawer.ToggleButtonContentTemplate>
|
|
|
|
<!-- 底部 -->
|
|
|
|
<syncfusion:SfNavigationDrawer.FooterItems>
|
|
<syncfusion:NavigationItem Header="设置">
|
|
<syncfusion:NavigationItem.Icon>
|
|
<TextBlock
|
|
Margin="10,0,0,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Foreground="Black"
|
|
Text="" />
|
|
</syncfusion:NavigationItem.Icon>
|
|
</syncfusion:NavigationItem>
|
|
|
|
</syncfusion:SfNavigationDrawer.FooterItems>
|
|
|
|
<!-- 内容 -->
|
|
<!-- 上方状态栏 - 用户登录信息 -->
|
|
<!--
|
|
<Border
|
|
Grid.Row="0"
|
|
Background="SkyBlue"
|
|
BorderBrush="#DDDDDD"
|
|
BorderThickness="0,0,0,1">
|
|
<Grid Margin="10,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
-->
|
|
<!-- 左侧系统信息 -->
|
|
<!--
|
|
<StackPanel
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Text="巧克力配料管理系统" />
|
|
<TextBlock
|
|
Margin="10,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="Gray"
|
|
Text="v1.0" />
|
|
</StackPanel>
|
|
|
|
-->
|
|
<!-- 右侧用户信息 -->
|
|
<!--
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="0,0,8,0"
|
|
VerticalAlignment="Center"
|
|
FontFamily="/Assets/Fonts/#iconfont"
|
|
FontSize="20"
|
|
Text="" />
|
|
<TextBlock
|
|
Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
Text="管理员" />
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Foreground="Green"
|
|
Text="[已登录]" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
-->
|
|
<!-- 下方内容区域 - 导航视图将显示在这里 -->
|
|
<!--
|
|
<ContentControl x:Name="navigationContent" Grid.Row="1" />
|
|
</Grid>
|
|
|
|
</syncfusion:SfNavigationDrawer.ContentView>-->
|
|
</syncfusion:SfNavigationDrawer>
|
|
|
|
<!-- 底部区域 - 加载FootView -->
|
|
<ContentControl
|
|
Grid.Row="2"
|
|
prism:RegionManager.RegionName="FootRegion"
|
|
Background="#F0F0F0"
|
|
BorderBrush="#DDDDDD"
|
|
BorderThickness="0,1,0,0" />
|
|
|
|
</Grid>
|
|
</syncfusion:ChromelessWindow>
|