BililiveRecorder/BililiveRecorder.WPF/Pages/RootPage.xaml

103 lines
6.5 KiB
Plaintext
Raw Normal View History

2020-11-27 18:51:02 +08:00
<UserControl
x:Class="BililiveRecorder.WPF.Pages.RootPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="http://schemas.modernwpf.com/2019"
2021-01-03 18:37:47 +08:00
xmlns:l="https://github.com/XAMLMarkupExtensions/WPFLocalizationExtension"
l:LocalizeDictionary.DesignCulture=""
l:ResxLocalizationProvider.DefaultAssembly="BililiveRecorder.WPF"
l:ResxLocalizationProvider.DefaultDictionary="Strings"
2020-11-27 18:51:02 +08:00
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
2020-11-28 13:02:57 +08:00
xmlns:wpf="clr-namespace:BililiveRecorder.WPF"
xmlns:controls="clr-namespace:BililiveRecorder.WPF.Controls"
2020-11-27 18:51:02 +08:00
xmlns:models="clr-namespace:BililiveRecorder.WPF.Models"
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="600"
d:DataContext="{d:DesignInstance Type=models:RootModel,IsDesignTimeCreatable=True}"
2020-12-03 07:01:12 +08:00
Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
2020-11-27 18:51:02 +08:00
<UserControl.Resources>
<Style x:Key="CascadeDataContextFrame" TargetType="{x:Type ui:Frame}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ui:Frame}">
<Border
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
ClipToBounds="True"
Padding="{TemplateBinding Padding}">
<Grid>
<ContentPresenter
x:Name="FirstContentPresenter"
Content="{x:Null}"
DataContext="{TemplateBinding DataContext}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<ContentPresenter
x:Name="SecondContentPresenter"
Content="{x:Null}"
DataContext="{TemplateBinding DataContext}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
2020-11-28 13:02:57 +08:00
<Grid>
2020-12-10 17:02:56 +08:00
<controls:TaskbarIconControl DataContext="{Binding}" d:IsHidden="True"/>
2020-11-28 13:02:57 +08:00
<ui:NavigationView IsBackEnabled="False" IsBackButtonVisible="Collapsed"
2020-11-27 18:51:02 +08:00
IsPaneOpen="False" OpenPaneLength="150"
IsSettingsVisible="False"
SelectionChanged="NavigationView_SelectionChanged"
>
2021-01-05 15:41:26 +08:00
<ui:NavigationView.PaneCustomContent>
<Menu>
<MenuItem>
<MenuItem.Header>
<ui:PathIcon Width="16" Height="16" Style="{StaticResource PathIconDataTranslate}"/>
</MenuItem.Header>
<MenuItem Header="简体中文" CommandParameter="" Command="{Binding Source={x:Static l:LocalizeDictionary.Instance}, Path=SetCultureCommand}" />
<MenuItem Header="繁體中文" CommandParameter="zh-Hant" Command="{Binding Source={x:Static l:LocalizeDictionary.Instance}, Path=SetCultureCommand}" />
<MenuItem Header="English" CommandParameter="en" Command="{Binding Source={x:Static l:LocalizeDictionary.Instance}, Path=SetCultureCommand}" />
<MenuItem Header="日本語" CommandParameter="ja" Command="{Binding Source={x:Static l:LocalizeDictionary.Instance}, Path=SetCultureCommand}" />
</MenuItem>
</Menu>
</ui:NavigationView.PaneCustomContent>
2020-11-28 13:02:57 +08:00
<ui:NavigationView.MenuItems>
2021-01-03 18:37:47 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_AnnouncementPage}" Tag="AnnouncementPage" IsSelected="True">
2020-12-11 19:22:04 +08:00
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataBullhornOutline}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-01-03 18:37:47 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_RoomListPage}" Tag="RoomListPage" x:Name="RoomListPageNavigationViewItem">
2020-11-28 13:02:57 +08:00
<ui:NavigationViewItem.Icon>
2020-12-10 17:02:56 +08:00
<ui:PathIcon Style="{StaticResource PathIconDataHomeOutline}"/>
2020-11-28 13:02:57 +08:00
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
</ui:NavigationView.MenuItems>
<ui:NavigationView.FooterMenuItems>
2021-01-03 18:37:47 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_AdvancedSettingsPage}" Tag="AdvancedSettingsPage" x:Name="AdvancedSettingsPageItem">
2020-11-28 13:02:57 +08:00
<ui:NavigationViewItem.Icon>
2020-12-10 17:02:56 +08:00
<ui:PathIcon Style="{StaticResource PathIconDataCogs}"/>
2020-11-28 13:02:57 +08:00
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-01-03 18:37:47 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_LogPage}" Tag="LogPage">
2020-11-28 13:02:57 +08:00
<ui:NavigationViewItem.Icon>
2020-12-10 17:02:56 +08:00
<ui:PathIcon Style="{StaticResource PathIconDataPaperRollOutline}"/>
2020-11-28 13:02:57 +08:00
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-01-03 18:37:47 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_SettingsPage}" Tag="SettingsPage" MouseRightButtonUp="NavigationViewItem_MouseRightButtonUp">
2020-11-28 13:02:57 +08:00
<ui:NavigationViewItem.Icon>
2020-12-10 17:02:56 +08:00
<ui:PathIcon Style="{StaticResource PathIconDataCogOutline}"/>
2020-11-28 13:02:57 +08:00
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
</ui:NavigationView.FooterMenuItems>
2020-12-10 17:02:56 +08:00
<ui:Frame x:Name="MainFrame" Style="{DynamicResource CascadeDataContextFrame}" Navigated="MainFrame_Navigated" />
2020-11-28 13:02:57 +08:00
</ui:NavigationView>
</Grid>
2020-11-27 18:51:02 +08:00
</UserControl>