Skip to content

Commit 55114ec

Browse files
authored
Feature: Added a header to the home page (#14864)
1 parent 23eafb1 commit 55114ec

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/Files.App/UserControls/InnerNavigationToolbar.xaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,23 @@
6363
<ColumnDefinition Width="Auto" />
6464
</Grid.ColumnDefinitions>
6565

66+
<!-- Home page header -->
67+
<TextBlock
68+
x:Name="HomePageHeaderTextBlock"
69+
Grid.Column="0"
70+
Margin="18,0,0,0"
71+
HorizontalAlignment="Left"
72+
VerticalAlignment="Center"
73+
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
74+
Style="{StaticResource App.Theme.SubtitleTextBlockStyle}"
75+
Text="{helpers:ResourceString Name=Home}" />
76+
6677
<!-- Context Commands -->
6778
<CommandBar
6879
x:Name="ContextCommandBar"
6980
Grid.Column="0"
7081
HorizontalAlignment="Left"
82+
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
7183
DefaultLabelPosition="Right">
7284
<CommandBar.PrimaryCommands>
7385

@@ -125,7 +137,7 @@
125137
</AppBarButton>
126138

127139
<!-- (Divider) -->
128-
<AppBarSeparator />
140+
<AppBarSeparator x:Name="PrimaryActionSeparator" />
129141

130142
<!-- Cut -->
131143
<AppBarButton

src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// Copyright (c) 2023 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using Files.App.Data.Commands;
54
using Microsoft.UI.Xaml;
65
using Microsoft.UI.Xaml.Controls;
76
using Microsoft.UI.Xaml.Input;
87
using Microsoft.UI.Xaml.Media.Imaging;
98
using System.IO;
109

11-
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
12-
1310
namespace Files.App.UserControls
1411
{
1512
public sealed partial class InnerNavigationToolbar : UserControl

0 commit comments

Comments
 (0)