mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-08-21 08:11:20 +08:00
185 lines
8.0 KiB
XML
185 lines
8.0 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:LanMountainDesktop.ViewModels"
|
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
|
xmlns:fi="using:FluentIcons.Avalonia.Fluent"
|
|
x:Class="LanMountainDesktop.Views.SettingsWindow"
|
|
x:DataType="vm:SettingsWindowViewModel"
|
|
Width="1120"
|
|
Height="760"
|
|
MinWidth="560"
|
|
MinHeight="480"
|
|
CanResize="True"
|
|
WindowStartupLocation="Manual"
|
|
SystemDecorations="BorderOnly"
|
|
FontFamily="{DynamicResource AppFontFamily}"
|
|
Background="Transparent"
|
|
Title="{Binding Title}">
|
|
|
|
<Window.Resources>
|
|
<x:Double x:Key="SettingsContainerMaxWidth">960</x:Double>
|
|
</Window.Resources>
|
|
|
|
<Window.Styles>
|
|
<Style Selector="Grid.page-title-container">
|
|
<Setter Property="Margin" Value="0,16,0,0" />
|
|
<Setter Property="MaxWidth" Value="{DynamicResource SettingsContainerMaxWidth}" />
|
|
</Style>
|
|
|
|
<Style Selector="TextBlock.page-title-text">
|
|
<Setter Property="FontSize" Value="28" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
</Style>
|
|
|
|
<Style Selector="TextBlock.page-title-text:narrow">
|
|
<Setter Property="FontSize" Value="24" />
|
|
</Style>
|
|
</Window.Styles>
|
|
|
|
<Grid Classes="settings-scope"
|
|
Background="{DynamicResource AdaptiveSettingsWindowBackgroundBrush}"
|
|
RowDefinitions="Auto,*">
|
|
<Border x:Name="WindowTitleBarHost"
|
|
Height="48"
|
|
Padding="12,0,12,0"
|
|
Background="{DynamicResource AdaptiveSettingsWindowBackgroundBrush}"
|
|
BorderBrush="{DynamicResource AdaptiveSettingsWindowBorderBrush}"
|
|
BorderThickness="0,0,0,1"
|
|
PointerPressed="OnWindowTitleBarPointerPressed">
|
|
<Grid ColumnDefinitions="Auto,Auto,*,Auto,Auto"
|
|
ColumnSpacing="8"
|
|
VerticalAlignment="Center">
|
|
<Button x:Name="TogglePaneButton"
|
|
Classes="pane-toggle-button"
|
|
Click="OnTogglePaneButtonClick">
|
|
<Grid>
|
|
<fi:FluentIcon x:Name="TogglePaneButtonIcon"
|
|
Icon="Navigation"
|
|
IconVariant="Regular"
|
|
FontSize="16" />
|
|
</Grid>
|
|
</Button>
|
|
|
|
<fi:FluentIcon x:Name="WindowBrandIcon"
|
|
Grid.Column="1"
|
|
Margin="6,0,2,0"
|
|
Icon="Settings"
|
|
IconVariant="Filled"
|
|
IsHitTestVisible="False"
|
|
VerticalAlignment="Center" />
|
|
|
|
<StackPanel Grid.Column="2"
|
|
Orientation="Horizontal"
|
|
VerticalAlignment="Center"
|
|
Spacing="10">
|
|
<TextBlock x:Name="WindowTitleTextBlock"
|
|
FontSize="12"
|
|
FontWeight="SemiBold"
|
|
IsHitTestVisible="False"
|
|
Text="{Binding Title}" />
|
|
</StackPanel>
|
|
|
|
<Button x:Name="RestartNowButton"
|
|
Grid.Column="3"
|
|
Padding="10,6"
|
|
Margin="0,0,4,0"
|
|
Background="Transparent"
|
|
IsVisible="{Binding IsRestartRequested}"
|
|
Click="OnRestartNowClick">
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="6">
|
|
<fi:FluentIcon x:Name="RestartButtonIcon"
|
|
Icon="ArrowSync"
|
|
IconVariant="Regular" />
|
|
<TextBlock x:Name="RestartButtonTextBlock"
|
|
Text="{Binding RestartButtonText}" />
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button x:Name="CloseWindowButton"
|
|
Grid.Column="4"
|
|
Width="40"
|
|
Height="32"
|
|
Padding="0"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Click="OnCloseWindowClick">
|
|
<fi:FluentIcon x:Name="CloseWindowButtonIcon"
|
|
Icon="Dismiss"
|
|
IconVariant="Regular" />
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ui:NavigationView x:Name="RootNavigationView"
|
|
Grid.Row="1"
|
|
Margin="0,8,0,0"
|
|
Background="Transparent"
|
|
PaneDisplayMode="Auto"
|
|
OpenPaneLength="283"
|
|
IsSettingsVisible="False"
|
|
IsPaneToggleButtonVisible="False"
|
|
IsBackButtonVisible="False"
|
|
SelectionChanged="OnNavigationSelectionChanged">
|
|
<ui:NavigationView.Resources>
|
|
<SolidColorBrush x:Key="NavigationViewContentBackground" Color="Transparent" />
|
|
<SolidColorBrush x:Key="NavigationViewContentGridBorderBrush" Color="Transparent" />
|
|
</ui:NavigationView.Resources>
|
|
|
|
<Grid x:Name="SettingsContentGrid"
|
|
ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="20"
|
|
Margin="12,0,16,16">
|
|
<Grid Grid.Column="0"
|
|
RowDefinitions="Auto,*">
|
|
<Grid x:Name="PageTitleContainer"
|
|
Grid.Row="0"
|
|
Classes="page-title-container"
|
|
IsVisible="{Binding IsPageTitleVisible}">
|
|
<TextBlock x:Name="PageTitleTextBlock"
|
|
Classes="page-title-text"
|
|
Text="{Binding CurrentPageTitle}" />
|
|
</Grid>
|
|
|
|
<ui:Frame x:Name="ContentFrame"
|
|
Grid.Row="1" />
|
|
</Grid>
|
|
|
|
<Border x:Name="DrawerBorder"
|
|
Grid.Column="1"
|
|
Width="296"
|
|
Background="{DynamicResource AdaptiveSurfaceRaisedBrush}"
|
|
BorderBrush="{DynamicResource AdaptiveGlassPanelBorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="16"
|
|
Padding="20"
|
|
BoxShadow="0 8 24 #14000000"
|
|
IsVisible="{Binding IsDrawerOpen}">
|
|
<Grid RowDefinitions="Auto,*"
|
|
RowSpacing="16">
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<TextBlock x:Name="DrawerTitleTextBlock"
|
|
FontSize="16"
|
|
FontWeight="SemiBold"
|
|
Text="{Binding DrawerTitle}" />
|
|
<Button Grid.Column="1"
|
|
Width="32"
|
|
Height="32"
|
|
Padding="0"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Click="OnCloseDrawerClick">
|
|
<fi:FluentIcon Icon="Dismiss"
|
|
IconVariant="Regular" />
|
|
</Button>
|
|
</Grid>
|
|
|
|
<ContentControl x:Name="DrawerContentHost"
|
|
Grid.Row="1" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</ui:NavigationView>
|
|
</Grid>
|
|
</Window>
|