Skip to content

Commit

Permalink
Feature: Added a header to the home page (#14864)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5bfa authored Feb 28, 2024
1 parent 23eafb1 commit 55114ec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/Files.App/UserControls/InnerNavigationToolbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,23 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<!-- Home page header -->
<TextBlock
x:Name="HomePageHeaderTextBlock"
Grid.Column="0"
Margin="18,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}"
Style="{StaticResource App.Theme.SubtitleTextBlockStyle}"
Text="{helpers:ResourceString Name=Home}" />

<!-- Context Commands -->
<CommandBar
x:Name="ContextCommandBar"
Grid.Column="0"
HorizontalAlignment="Left"
x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}"
DefaultLabelPosition="Right">
<CommandBar.PrimaryCommands>

Expand Down Expand Up @@ -125,7 +137,7 @@
</AppBarButton>

<!-- (Divider) -->
<AppBarSeparator />
<AppBarSeparator x:Name="PrimaryActionSeparator" />

<!-- Cut -->
<AppBarButton
Expand Down
3 changes: 0 additions & 3 deletions src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// Copyright (c) 2023 Files Community
// Licensed under the MIT License. See the LICENSE.

using Files.App.Data.Commands;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media.Imaging;
using System.IO;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace Files.App.UserControls
{
public sealed partial class InnerNavigationToolbar : UserControl
Expand Down

0 comments on commit 55114ec

Please sign in to comment.