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"
|
2025-05-29 08:58:58 +08:00
|
|
|
xmlns:local="clr-namespace:PMSWPF.Views"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
|
2025-06-25 22:33:57 +08:00
|
|
|
xmlns:mo="clr-namespace:PMSWPF.Models"
|
2025-06-14 19:34:12 +08:00
|
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
2025-06-20 18:53:29 +08:00
|
|
|
Title="设备管理系统"
|
2025-06-23 15:15:10 +08:00
|
|
|
Width="1080"
|
|
|
|
|
Height="800"
|
2025-06-25 22:33:57 +08:00
|
|
|
Loaded="MainView_OnLoaded"
|
2025-06-10 20:55:39 +08:00
|
|
|
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-25 22:33:57 +08:00
|
|
|
<Window.Resources>
|
|
|
|
|
<DataTemplate x:Key="NavigationViewMenuItem" DataType="{x:Type mo:MenuBean}">
|
|
|
|
|
<ui:NavigationViewItem Content="{Binding Name}" MenuItemsSource="{Binding Items }">
|
|
|
|
|
<ui:NavigationViewItem.Icon>
|
|
|
|
|
<ui:FontIcon Glyph="{Binding Icon}" />
|
|
|
|
|
</ui:NavigationViewItem.Icon>
|
|
|
|
|
</ui:NavigationViewItem>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</Window.Resources>
|
2025-06-10 20:55:39 +08:00
|
|
|
<Grid>
|
2025-06-23 17:01:06 +08:00
|
|
|
<ui:NavigationView
|
|
|
|
|
|
|
|
|
|
ExpandedModeThresholdWidth="500"
|
|
|
|
|
IsTabStop="False"
|
|
|
|
|
PaneDisplayMode="Left"
|
|
|
|
|
PaneTitle="设备管理系统"
|
|
|
|
|
IsSettingsVisible="False"
|
|
|
|
|
AlwaysShowHeader="True"
|
|
|
|
|
IsBackButtonVisible="Collapsed"
|
|
|
|
|
IsBackEnabled="False"
|
|
|
|
|
SelectionFollowsFocus="Disabled"
|
2025-06-25 22:33:57 +08:00
|
|
|
MenuItemsSource="{Binding Menus}"
|
|
|
|
|
MenuItemTemplate="{StaticResource NavigationViewMenuItem}"
|
|
|
|
|
ItemInvoked="NavigationView_OnItemInvoked"
|
|
|
|
|
>
|
2025-05-29 08:58:58 +08:00
|
|
|
|
2025-06-25 22:33:57 +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> -->
|
|
|
|
|
<!-- <ui:NavigationViewItem Tag="Setting" 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> -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- </ui:NavigationView.MenuItems> -->
|
2025-06-10 20:55:39 +08:00
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
2025-06-14 19:34:12 +08:00
|
|
|
<Grid>
|
2025-06-23 17:01:06 +08:00
|
|
|
|
2025-06-14 19:34:12 +08:00
|
|
|
<ContentControl Content="{Binding CurrentViewModel}">
|
|
|
|
|
<ContentControl.Resources>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:HomeViewModel}">
|
2025-06-23 17:01:06 +08:00
|
|
|
<local:HomeView />
|
2025-06-14 19:34:12 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:DevicesViewModel}">
|
2025-06-23 17:01:06 +08:00
|
|
|
<local:DevicesView />
|
2025-06-14 19:34:12 +08:00
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate DataType="{x:Type vm:DataTransformViewModel}">
|
2025-06-23 17:01:06 +08:00
|
|
|
<local:DataTransformView />
|
2025-06-14 19:34:12 +08:00
|
|
|
</DataTemplate>
|
2025-06-23 13:42:02 +08:00
|
|
|
<DataTemplate DataType="{x:Type vm:SettingViewModel}">
|
2025-06-23 17:01:06 +08:00
|
|
|
<local:SettingView />
|
2025-06-23 13:42:02 +08:00
|
|
|
</DataTemplate>
|
2025-06-14 19:34:12 +08:00
|
|
|
</ContentControl.Resources>
|
|
|
|
|
</ContentControl>
|
2025-06-23 17:01:06 +08:00
|
|
|
|
2025-06-14 19:34:12 +08:00
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
2025-06-23 17:01:06 +08:00
|
|
|
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10" />
|
2025-06-14 19:34:12 +08:00
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
2025-06-23 17:01:06 +08:00
|
|
|
|
2025-06-10 20:55:39 +08:00
|
|
|
</ui:NavigationView>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|