mirror of
https://github.com/Maplespe/DWMBlurGlass.git
synced 2026-12-01 15:55:39 -05:00
89 lines
4.3 KiB
XML
89 lines
4.3 KiB
XML
<ui:FluentWindow x:Class="DWMBlurGlassGUI.Views.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
xmlns:viewmodels="clr-namespace:DWMBlurGlassGUI.ViewModels"
|
|
mc:Ignorable="d"
|
|
d:DataContext="{d:DesignInstance viewmodels:MainWindowViewModel, IsDesignTimeCreatable=False}"
|
|
Title="{Binding ApplicationTitle}"
|
|
Height="600" Width="900"
|
|
MinHeight="450" MinWidth="700"
|
|
WindowStartupLocation="CenterScreen"
|
|
ExtendsContentIntoTitleBar="True">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:TitleBar
|
|
Grid.Row="0"
|
|
Title="{Binding ApplicationTitle}"
|
|
ShowMaximize="True"
|
|
ShowMinimize="True">
|
|
<ui:TitleBar.TrailingContent>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button
|
|
Command="{Binding SaveCommand}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Width="46"
|
|
Height="30"
|
|
Padding="0"
|
|
VerticalAlignment="Top"
|
|
Cursor="Hand"
|
|
ToolTip="保存配置">
|
|
<Button.Style>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="border" Background="Transparent" SnapsToDevicePixels="True">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#19000000"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#33000000"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Opacity" Value="0.4"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Button.Style>
|
|
<ui:SymbolIcon Symbol="Save24" FontSize="18"/>
|
|
</Button>
|
|
<Rectangle Width="1" Height="10" Fill="{DynamicResource ControlStrokeColorDefaultBrush}" Margin="0,10" VerticalAlignment="Top"/>
|
|
</StackPanel>
|
|
</ui:TitleBar.TrailingContent>
|
|
</ui:TitleBar>
|
|
|
|
<ui:NavigationView
|
|
Grid.Row="1"
|
|
x:Name="NavigationView"
|
|
PaneDisplayMode="Left"
|
|
IsBackButtonVisible="Collapsed"
|
|
OpenPaneLength="260"
|
|
MenuItemsSource="{Binding MenuItems}"
|
|
FooterMenuItemsSource="{Binding FooterMenuItems}">
|
|
|
|
<ui:NavigationView.Header>
|
|
<ui:BreadcrumbBar Margin="10,0,0,5"/>
|
|
</ui:NavigationView.Header>
|
|
|
|
</ui:NavigationView>
|
|
|
|
<!-- Dialog Host for ContentDialog - must be on top of everything -->
|
|
<ContentPresenter x:Name="RootContentDialog" Grid.Row="0" Grid.RowSpan="2" Panel.ZIndex="1000"/>
|
|
</Grid>
|
|
</ui:FluentWindow>
|