2024-07-14 11:24:10 +00:00
|
|
|
<Page
|
|
|
|
x:Class="RustTools.Views.ShellPage"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:behaviors="using:RustTools.Behaviors"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:helpers="using:RustTools.Helpers"
|
|
|
|
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
Loaded="OnLoaded">
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<Grid
|
|
|
|
x:Name="AppTitleBar"
|
|
|
|
Height="{Binding ElementName=NavigationViewControl, Path=CompactPaneLength}"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Canvas.ZIndex="1"
|
|
|
|
IsHitTestVisible="True">
|
|
|
|
<Image
|
|
|
|
Width="16"
|
|
|
|
Height="16"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Source="/Assets/WindowIcon.ico" />
|
|
|
|
<TextBlock
|
|
|
|
x:Name="AppTitleBarText"
|
|
|
|
Margin="28,0,0,0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
|
|
TextWrapping="NoWrap" />
|
|
|
|
</Grid>
|
|
|
|
<NavigationView
|
|
|
|
x:Name="NavigationViewControl"
|
|
|
|
Canvas.ZIndex="0"
|
|
|
|
DisplayModeChanged="NavigationViewControl_DisplayModeChanged"
|
|
|
|
ExpandedModeThresholdWidth="1280"
|
|
|
|
Header="{x:Bind ((ContentControl)ViewModel.Selected).Content, Mode=OneWay}"
|
|
|
|
IsBackButtonVisible="Visible"
|
|
|
|
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
|
|
|
|
IsSettingsVisible="True"
|
|
|
|
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}">
|
|
|
|
<NavigationView.MenuItems>
|
|
|
|
|
|
|
|
|
|
|
|
<NavigationViewItem
|
|
|
|
x:Uid="HomePage"
|
|
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.HomePageViewModel"
|
|
|
|
Icon="Home" />
|
|
|
|
<NavigationViewItem
|
|
|
|
x:Uid="Concern"
|
2024-07-15 05:22:53 +00:00
|
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.ConcernViewModel"
|
2024-08-07 02:31:13 +00:00
|
|
|
Icon="ContactInfo" />
|
2024-07-14 11:24:10 +00:00
|
|
|
<NavigationViewItem
|
|
|
|
x:Uid="Ranking"
|
2024-07-15 05:22:53 +00:00
|
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.RankingViewModel"
|
2024-07-14 11:24:10 +00:00
|
|
|
Icon="List" />
|
|
|
|
<NavigationViewItem
|
|
|
|
x:Uid="User"
|
2024-07-15 05:22:53 +00:00
|
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.UserViewModel"
|
2024-07-14 11:24:10 +00:00
|
|
|
Icon="Contact2" />
|
2024-08-07 02:31:13 +00:00
|
|
|
<NavigationViewItem x:Uid="Module" helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.ModuleViewModel">
|
|
|
|
|
|
|
|
<NavigationViewItem.Icon>
|
|
|
|
<FontIcon Glyph="" />
|
|
|
|
<!-- 假设这是FolderOpen的Unicode码 -->
|
|
|
|
</NavigationViewItem.Icon>
|
|
|
|
</NavigationViewItem>
|
2024-07-14 11:24:10 +00:00
|
|
|
</NavigationView.MenuItems>
|
|
|
|
<NavigationView.HeaderTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="{Binding}" />
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</NavigationView.HeaderTemplate>
|
|
|
|
<i:Interaction.Behaviors>
|
|
|
|
<behaviors:NavigationViewHeaderBehavior DefaultHeader="{x:Bind ((ContentControl)ViewModel.Selected).Content, Mode=OneWay}">
|
|
|
|
<behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="{Binding}" />
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</behaviors:NavigationViewHeaderBehavior.DefaultHeaderTemplate>
|
|
|
|
</behaviors:NavigationViewHeaderBehavior>
|
|
|
|
</i:Interaction.Behaviors>
|
|
|
|
<Grid Margin="{StaticResource NavigationViewPageContentMargin}">
|
|
|
|
<Frame x:Name="NavigationFrame" />
|
|
|
|
</Grid>
|
|
|
|
</NavigationView>
|
|
|
|
</Grid>
|
|
|
|
</Page>
|