138 lines
6.0 KiB
XML
138 lines
6.0 KiB
XML
<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"
|
|
SizeChanged="Page_SizeChanged">
|
|
|
|
<Grid x:Name="gridview">
|
|
<!-- Height="{Binding ElementName=NavigationViewControl, Path=CompactPaneLength}" -->
|
|
<Grid
|
|
x:Name="AppTitleBar"
|
|
Height="48"
|
|
VerticalAlignment="Top"
|
|
Canvas.ZIndex="1"
|
|
IsHitTestVisible="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="IconColumn" Width="Auto" />
|
|
<ColumnDefinition x:Name="TitleColumn" Width="Auto" />
|
|
<ColumnDefinition
|
|
x:Name="RightDragColumn"
|
|
Width="*"
|
|
MinWidth="48" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image
|
|
x:Name="TitleIcon"
|
|
Grid.Column="0"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="0,0,6,0"
|
|
Source="/Assets/WindowIcon.ico" />
|
|
<TextBlock
|
|
x:Name="AppTitleBarText"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
TextWrapping="NoWrap" />
|
|
<AutoSuggestBox
|
|
x:Name="TitleBarSearchBox"
|
|
Grid.Column="2"
|
|
MaxWidth="600"
|
|
Margin="6,0,150,0"
|
|
VerticalAlignment="Center"
|
|
PlaceholderText="搜索模组"
|
|
QueryIcon="Find"
|
|
QuerySubmitted="TitleBarSearchBox_QuerySubmitted" />
|
|
<!--<PersonPicture
|
|
x:Name="PersonPic"
|
|
Grid.Column="6"
|
|
Height="32"
|
|
Margin="0,0,16,0" />-->
|
|
</Grid>
|
|
<NavigationView
|
|
x:Name="NavigationViewControl"
|
|
DisplayModeChanged="NavigationViewControl_DisplayModeChanged"
|
|
ExpandedModeThresholdWidth="1280"
|
|
Header="{x:Bind ((ContentControl)ViewModel.Selected).Content, Mode=OneWay}"
|
|
IsBackButtonVisible="Auto"
|
|
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"
|
|
Tag="HomePage" />
|
|
<NavigationViewItem
|
|
x:Uid="Concern"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.ConcernViewModel"
|
|
Icon="ContactInfo"
|
|
Tag="Concern" />
|
|
<NavigationViewItem
|
|
x:Uid="Ranking"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.RankingViewModel"
|
|
Icon="List"
|
|
Tag="Ranking" />
|
|
<NavigationViewItem
|
|
x:Uid="User"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.UserViewModel"
|
|
Icon="Contact2"
|
|
Tag="User" />
|
|
<NavigationViewItem
|
|
x:Uid="Module"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.ModuleViewModel"
|
|
Tag="Module">
|
|
<NavigationViewItem.Icon>
|
|
<FontIcon Glyph="" />
|
|
</NavigationViewItem.Icon>
|
|
</NavigationViewItem>
|
|
<NavigationViewItem
|
|
x:Uid="CodeTable"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.CodeTableViewModel"
|
|
Tag="CodeTable">
|
|
<NavigationViewItem.Icon>
|
|
<FontIcon Glyph="" />
|
|
</NavigationViewItem.Icon>
|
|
</NavigationViewItem>
|
|
<NavigationViewItem
|
|
x:Uid="CodeData"
|
|
helpers:NavigationHelper.NavigateTo="RustTools.ViewModels.CodeDataViewModel"
|
|
Tag="CodeTable">
|
|
<NavigationViewItem.Icon>
|
|
<FontIcon Glyph="" />
|
|
</NavigationViewItem.Icon>
|
|
</NavigationViewItem>
|
|
</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>
|