228 lines
12 KiB
XML
228 lines
12 KiB
XML
<Window x:Class="BaseFrame.Views.ShellView"
|
|
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"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
WindowStartupLocation="CenterScreen"
|
|
Topmost="false"
|
|
mc:Ignorable="d"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
WindowStyle="None"
|
|
Title="ShellView"
|
|
d:DesignHeight="1080"
|
|
d:DesignWidth="1920">
|
|
|
|
|
|
<materialDesign:DrawerHost x:Name="MainDrawerHost"
|
|
IsLeftDrawerOpen="{Binding IsLeftDrawerOpen, Mode=TwoWay}">
|
|
|
|
<!-- ✅ 左侧抽屉内容 -->
|
|
<materialDesign:DrawerHost.LeftDrawerContent>
|
|
<StackPanel Width="220"
|
|
Background="{DynamicResource MaterialDesignPaper}">
|
|
<TextBlock Text="导航菜单"
|
|
FontSize="18"
|
|
Margin="16"
|
|
Foreground="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Separator Margin="0,0,0,8" />
|
|
<Button Content="首页"
|
|
Style="{StaticResource MaterialDesignFlatButton}"
|
|
Margin="8" />
|
|
<Button Content="系统设置"
|
|
Style="{StaticResource MaterialDesignFlatButton}"
|
|
Margin="8" />
|
|
<Button Content="数据管理"
|
|
Style="{StaticResource MaterialDesignFlatButton}"
|
|
Margin="8" />
|
|
<Button Content="更新信息"
|
|
Style="{StaticResource MaterialDesignFlatButton}"
|
|
Margin="8" />
|
|
<Button Content="关于"
|
|
Style="{StaticResource MaterialDesignFlatButton}"
|
|
Margin="8" />
|
|
</StackPanel>
|
|
</materialDesign:DrawerHost.LeftDrawerContent>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<!-- 顶部工具栏 -->
|
|
<materialDesign:ColorZone Mode="PrimaryMid">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Menu Grid.Column="0"
|
|
Background="Transparent"
|
|
Foreground="White"
|
|
VerticalAlignment="Center">
|
|
<!-- 文件菜单 -->
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="菜单"
|
|
Foreground="White"
|
|
Command="{Binding DataContext.LeftDrawerOpenCommand, RelativeSource={RelativeSource AncestorType=Window}}">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Menu"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Header="文件"
|
|
FontSize="13"
|
|
Height="50"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="File"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
<MenuItem Header="新建"
|
|
Foreground="Black" />
|
|
<MenuItem Header="打开"
|
|
Foreground="Black" />
|
|
<MenuItem Header="保存"
|
|
Foreground="Black" />
|
|
<MenuItem Header="另存为"
|
|
Foreground="Black" />
|
|
<MenuItem Header="设置默认程序"
|
|
Foreground="Black" />
|
|
</MenuItem>
|
|
|
|
<!-- 工具菜单 -->
|
|
<MenuItem Header="工具"
|
|
FontSize="13"
|
|
Height="50"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Tools"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
<MenuItem Header="系统设置"
|
|
Foreground="Black" />
|
|
<MenuItem Header="数据"
|
|
Foreground="Black">
|
|
<MenuItem Header="数据查询"
|
|
Foreground="Black" />
|
|
</MenuItem>
|
|
<MenuItem Header="同星CAN"
|
|
Foreground="Black">
|
|
<MenuItem Header="连接/断开"
|
|
Foreground="Black" />
|
|
<MenuItem Header="通道映射"
|
|
Foreground="Black" />
|
|
<MenuItem Header="加载数据库"
|
|
Foreground="Black" />
|
|
</MenuItem>
|
|
<MenuItem Header="调试"
|
|
Foreground="Black">
|
|
<MenuItem Header="自动运行"
|
|
Foreground="Black" />
|
|
<MenuItem Header="清空数据库"
|
|
Foreground="Black" />
|
|
</MenuItem>
|
|
</MenuItem>
|
|
|
|
<!-- 程序运行控制 -->
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="运行"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Play"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="单步执行"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="ArrowRight"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="停止"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Stop"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="复位"
|
|
Foreground="White">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Restart"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<Menu Grid.Column="2"
|
|
Margin="0 0 20 0">
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="最小化"
|
|
Foreground="White"
|
|
Command="{Binding MinimizeCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Minimize"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="最大化"
|
|
Foreground="White"
|
|
Command="{Binding MaximizeCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Maximize"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem FontSize="13"
|
|
Height="50"
|
|
Header="关闭"
|
|
Foreground="White"
|
|
Command="{Binding CloseCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}">
|
|
<MenuItem.Icon>
|
|
<materialDesign:PackIcon Kind="Close"
|
|
Foreground="White" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
</Grid>
|
|
<!-- 左侧菜单 -->
|
|
|
|
|
|
|
|
</materialDesign:ColorZone>
|
|
|
|
<materialDesign:DialogHost Grid.Row="1" x:Name="DialogHost"
|
|
DialogBackground="Transparent"
|
|
Background="Transparent"
|
|
Identifier="Root">
|
|
<!-- 主内容区 -->
|
|
<Grid >
|
|
<ContentControl prism:RegionManager.RegionName="ShellViewManager" />
|
|
</Grid>
|
|
</materialDesign:DialogHost>
|
|
</Grid>
|
|
</materialDesign:DrawerHost>
|
|
|
|
</Window>
|