更新
This commit is contained in:
@@ -1,52 +1,59 @@
|
||||
<ui:FluentWindow
|
||||
x:Class="WPFluent.Gallery.Views.Windows.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:WPFluent.Gallery.Views.Windows"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tray="https://github.com/ShrlAlgo/WPFluent/tray"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||||
Width="1450"
|
||||
Height="800"
|
||||
MinWidth="900"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:MainWindow,
|
||||
IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="650"
|
||||
d:DesignWidth="1000"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
Title="{Binding ViewModel.ApplicationTitle, Mode=OneWay}"
|
||||
|
||||
|
||||
WindowBackdropType="Mica"
|
||||
WindowCornerPreference="Default"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<!--<ui:FluentWindow.InputBindings>
|
||||
<ui:FluentWindow x:Class="WPFluent.Gallery.Views.Windows.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:WPFluent.Gallery.Views.Windows"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:tray="https://github.com/ShrlAlgo/WPFluent/tray"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||||
xmlns:windows="clr-namespace:WPFluent.Gallery.ViewModels.Windows"
|
||||
Width="1450"
|
||||
Height="800"
|
||||
MinWidth="900"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance windows:MainWindowViewModel, IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="650"
|
||||
d:DesignWidth="1000"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
Title="{Binding ApplicationTitle, Mode=OneWay}"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
WindowBackdropType="Mica"
|
||||
WindowCornerPreference="Default"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<!-- <ui:FluentWindow.InputBindings>
|
||||
<KeyBinding
|
||||
Key="F"
|
||||
Command="{Binding ElementName=AutoSuggestBox, Path=FocusCommand}"
|
||||
Modifiers="Control" />
|
||||
</ui:FluentWindow.InputBindings>-->
|
||||
<!--<ui:FluentWindow.Resources>
|
||||
</ui:FluentWindow.InputBindings> -->
|
||||
<!--<ui:FluentWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ui:ThemesDictionary Theme="Light" />
|
||||
<ui:ThemesDictionary Theme="Dark" />
|
||||
<ui:ControlsDictionary />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</ui:FluentWindow.Resources>-->
|
||||
<DockPanel>
|
||||
<ui:TitleBar
|
||||
x:Name="TitleBar"
|
||||
CloseWindowByDoubleClickOnIcon="True"
|
||||
DockPanel.Dock="Top" Title="{Binding ViewModel.ApplicationTitle, Mode=OneWay}">
|
||||
</ui:FluentWindow.Resources>-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ui:TitleBar x:Name="TitleBar"
|
||||
CloseWindowByDoubleClickOnIcon="True"
|
||||
DockPanel.Dock="Top"
|
||||
HelpClicked="TitleBar_HelpClicked"
|
||||
ShowHelp="True"
|
||||
Title="MainWindow">
|
||||
<ui:TitleBar.Icon>
|
||||
<ui:ImageIcon Source="pack://application:,,,/WPFluent.Gallery;component/wpfui.png" />
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
<TabControl x:Name="NavigationView" Margin="5">
|
||||
<TabControl x:Name="NavigationView"
|
||||
Grid.Row="1"
|
||||
Margin="5">
|
||||
<TabItem Header="Icons">
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/DesignGuidance/IconsPage.xaml" />
|
||||
</TabItem>
|
||||
@@ -77,22 +84,11 @@
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/DateAndTimePage.xaml" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="DialogsAndFlyouts">
|
||||
<ScrollViewer>
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/DialogsAndFlyoutsPage.xaml" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Layout">
|
||||
<ScrollViewer>
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/LayoutPage.xaml" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Media">
|
||||
<ScrollViewer>
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/MediaPage.xaml" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Navigation">
|
||||
<ScrollViewer>
|
||||
<Frame Source="pack://application:,,,/WPFluent.Gallery;component/Views/Pages/NavigationPage.xaml" />
|
||||
@@ -119,8 +115,5 @@
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<!--<ContentPresenter x:Name="RootContentDialog" Grid.Row="0" />-->
|
||||
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</ui:FluentWindow>
|
||||
@@ -1,8 +1,4 @@
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
// All Rights Reserved.
|
||||
|
||||
using WPFluent.Appearance;
|
||||
using WPFluent.Gallery.ViewModels.Windows;
|
||||
|
||||
namespace WPFluent.Gallery.Views.Windows;
|
||||
@@ -16,4 +12,12 @@ public partial class MainWindow
|
||||
InitializeComponent();
|
||||
}
|
||||
public MainWindowViewModel ViewModel { get; }
|
||||
|
||||
private void TitleBar_HelpClicked(TitleBar sender, RoutedEventArgs args)
|
||||
{
|
||||
var theme = ThemeManager.GetAppTheme();
|
||||
ThemeManager.ChangeAppTheme(theme
|
||||
== ThemeType.Light ? ThemeType.Dark : ThemeType.Light);
|
||||
//var res = Application.Current.Resources;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user