2025-05-29 08:58:58 +08:00
|
|
|
<Window
|
|
|
|
|
x:Class="PMSWPF.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"
|
2025-06-10 20:55:39 +08:00
|
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
|
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
2025-05-29 08:58:58 +08:00
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:local="clr-namespace:PMSWPF.Views"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
|
2025-06-14 19:34:12 +08:00
|
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
2025-05-29 08:58:58 +08:00
|
|
|
Title="MainView"
|
|
|
|
|
Width="800"
|
2025-06-10 20:55:39 +08:00
|
|
|
Height="600"
|
|
|
|
|
ui:WindowHelper.UseModernWindowStyle="True"
|
|
|
|
|
ui:WindowHelper.SystemBackdropType="Mica"
|
2025-05-29 08:58:58 +08:00
|
|
|
d:DataContext="{d:DesignInstance vm:MainViewModel}"
|
|
|
|
|
mc:Ignorable="d">
|
2025-06-10 20:55:39 +08:00
|
|
|
<Grid>
|
|
|
|
|
<ui:NavigationView
|
|
|
|
|
ExpandedModeThresholdWidth="500"
|
|
|
|
|
IsTabStop="False"
|
|
|
|
|
PaneDisplayMode="Left"
|
|
|
|
|
PaneTitle="设备管理系统"
|
|
|
|
|
IsSettingsVisible="False"
|
|
|
|
|
AlwaysShowHeader="True"
|
|
|
|
|
IsBackButtonVisible="Collapsed"
|
|
|
|
|
IsBackEnabled="False"
|
|
|
|
|
SelectionFollowsFocus="Disabled"
|
|
|
|
|
SelectionChanged="NavigationView_SelectionChanged">
|
2025-05-29 08:58:58 +08:00
|
|
|
|
2025-06-10 20:55:39 +08:00
|
|
|
<ui:NavigationView.MenuItems>
|
|
|
|
|
<ui:NavigationViewItem
|
|
|
|
|
Content="主页"
|
|
|
|
|
Tag="Home">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Home}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
|
|
|
|
<ui:NavigationViewItem
|
|
|
|
|
Content="设备"
|
|
|
|
|
Tag="Devices">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Devices2}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
|
|
|
|
<ui:NavigationViewItem
|
|
|
|
|
Content="数据转换"
|
|
|
|
|
Tag="DataTransform">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Switch}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
2025-06-14 19:34:12 +08:00
|
|
|
|
2025-06-10 20:55:39 +08:00
|
|
|
</ui:NavigationView.MenuItems>
|
|
|
|
|
|
|
|
|
|
<ui:NavigationView.AutoSuggestBox>
|
|
|
|
|
<ui:AutoSuggestBox AutomationProperties.Name="Search">
|
|
|
|
|
<ui:AutoSuggestBox.QueryIcon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Search}" />
|
|
|
|
|
</ui:AutoSuggestBox.QueryIcon>
|
|
|
|
|
</ui:AutoSuggestBox>
|
|
|
|
|
</ui:NavigationView.AutoSuggestBox>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ui:NavigationView.PaneFooter>
|
2025-06-10 22:13:06 +08:00
|
|
|
|
2025-06-10 20:55:39 +08:00
|
|
|
<StackPanel
|
|
|
|
|
x:Name="FooterStackPanel"
|
2025-06-10 22:13:06 +08:00
|
|
|
Margin="0"
|
2025-06-10 20:55:39 +08:00
|
|
|
Orientation="Vertical"
|
|
|
|
|
Visibility="Visible">
|
|
|
|
|
<ui:NavigationViewItem Content="设置">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
|
|
|
|
<ui:NavigationViewItem Content="关于">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Info}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</ui:NavigationView.PaneFooter>
|
2025-06-14 19:34:12 +08:00
|
|
|
<Grid>
|
|
|
|
|
|
|
|
|
|
<ContentControl Content="{Binding CurrentViewModel}">
|
|
|
|
|
<ContentControl.Resources>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:HomeViewModel}">
|
|
|
|
|
<local:HomeView/>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:DevicesViewModel}">
|
|
|
|
|
<local:DevicesView/>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:DataTransformViewModel}">
|
|
|
|
|
<local:DataTransformView/>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ContentControl.Resources>
|
|
|
|
|
</ContentControl>
|
|
|
|
|
|
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
|
|
|
|
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2025-06-10 20:55:39 +08:00
|
|
|
</ui:NavigationView>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|