17
17
<Setter Property =" PaneDisplayMode" Value =" Top" />
18
18
<Setter Property =" PaneToggleButtonStyle" Value =" {StaticResource PaneToggleButtonStyle}" />
19
19
<Setter Property =" IsTabStop" Value =" False" />
20
+ <Setter Property =" IsBackButtonVisible" Value =" Collapsed" />
21
+ <Setter Property =" IsSettingsVisible" Value =" False" />
20
22
<Setter Property =" CompactPaneLength" Value =" {ThemeResource NavigationViewCompactPaneLength}" />
21
23
<Setter Property =" Background" Value =" {ThemeResource SystemChromeMediumLowColor}" />
22
24
<Setter Property =" Template" >
49
51
</VisualState >
50
52
</VisualStateGroup >
51
53
54
+ <VisualStateGroup x : Name =" AutoSuggestGroup" >
55
+ <VisualState x : Name =" AutoSuggestBoxVisible" />
56
+ <VisualState x : Name =" AutoSuggestBoxCollapsed" >
57
+ <VisualState .Setters>
58
+ <Setter Target =" AutoSuggestArea.Visibility" Value =" Collapsed" />
59
+ <Setter Target =" TopPaneAutoSuggestArea.Visibility" Value =" Collapsed" />
60
+ </VisualState .Setters>
61
+ </VisualState >
62
+ </VisualStateGroup >
52
63
<VisualStateGroup x : Name =" TitleBarVisibilityGroup" >
53
64
<VisualState x : Name =" TitleBarVisible" />
54
65
<VisualState x : Name =" TitleBarCollapsed" >
57
68
</VisualState .Setters>
58
69
</VisualState >
59
70
</VisualStateGroup >
71
+ <!--
72
+ Flipped this around, but it really seems like there's an issue here with the WinUI NavigationView not properly applying this state in our re-template for some reason.
73
+ Maybe a bug? If not we may need to re-work how this works for our own purposes?
74
+ -->
75
+ <VisualStateGroup x : Name =" BackButtonGroup" >
76
+ <VisualState x : Name =" BackButtonVisible" >
77
+ <VisualState .Setters>
78
+ <Setter Target =" BackButtonPlaceholderOnTopNav.Width" Value =" {ThemeResource NavigationBackButtonWidth}" />
79
+ </VisualState .Setters>
80
+ </VisualState >
81
+ <VisualState x : Name =" BackButtonCollapsed" />
82
+ </VisualStateGroup >
60
83
</VisualStateManager .VisualStateGroups>
84
+ <!-- Button grid -->
85
+ <Grid x : Name =" PaneToggleButtonGrid"
86
+ HorizontalAlignment =" Left"
87
+ VerticalAlignment =" Top"
88
+ Canvas.ZIndex=" 100" >
89
+
90
+ <Grid .RowDefinitions>
91
+ <RowDefinition Height =" Auto" />
92
+ <RowDefinition Height =" Auto" />
93
+ </Grid .RowDefinitions>
61
94
95
+ <Grid x : Name =" TogglePaneTopPadding"
96
+ Height =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPadding}" />
97
+
98
+ <Grid x : Name =" ButtonHolderGrid"
99
+ Grid.Row=" 1"
100
+ Margin =" {ThemeResource NavigationViewButtonHolderGridMargin}" >
101
+ <Button x : Name =" NavigationViewBackButton"
102
+ Width =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.SmallerPaneToggleButtonWidth}"
103
+ VerticalAlignment =" Top"
104
+ IsEnabled =" {TemplateBinding IsBackEnabled}"
105
+ Style =" {StaticResource NavigationBackButtonNormalStyle}"
106
+ Visibility =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.BackButtonVisibility}" >
107
+ <ToolTipService .ToolTip>
108
+ <ToolTip x : Name =" NavigationViewBackButtonToolTip" />
109
+ </ToolTipService .ToolTip>
110
+ </Button >
111
+ <Button x : Name =" NavigationViewCloseButton"
112
+ VerticalAlignment =" Top"
113
+ Style =" {StaticResource NavigationBackButtonNormalStyle}" >
114
+ <ToolTipService .ToolTip>
115
+ <ToolTip x : Name =" NavigationViewCloseButtonToolTip" />
116
+ </ToolTipService .ToolTip>
117
+ </Button >
118
+ <Button x : Name =" TogglePaneButton"
119
+ MinWidth =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.SmallerPaneToggleButtonWidth}"
120
+ HorizontalAlignment =" Center"
121
+ VerticalAlignment =" Top"
122
+ AutomationProperties.LandmarkType=" Navigation"
123
+ FocusVisualMargin =" 0"
124
+ Style =" {TemplateBinding PaneToggleButtonStyle}"
125
+ Visibility =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneToggleButtonVisibility}" >
126
+ <TextBlock x : Name =" PaneTitleTextBlock"
127
+ Grid.Column=" 0"
128
+ Margin =" 0,-2,0,0"
129
+ HorizontalAlignment =" Left"
130
+ VerticalAlignment =" Center"
131
+ Style =" {StaticResource NavigationViewItemHeaderTextStyle}"
132
+ Text =" {TemplateBinding PaneTitle}" />
133
+ </Button >
134
+
135
+ <Grid x : Name =" PaneTitleHolder"
136
+ Height =" 40"
137
+ Visibility =" Collapsed" >
138
+ <ContentControl x : Name =" PaneTitlePresenter"
139
+ Margin =" {ThemeResource NavigationViewPaneTitlePresenterMargin}"
140
+ HorizontalContentAlignment =" Stretch"
141
+ VerticalContentAlignment =" Stretch"
142
+ IsTabStop =" False" />
143
+ </Grid >
144
+ </Grid >
145
+ </Grid >
62
146
<!-- Content layouts -->
63
147
<Grid >
64
148
<Grid .RowDefinitions>
86
170
Visibility =" {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPaneVisibility}" >
87
171
<Grid .ColumnDefinitions>
88
172
<ColumnDefinition x : Name =" BackButtonPlaceholderOnTopNav"
89
- Width =" {ThemeResource NavigationBackButtonWidth} " />
173
+ Width =" 0 " />
90
174
<ColumnDefinition Width =" Auto" />
91
175
<ColumnDefinition Width =" Auto" />
92
176
<ColumnDefinition Width =" Auto" />
200
284
VerticalContentAlignment =" Stretch"
201
285
IsTabStop =" False" />
202
286
287
+ <Grid x : Name =" TopPaneAutoSuggestArea"
288
+ Grid.Column=" 6"
289
+ Height =" {ThemeResource NavigationViewTopPaneHeight}" >
290
+
291
+ <ContentControl x : Name =" TopPaneAutoSuggestBoxPresenter"
292
+ MinWidth =" 216"
293
+ Margin =" {ThemeResource TopNavigationViewAutoSuggestBoxMargin}"
294
+ HorizontalContentAlignment =" Stretch"
295
+ VerticalContentAlignment =" Center"
296
+ IsTabStop =" False" />
297
+ </Grid >
298
+
203
299
<ContentControl x : Name =" PaneFooterOnTopPane"
204
300
Grid.Column=" 7"
205
301
HorizontalContentAlignment =" Stretch"
261
357
<Setter Property =" Background" Value =" {ThemeResource TabbedCommandBarAcrylicBackground}" />
262
358
</Style >
263
359
264
- </ResourceDictionary >
360
+ </ResourceDictionary >
0 commit comments