-
-
Notifications
You must be signed in to change notification settings - Fork 966
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
103 lines (98 loc) · 4.41 KB
/
MainWindow.xaml
File metadata and controls
103 lines (98 loc) · 4.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<ui:FluentWindow
x:Class="Wpf.Ui.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:Wpf.Ui.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i18n="http://schemas.lepo.co/i18n/2022/xaml"
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Windows"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
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>
<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"
IsGridSplitterEnabled="True"
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"
AutomationProperties.AutomationId="NavigationAutoSuggestBox"
PlaceholderText="{i18n:StringLocalizer '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>
<ui:TitleBar
x:Name="TitleBar"
Title="{Binding ViewModel.ApplicationTitle}"
Grid.Row="0"
CloseWindowByDoubleClickOnIcon="True">
<ui:TitleBar.Icon>
<ui:ImageIcon Source="pack://application:,,,/Assets/wpfui.png" />
</ui:TitleBar.Icon>
</ui:TitleBar>
<tray:NotifyIcon
Grid.Row="0"
FocusOnLeftClick="True"
Icon="pack://application:,,,/Assets/wpfui.png"
MenuOnRightClick="True"
TooltipText="WPF UI Gallery">
<tray:NotifyIcon.Menu>
<ContextMenu DataContext="{Binding DataContext, Source={x:Reference NavigationView}}" ItemsSource="{Binding ViewModel.TrayMenuItems, Mode=OneWay}" />
</tray:NotifyIcon.Menu>
</tray:NotifyIcon>
<ui:ContentDialogHost x:Name="RootContentDialog" Grid.Row="0" />
</Grid>
</ui:FluentWindow>