BililiveRecorder/BililiveRecorder.WPF/Pages/RootPage.xaml

158 lines
10 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-08-09 22:37:10 +08:00
xmlns:m="clr-namespace:BililiveRecorder.WPF.Models"
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"
2021-01-07 23:51:23 +08:00
IsSettingsVisible="False" ExpandedModeThresholdWidth="1115"
IsPaneOpen="False" OpenPaneLength="200"
SelectionChanged="NavigationView_SelectionChanged">
2021-01-05 15:41:26 +08:00
<ui:NavigationView.PaneCustomContent>
2022-04-16 01:54:43 +08:00
<StackPanel>
<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="日本語" CommandParameter="ja" 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}"/>
2022-06-11 16:34:47 +08:00
<MenuItem Header="喵ニャーMeow🐱🐈" x:Name="JokeLangSelectionMenuItem" CommandParameter="en-PN" Command="{Binding Source={x:Static l:LocalizeDictionary.Instance}, Path=SetCultureCommand}"/>
2022-04-16 01:54:43 +08:00
<Separator/>
<MenuItem Header="参与翻译" Command="{x:Static m:Commands.OpenLink}" CommandParameter="https://rec.danmuji.org/link/translate/">
<MenuItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataOpenInNew}"/>
</MenuItem.Icon>
</MenuItem>
2021-08-09 22:37:10 +08:00
</MenuItem>
2022-04-16 01:54:43 +08:00
</Menu>
<Menu>
<MenuItem Click="SwitchLightDarkTheme_Click">
<MenuItem.Header>
<ui:PathIcon Width="16" Height="16" Style="{StaticResource PathIconDataThemeLightDark}"/>
</MenuItem.Header>
</MenuItem>
</Menu>
</StackPanel>
2021-01-05 15:41:26 +08:00
</ui:NavigationView.PaneCustomContent>
2021-05-01 00:22:27 +08:00
<ui:NavigationView.PaneFooter>
<Grid Width="40" Height="40" x:Name="DebugBuildIcon" Visibility="Collapsed" HorizontalAlignment="Left">
<ui:PathIcon Width="24" Height="24" ToolTip="Debug Build 测试版"
Style="{StaticResource PathIconDataBugOutline}"/>
</Grid>
</ui:NavigationView.PaneFooter>
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-02-23 18:03:37 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_RoomListPage}" Tag="RoomListPage" IsEnabled="False" 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>
2021-05-01 23:18:22 +08:00
<ui:NavigationViewItem Content="{l:Loc Toolbox_Title}" SelectsOnInvoked="False">
2021-02-23 18:03:37 +08:00
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataToolboxOutline}"/>
</ui:NavigationViewItem.Icon>
<ui:NavigationViewItem.MenuItems>
2021-05-02 21:34:27 +08:00
<ui:NavigationViewItem l:ResxLocalizationProvider.DefaultDictionary="Strings"
Content="{l:Loc Toolbox_AutoFix_Title}" Tag="ToolboxAutoFixPage">
2021-02-23 18:03:37 +08:00
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataAutoFix}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-08-10 00:49:46 +08:00
<ui:NavigationViewItem l:ResxLocalizationProvider.DefaultDictionary="Strings"
Content="{l:Loc Toolbox_Remux_Title}" Tag="ToolboxRemuxPage">
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataAlphaRCircleOutline}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-08-10 18:53:04 +08:00
<ui:NavigationViewItem l:ResxLocalizationProvider.DefaultDictionary="Strings"
Content="{l:Loc Toolbox_Merge_Title}" Tag="ToolboxDanmakuMergerPage">
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataMerge}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-02-23 18:03:37 +08:00
</ui:NavigationViewItem.MenuItems>
</ui:NavigationViewItem>
2020-11-28 13:02:57 +08:00
</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-02-23 18:03:37 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_SettingsPage}" Tag="SettingsPage"
IsEnabled="False"
x:Name="SettingsPageNavigationViewItem"
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>
2021-05-01 00:22:27 +08:00
<ui:NavigationViewItem Content="{l:Loc RootPage_NavigationViewItem_LogPage}" Tag="LogPage">
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataPaperRollOutline}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2021-05-01 23:18:22 +08:00
<ui:NavigationViewItem Content="{l:Loc About_Title}" Tag="AboutPage">
2021-05-01 00:22:27 +08:00
<ui:NavigationViewItem.Icon>
<ui:PathIcon Style="{StaticResource PathIconDataInformationOutline}"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
2020-11-28 13:02:57 +08:00
</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>