106 lines
4.5 KiB
XML
106 lines
4.5 KiB
XML
<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:i18n="http://schemas.lepo.co/i18n/2022/xaml"
|
|
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"
|
|
Title="{Binding ViewModel.ApplicationTitle, Mode=OneWay}"
|
|
Width="1450"
|
|
Height="802"
|
|
MinWidth="900"
|
|
d:DataContext="{d:DesignInstance local:MainWindow,
|
|
IsDesignTimeCreatable=False}"
|
|
d:DesignHeight="650"
|
|
d:DesignWidth="1000"
|
|
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
|
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
ExtendsContentIntoTitleBar="True"
|
|
SizeChanged="MainWindow_OnSizeChanged"
|
|
WindowBackdropType="Mica"
|
|
WindowCornerPreference="Default"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
<ui:FluentWindow.InputBindings>
|
|
<KeyBinding
|
|
Key="F"
|
|
Command="{Binding ElementName=AutoSuggestBox, Path=FocusCommand}"
|
|
Modifiers="Control" />
|
|
</ui:FluentWindow.InputBindings>
|
|
<!--<ui:FluentWindow.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ui:ThemesDictionary Theme="Light" />
|
|
<ui:ControlsDictionary />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</ui:FluentWindow.Resources>-->
|
|
<Grid>
|
|
<ui:NavigationView
|
|
x:Name="NavigationView"
|
|
Padding="42,0,42,0"
|
|
BreadcrumbBar="{Binding ElementName=BreadcrumbBar}"
|
|
EnableDebugMessages="True"
|
|
FooterMenuItemsSource="{Binding ViewModel.FooterMenuItems, Mode=OneWay}"
|
|
FrameMargin="0"
|
|
IsBackButtonVisible="Visible"
|
|
IsPaneToggleVisible="True"
|
|
MenuItemsSource="{Binding ViewModel.MenuItems, Mode=OneWay}"
|
|
OpenPaneLength="310"
|
|
PaneClosed="NavigationView_OnPaneClosed"
|
|
PaneDisplayMode="Left"
|
|
PaneOpened="NavigationView_OnPaneOpened"
|
|
SelectionChanged="OnNavigationSelectionChanged"
|
|
TitleBar="{Binding ElementName=TitleBar, Mode=OneWay}"
|
|
Transition="FadeInWithSlide">
|
|
<ui:NavigationView.Header>
|
|
<StackPanel Margin="42,32,42,20">
|
|
<ui:BreadcrumbBar x:Name="BreadcrumbBar" />
|
|
<controls:PageControlDocumentation Margin="0,10,0,0" NavigationView="{Binding ElementName=NavigationView}" />
|
|
</StackPanel>
|
|
</ui:NavigationView.Header>
|
|
<ui:NavigationView.AutoSuggestBox>
|
|
<ui:AutoSuggestBox x:Name="AutoSuggestBox" PlaceholderText="Search">
|
|
<ui:AutoSuggestBox.Icon>
|
|
<ui:IconSourceElement>
|
|
<ui:SymbolIconSource Symbol="Search24" />
|
|
</ui:IconSourceElement>
|
|
</ui:AutoSuggestBox.Icon>
|
|
</ui:AutoSuggestBox>
|
|
</ui:NavigationView.AutoSuggestBox>
|
|
<ui:NavigationView.ContentOverlay>
|
|
<Grid>
|
|
<ui:SnackbarPresenter x:Name="SnackbarPresenter" />
|
|
</Grid>
|
|
</ui:NavigationView.ContentOverlay>
|
|
</ui:NavigationView>
|
|
|
|
<ContentPresenter x:Name="RootContentDialog" Grid.Row="0" />
|
|
|
|
<ui:TitleBar
|
|
x:Name="TitleBar"
|
|
Title="{Binding ViewModel.ApplicationTitle}"
|
|
Grid.Row="0"
|
|
CloseWindowByDoubleClickOnIcon="True">
|
|
<ui:TitleBar.Icon>
|
|
<ui:ImageIcon Source="pack://application:,,,/WPFluent.Gallery;component/wpfui.png" />
|
|
</ui:TitleBar.Icon>
|
|
</ui:TitleBar>
|
|
|
|
<!--<tray:NotifyIcon
|
|
Grid.Row="0"
|
|
FocusOnLeftClick="True"
|
|
Icon="pack://application:,,,/WPFluent.Gallery;component/wpfui.png"
|
|
MenuOnRightClick="True"
|
|
TooltipText="WPF UI Gallery">
|
|
<tray:NotifyIcon.Menu>
|
|
<ContextMenu ItemsSource="{Binding ViewModel.TrayMenuItems, Mode=OneWay}" />
|
|
</tray:NotifyIcon.Menu>
|
|
</tray:NotifyIcon>-->
|
|
</Grid>
|
|
</ui:FluentWindow>
|