<controls:PageBase
    x:Class="JumpPoint.Uwp.TabbedShell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:JumpPoint.Uwp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:nguwpext="using:NittyGritty.Uwp.Extensions"
    xmlns:winui="using:Microsoft.UI.Xaml.Controls"
    xmlns:controls="using:JumpPoint.Uwp.Controls"
    xmlns:viewmodels="using:JumpPoint.ViewModels"
    xmlns:converters="using:JumpPoint.Uwp.Converters"
    xmlns:services="using:JumpPoint.Platform.Services"
    xmlns:gtext="using:Glif.Core.Text"
    xmlns:items="using:JumpPoint.Platform.Items"
    xmlns:ngmodels="using:NittyGritty.Models"
    xmlns:selectors="using:NittyGritty.Uwp.Selectors"
    xmlns:i="using:Microsoft.Xaml.Interactivity"
    xmlns:core="using:Microsoft.Xaml.Interactions.Core"
    xmlns:ngconv="using:NittyGritty.Uwp.Converters"
    xmlns:models="using:JumpPoint.Platform.Models"
    xmlns:actions="using:NittyGritty.Uwp.Interactivity.Actions"
    xmlns:jpactions="using:JumpPoint.Uwp.Interactivity.Actions"
    xmlns:store="using:NittyGritty.Platform.Store"
    xmlns:ngservices="using:NittyGritty.Uwp.Services"
    xmlns:extensions="using:NittyGritty.Uwp.Extensions"
    xmlns:behaviors="using:JumpPoint.Uwp.Interactivity.Behaviors"
    xmlns:humanizer="using:Humanizer"
    xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
    xmlns:commands="using:JumpPoint.ViewModels.Commands"
    xmlns:helpers="using:JumpPoint.Uwp.Helpers"
    xmlns:platform="using:JumpPoint.Platform"
    xmlns:jpselectors="using:JumpPoint.Uwp.Converters.Selectors"
    mc:Ignorable="d"
    extensions:ApplicationViewExtensions.Title="{x:Bind ViewModel.CurrentTab.Context.PathInfo.DisplayName, Mode=OneWay}"
    extensions:TitleBarExtensions.ButtonBackgroundColor="Transparent"
    extensions:TitleBarExtensions.ButtonInactiveBackgroundColor="Transparent"
    winui:BackdropMaterial.ApplyToRootOrPageBackground="True"
    DataContext="{Binding Source={StaticResource Locator}, Path=TabbedShell}">
    
    <controls:PageBase.Resources>
        <Thickness x:Key="NavigationViewHeaderMargin">12,0</Thickness>
        <Thickness x:Key="NavigationViewContentPresenterMargin">0</Thickness>
        <ngconv:BooleanValueConverter x:Key="HasNullFileSizeIndicatorConverter"
                                      TrueValue="*"
                                      FalseValue=""/>
        <converters:ShellItemContentTemplateSelector x:Key="ShellItemContentTemplateSelector">
            <converters:ShellItemContentTemplateSelector.Text>
                <DataTemplate x:DataType="x:String">
                    <TextBlock Text="{x:Bind }"
                               FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay}"
                               FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                               FontWeight="{x:Bind gtext:FontWeightExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontWeight), Mode=OneWay}"
                               FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}" />
                </DataTemplate>
            </converters:ShellItemContentTemplateSelector.Text>
            <converters:ShellItemContentTemplateSelector.JumpPointItem>
                <DataTemplate x:DataType="items:JumpPointItem">
                    <TextBlock Text="{x:Bind DisplayName, Mode=OneWay}"
                               FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay}"
                               FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                               FontWeight="{x:Bind gtext:FontWeightExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontWeight), Mode=OneWay}"
                               FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}" />
                </DataTemplate>
            </converters:ShellItemContentTemplateSelector.JumpPointItem>
            <converters:ShellItemContentTemplateSelector.AppPath>
                <DataTemplate x:DataType="platform:AppPath">
                    <TextBlock Text="{x:Bind Converter={StaticResource HumanizerConverter}}"
                               FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay}"
                               FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                               FontWeight="{x:Bind gtext:FontWeightExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontWeight), Mode=OneWay}"
                               FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}" />
                </DataTemplate>
            </converters:ShellItemContentTemplateSelector.AppPath>
        </converters:ShellItemContentTemplateSelector>

        <DataTemplate x:Key="ItemTemplate"
                      x:DataType="ngmodels:ShellItem">
            <winui:NavigationViewItem Icon="{x:Bind converters:IconConverter.GetShellItemIcon(Key, Tag), Mode=OneWay}"
                                      MenuItemsSource="{x:Bind Children, Mode=OneWay}"
                                      SelectsOnInvoked="{x:Bind converters:NavigationViewItemConverter.SelectsOnInvoked(Key), Mode=OneWay}"
                                      Tag="{x:Bind Mode=OneWay}">
                <winui:NavigationViewItem.ContextFlyout>
                    <MenuFlyout>
                        <MenuFlyoutItem CommandParameter="{x:Bind Mode=OneWay}"
                                        Command="{StaticResource OpenShellItemInNewTabCommand}"
                                        IsEnabled="{x:Bind commands:Sidebar.IsOpenInNewTabEnabled(Content), Mode=OneWay}"
                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}"/>
                        <MenuFlyoutItem CommandParameter="{x:Bind Mode=OneWay}"
                                        Command="{StaticResource OpenShellItemInNewWindowCommand}"
                                        IsEnabled="{x:Bind commands:Sidebar.IsOpenInNewWindowEnabled(Content), Mode=OneWay}"
                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                        <MenuFlyoutItem CommandParameter="{x:Bind Mode=OneWay}"
                                        Command="{StaticResource CopyShellItemPathCommand}" />
                    </MenuFlyout>
                </winui:NavigationViewItem.ContextFlyout>
                <ContentControl Content="{x:Bind Content, Mode=OneWay}"
                                ContentTemplateSelector="{StaticResource ShellItemContentTemplateSelector}" />
                <ToolTipService.ToolTip>
                    <ContentControl Content="{x:Bind Content, Mode=OneWay}"
                                    ContentTemplateSelector="{StaticResource ShellItemContentTemplateSelector}" />
                </ToolTipService.ToolTip>
            </winui:NavigationViewItem>
        </DataTemplate>
        <DataTemplate x:Key="HeaderTemplate"
                      x:DataType="ngmodels:ShellItem">
            <winui:NavigationViewItemHeader Content="{x:Bind Content, Mode=OneWay}" />
        </DataTemplate>
        <DataTemplate x:Key="SeparatorTemplate">
            <winui:NavigationViewItemSeparator />
        </DataTemplate>
        <selectors:ShellItemTemplateSelector x:Key="ShellItemTemplateSelector"
                                             ItemTemplate="{StaticResource ItemTemplate}"
                                             HeaderTemplate="{StaticResource HeaderTemplate}"
                                             SeparatorTemplate="{StaticResource SeparatorTemplate}" />
        <DataTemplate x:Key="ItemStatsTemplate"
                      x:DataType="models:ItemStats">
            <Grid ColumnSpacing="8"
                  RowSpacing="4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Image Width="24"
                       Height="24">
                    <Image.Source>
                        <BitmapImage DecodePixelHeight="24"
                                     DecodePixelWidth="24"
                                     DecodePixelType="Logical"
                                     UriSource="{x:Bind converters:IconConverter.GetItemIconUri(items:JumpPointItemType.Drive)}" />
                    </Image.Source>
                </Image>
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('Drive', Drive, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Column="1"
                           VerticalAlignment="Center" />

                <Image Width="24"
                       Height="24"
                       Grid.Row="1">
                    <Image.Source>
                        <BitmapImage DecodePixelHeight="24"
                                     DecodePixelWidth="24"
                                     DecodePixelType="Logical"
                                     UriSource="{x:Bind converters:IconConverter.GetItemIconUri(items:JumpPointItemType.Folder)}" />
                    </Image.Source>
                </Image>
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('Folder', Folder, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Column="1"
                           Grid.Row="1"
                           VerticalAlignment="Center" />

                <Image Width="24"
                       Height="24"
                       Grid.Row="2">
                    <Image.Source>
                        <BitmapImage DecodePixelHeight="24"
                                     DecodePixelWidth="24"
                                     DecodePixelType="Logical"
                                     UriSource="{x:Bind converters:IconConverter.GetItemIconUri(items:JumpPointItemType.File)}" />
                    </Image.Source>
                </Image>
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('File', File, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Column="1"
                           Grid.Row="2"
                           VerticalAlignment="Center" />
                <TextBlock Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
                           Grid.Column="2"
                           Grid.Row="2"
                           VerticalAlignment="Center">
                    <Run Text="{x:Bind FileSize, Converter={StaticResource ByteSizeConverter}, Mode=OneWay}" />
                    <Run Text="{x:Bind HasNullFileSize, Converter={StaticResource HasNullFileSizeIndicatorConverter}, Mode=OneWay}" />
                </TextBlock>

                <Image Width="24"
                       Height="24"
                       Grid.Row="3">
                    <Image.Source>
                        <BitmapImage DecodePixelHeight="24"
                                     DecodePixelWidth="24"
                                     DecodePixelType="Logical"
                                     UriSource="{x:Bind converters:IconConverter.GetItemIconUri(items:JumpPointItemType.Workspace)}" />
                    </Image.Source>
                </Image>
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('Workspace', Workspace, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Column="1"
                           Grid.Row="3"
                           VerticalAlignment="Center" />

                <Image Width="24"
                       Height="24"
                       Grid.Row="4">
                    <Image.Source>
                        <BitmapImage DecodePixelHeight="24"
                                     DecodePixelWidth="24"
                                     DecodePixelType="Logical"
                                     UriSource="{x:Bind converters:IconConverter.GetItemIconUri(items:JumpPointItemType.AppLink)}" />
                    </Image.Source>
                </Image>
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('App link', AppLink, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Column="1"
                           Grid.Row="4"
                           VerticalAlignment="Center" />
            </Grid>
        </DataTemplate>
        <Flyout x:Key="AllItemsFlyout"
                Placement="TopEdgeAlignedLeft">
            <Grid RowSpacing="4"
                  MinWidth="240">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="ALL ITEMS"
                           FontWeight="SemiBold" />
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('item', ViewModel.CurrentTab.Context.ItemStats.Total, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Row="1" />

                <Button Grid.Column="1"
                        Grid.RowSpan="2"
                        MinWidth="0"
                        MinHeight="0"
                        VerticalAlignment="Top"
                        Padding="4"
                        Background="Transparent"
                        BorderThickness="0">
                    <FontIcon FontFamily="ms-appx:///Fonts/FluentSystemIcons-Regular.ttf#FluentSystemIcons-Regular"
                              Glyph="&#xF639;"
                              FontSize="18" />
                    <Button.Flyout>
                        <Flyout>
                            <TextBlock Text="* Some sizes might be unavailable" />
                        </Flyout>
                    </Button.Flyout>
                </Button>
                <ContentControl Content="{x:Bind ViewModel.CurrentTab.Context.ItemStats, Mode=OneWay}"
                                ContentTemplate="{StaticResource ItemStatsTemplate}"
                                HorizontalAlignment="Stretch"
                                HorizontalContentAlignment="Stretch"
                                Grid.Row="2"
                                Grid.ColumnSpan="2"
                                Margin="0,8,0,0" />
            </Grid>
        </Flyout>
        <Flyout x:Key="SelectedItemsFlyout"
                Placement="TopEdgeAlignedLeft">
            <Grid RowSpacing="4"
                  MinWidth="240">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="SELECTED ITEMS"
                           FontWeight="SemiBold" />
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('item', ViewModel.CurrentTab.Context.SelectedItems.Count, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Grid.Row="1" />
                <Button Grid.Column="1"
                        Grid.RowSpan="2"
                        MinWidth="0"
                        MinHeight="0"
                        VerticalAlignment="Top"
                        Padding="4"
                        Background="Transparent"
                        BorderThickness="0">
                    <FontIcon FontFamily="ms-appx:///Fonts/FluentSystemIcons-Regular.ttf#FluentSystemIcons-Regular"
                              Glyph="&#xF639;"
                              FontSize="18" />
                    <Button.Flyout>
                        <Flyout>
                            <TextBlock Text="* Some sizes might be unavailable" />
                        </Flyout>
                    </Button.Flyout>
                </Button>
                <ContentControl Content="{x:Bind ViewModel.CurrentTab.Context.SelectedItemStats, Mode=OneWay}"
                                ContentTemplate="{StaticResource ItemStatsTemplate}"
                                HorizontalAlignment="Stretch"
                                HorizontalContentAlignment="Stretch"
                                Grid.Row="2"
                                Grid.ColumnSpan="2"
                                Margin="0,8,0,0" />
                <Button Grid.Row="3"
                        Grid.ColumnSpan="2"
                        Margin="0,8,0,0"
                        HorizontalAlignment="Stretch"
                        Visibility="{x:Bind ViewModel.CurrentTab.Context.SelectedItemStats.Total, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}"
                        CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                        Command="{Binding Source={StaticResource Locator}, Path=CommandHelper.ItemsPropertiesCommand}">
                    <StackPanel Orientation="Horizontal"
                                Spacing="8">
                        <FontIcon FontFamily="ms-appx:///Fonts/FluentSystemIcons-Regular.ttf#FluentSystemIcons-Regular"
                                  Glyph="&#xF4A4;"
                                  FontSize="18" />
                        <TextBlock Text="Properties" />
                    </StackPanel>
                </Button>
            </Grid>
        </Flyout>
    </controls:PageBase.Resources>

    <Grid>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup  x:Name="AdaptiveVisualStateGroup">
                <VisualState x:Name="VisualStateNarrow">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="paneNavigationBar.(Grid.Row)"
                                Value="0" />
                        <Setter Target="paneNavigationBar.(Grid.Column)"
                                Value="0" />
                        <Setter Target="paneNavigationBar.(Grid.ColumnSpan)"
                                Value="3" />
                        <Setter Target="paneNavigationBar.Margin"
                                Value="0,0,0,4" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="VisualStateNormal">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="640" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <!--TODO: change properties for normal view-->
                        <Setter Target="paneNavigationBar.(Grid.Row)"
                                Value="1" />
                        <Setter Target="paneNavigationBar.(Grid.Column)"
                                Value="1" />
                        <Setter Target="paneNavigationBar.(Grid.ColumnSpan)"
                                Value="1" />
                        <Setter Target="paneNavigationBar.Margin"
                                Value="4,0" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <controls:PanedTabView2 TabItemsSource="{x:Bind ViewModel.Tabs}"
                                SelectedItem="{Binding CurrentTab, Mode=TwoWay}"
                                MenuItemsSource="{x:Bind ViewModel.ShellItems.Sidebar, Mode=OneWay}"
                                FooterMenuItemsSource="{x:Bind ViewModel.ShellItems.Footer, Mode=OneWay}"
                                MenuItemTemplateSelector="{StaticResource ShellItemTemplateSelector}"
                                HeaderBackground="{ThemeResource TitleBarBackground}"
                                IsDetailsPaneOpen="{x:Bind helpers:ServiceLocator.AppSettings.ShowDetailsPane, Mode=OneWay}"
                                x:Name="panedTabView">
            <controls:PanedTabView2.TabHeaderTemplate>
                <DataTemplate x:DataType="viewmodels:TabViewModel">
                    <Grid CornerRadius="12,12,0,0"
                          Margin="1,0"
                          Padding="12,2,8,2"
                          Background="Transparent"
                          ToolTipService.ToolTip="{x:Bind Context.PathInfo.Path, Mode=OneWay}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.ContextFlyout>
                            <MenuFlyout>
                                <MenuFlyoutItem CommandParameter="{Binding}"
                                                Command="{StaticResource NewTabCommand}" />
                                <MenuFlyoutItem CommandParameter="{Binding}"
                                                Command="{StaticResource DuplicateTabCommand}" />
                                <MenuFlyoutItem CommandParameter="{Binding}"
                                                Command="{StaticResource MoveTabToNewWindowCommand}" />
                                <MenuFlyoutItem CommandParameter="{Binding}"
                                                Command="{StaticResource CloseTabCommand}" />
                                <MenuFlyoutItem CommandParameter="{Binding}"
                                                Command="{StaticResource CloseOtherTabsCommand}" />
                            </MenuFlyout>
                        </Grid.ContextFlyout>
                        
                        <Viewbox Width="20"
                                 Height="20">
                            <IconSourceElement IconSource="{x:Bind converters:IconConverter.GetPathTypeIconSource(Context.PathInfo.Type, Context.PathInfo.Tag), Mode=OneWay}" />
                        </Viewbox>
                        <TextBlock Text="{x:Bind Context.PathInfo.DisplayName, Mode=OneWay}"
                                   VerticalAlignment="Center"
                                   Grid.Column="1"
                                   FontSize="14"
                                   FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay}"
                                   FontWeight="{x:Bind gtext:FontWeightExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontWeight), Mode=OneWay}"
                                   FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                                   FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}"
                                   Padding="8,0,20,0"/>
                        <Button Grid.Column="2"
                                Padding="4"
                                BorderThickness="0"
                                Background="Transparent"
                                VerticalAlignment="Center"
                                CommandParameter="{Binding}"
                                Command="{StaticResource CloseTabCommand}">
                            <IconSourceElement IconSource="{StaticResource CloseTabIconSmall}" />
                        </Button>
                    </Grid>
                </DataTemplate>
            </controls:PanedTabView2.TabHeaderTemplate>
            <controls:PanedTabView2.TabItemTemplate>
                <DataTemplate x:DataType="viewmodels:TabViewModel">
                    <Frame nguwpext:FrameExtensions.Key="{x:Bind Key, Mode=OneWay}">
                        <Frame.ContentTransitions>
                            <TransitionCollection>
                                <NavigationThemeTransition>
                                    <NavigationThemeTransition.DefaultNavigationTransitionInfo>
                                        <SuppressNavigationTransitionInfo />
                                    </NavigationThemeTransition.DefaultNavigationTransitionInfo>
                                </NavigationThemeTransition>
                            </TransitionCollection>
                        </Frame.ContentTransitions>
                        <i:Interaction.Behaviors>
                            <behaviors:FrameNavigatedContextBehavior SelectedTab="{Binding ElementName=panedTabView, Path=SelectedItem}" />
                        </i:Interaction.Behaviors>
                        <animations:Implicit.ShowAnimations>
                            <animations:TranslationAnimation EasingMode="EaseOut"
                                                             Duration="0:0:0.5"
                                                             From="50,0,0"
                                                             To="0" />
                            <animations:OpacityAnimation Duration="0:0:0.25"
                                                         From="0"
                                                         To="1"
                                                         EasingMode="EaseOut"/>
                        </animations:Implicit.ShowAnimations>
                        <animations:Implicit.HideAnimations>
                            <animations:OpacityAnimation Duration="0:0:0.01"
                                                         From="1"
                                                         To="0"
                                                         EasingMode="EaseOut" />
                        </animations:Implicit.HideAnimations>
                    </Frame>
                </DataTemplate>
            </controls:PanedTabView2.TabItemTemplate>
            <controls:PanedTabView2.LeftHeader>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid x:Name="leftInset"
                          Background="Transparent" />
                    <Button Style="{StaticResource TitleBarButton}"
                            Grid.Column="1"
                            Click="toggleMenu_Click">
                        <IconSourceElement IconSource="{StaticResource MenuIcon}" />
                        <!--<FontIcon FontFamily="Segoe MDL2 Assets"
                                  Glyph="&#xE700;"
                                  FontSize="14" />-->
                    </Button>
                </Grid>
            </controls:PanedTabView2.LeftHeader>
            <controls:PanedTabView2.RightHeader>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Button Style="{StaticResource TitleBarButton}">
                        <IconSourceElement IconSource="{StaticResource AllTabsIcon}" />
                        <Button.Flyout>
                            <Flyout Placement="BottomEdgeAlignedLeft">
                                <Flyout.FlyoutPresenterStyle>
                                    <Style TargetType="FlyoutPresenter">
                                        <Setter Property="Padding"
                                                Value="0,4" />
                                    </Style>
                                </Flyout.FlyoutPresenterStyle>
                                <ListView SelectionMode="Single"
                                          ItemsSource="{x:Bind ViewModel.Tabs}"
                                          SelectedItem="{Binding CurrentTab, Mode=TwoWay}"
                                          IsItemClickEnabled="True"
                                          MaxHeight="320"
                                          MinWidth="240"
                                          MaxWidth="320">
                                    <ListView.ItemTemplate>
                                        <DataTemplate x:DataType="viewmodels:TabViewModel">
                                            <Grid Background="Transparent"
                                                  ToolTipService.ToolTip="{x:Bind Context.PathInfo.Path, Mode=OneWay}">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Grid.ContextFlyout>
                                                    <MenuFlyout>
                                                        <MenuFlyoutItem CommandParameter="{Binding}"
                                                                        Command="{StaticResource NewTabCommand}" />
                                                        <MenuFlyoutItem CommandParameter="{Binding}"
                                                                        Command="{StaticResource DuplicateTabCommand}" />
                                                        <MenuFlyoutItem CommandParameter="{Binding}"
                                                                        Command="{StaticResource MoveTabToNewWindowCommand}" />
                                                        <MenuFlyoutItem CommandParameter="{Binding}"
                                                                        Command="{StaticResource CloseTabCommand}" />
                                                        <MenuFlyoutItem CommandParameter="{Binding}"
                                                                        Command="{StaticResource CloseOtherTabsCommand}" />
                                                    </MenuFlyout>
                                                </Grid.ContextFlyout>

                                                <Viewbox Width="20"
                                                         Height="20">
                                                    <IconSourceElement IconSource="{x:Bind converters:IconConverter.GetPathTypeIconSource(Context.PathInfo.Type, Context.PathInfo.Tag), Mode=OneWay}" />
                                                </Viewbox>
                                                <TextBlock Text="{x:Bind Context.PathInfo.DisplayName, Mode=OneWay}"
                                                           VerticalAlignment="Center"
                                                           Grid.Column="1"
                                                           FontSize="14"
                                                           FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay}"
                                                           FontWeight="{x:Bind gtext:FontWeightExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontWeight), Mode=OneWay}"
                                                           FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                                                           FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}"
                                                           Padding="8,0,20,0" />
                                                <Button Grid.Column="2"
                                                        Padding="4"
                                                        BorderThickness="0"
                                                        Background="Transparent"
                                                        VerticalAlignment="Center"
                                                        CommandParameter="{Binding}"
                                                        Command="{StaticResource CloseTabCommand}">
                                                    <IconSourceElement IconSource="{StaticResource CloseTabIconSmall}" />
                                                </Button>
                                            </Grid>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                    <i:Interaction.Behaviors>
                                        <core:EventTriggerBehavior EventName="ItemClick">
                                            <actions:CloseFlyoutAction />
                                        </core:EventTriggerBehavior>
                                    </i:Interaction.Behaviors>
                                </ListView>
                            </Flyout>
                        </Button.Flyout>
                    </Button>
                    <Button Grid.Column="1"
                            Style="{StaticResource TitleBarButton}"
                            CommandParameter="{x:Null}"
                            Command="{x:Bind ViewModel.NewTabCommand}">
                        <IconSourceElement IconSource="{StaticResource AddTabIcon}" />
                    </Button>
                    <Grid x:Name="rightInset"
                          Background="Transparent"
                          Grid.Column="2" />
                </Grid>
            </controls:PanedTabView2.RightHeader>
            <controls:PanedTabView2.TabStripContent>
                <Grid Loaded="OnRibbonLoaded"
                      SizeChanged="OnRibbonSizeChanged"
                      Canvas.ZIndex="100">
                    <Border x:Name="borderShadow"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch" />

                    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
                          Padding="4">
                        <Grid.ChildrenTransitions>
                            <TransitionCollection>
                                <RepositionThemeTransition />
                            </TransitionCollection>
                        </Grid.ChildrenTransitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <StackPanel Orientation="Horizontal"
                                    Spacing="4"
                                    Grid.Row="1">
                            <StackPanel.Resources>
                                <SolidColorBrush x:Key="ButtonBackgroundDisabled"
                                                 Color="Transparent" />
                            </StackPanel.Resources>
                            <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                 Command="{StaticResource BackCommand}"
                                                 x:Name="navBack"
                                                 IsRightTapEnabled="True"
                                                 IsEnabled="{x:Bind ((ngservices:NavigationService)ViewModel.CurrentTab.NavigationHelper.NavigationService).Context.CanGoBack, Mode=OneWay}"
                                                 x:Load="{x:Bind helpers:ServiceLocator.AppSettings.ShowBack, Mode=OneWay}"
                                                 IsCompact="True">
                                <FlyoutBase.AttachedFlyout>
                                    <Flyout Placement="BottomEdgeAlignedLeft">
                                        <Flyout.FlyoutPresenterStyle>
                                            <Style TargetType="FlyoutPresenter">
                                                <Setter Property="Padding"
                                                        Value="0,4" />
                                            </Style>
                                        </Flyout.FlyoutPresenterStyle>
                                        <ListView SelectionMode="None"
                                                  ItemsSource="{x:Bind ((ngservices:NavigationService)ViewModel.CurrentTab.NavigationHelper.NavigationService).Context.BackStack, Mode=OneWay, Converter={StaticResource ReverseStackConverter}}"
                                                  IsItemClickEnabled="True"
                                                  MaxHeight="320"
                                                  MinWidth="240"
                                                  MaxWidth="320">
                                            <ListView.ItemTemplate>
                                                <DataTemplate x:DataType="PageStackEntry">
                                                    <Grid Background="Transparent"
                                                          ToolTipService.ToolTip="{x:Bind converters:TabParameterConverter.GetPath(Parameter)}">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto" />
                                                            <ColumnDefinition Width="*" />
                                                        </Grid.ColumnDefinitions>
                                                        <Viewbox Width="20"
                                                                 Height="20">
                                                            <IconSourceElement IconSource="{x:Bind converters:TabParameterConverter.GetIconSource(Parameter)}" />
                                                        </Viewbox>
                                                        <TextBlock Text="{x:Bind converters:TabParameterConverter.GetDisplayName(Parameter)}"
                                                                   VerticalAlignment="Center"
                                                                   Grid.Column="1"
                                                                   FontSize="14"
                                                                   Padding="8,0,20,0" />
                                                    </Grid>
                                                </DataTemplate>
                                            </ListView.ItemTemplate>
                                            <i:Interaction.Behaviors>
                                                <core:EventTriggerBehavior EventName="ItemClick">
                                                    <actions:CloseFlyoutAction />
                                                    <core:InvokeCommandAction Command="{x:Bind JumpBackCommand}"
                                                                              InputConverter="{StaticResource ItemClickEventArgsConverter}"/>
                                                </core:EventTriggerBehavior>
                                            </i:Interaction.Behaviors>
                                        </ListView>
                                    </Flyout>
                                </FlyoutBase.AttachedFlyout>
                                <i:Interaction.Behaviors>
                                    <core:EventTriggerBehavior EventName="RightTapped">
                                        <core:CallMethodAction TargetObject="{x:Bind ViewModel}"
                                                               MethodName="RaiseCurrentTabChanged" />
                                        <actions:OpenFlyoutAction />
                                    </core:EventTriggerBehavior>
                                </i:Interaction.Behaviors>
                            </controls:IconButton>
                            <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                 Command="{StaticResource ForwardCommand}"
                                                 x:Name="navForward"
                                                 IsEnabled="{x:Bind ((ngservices:NavigationService)ViewModel.CurrentTab.NavigationHelper.NavigationService).Context.CanGoForward, Mode=OneWay}"
                                                 x:Load="{x:Bind helpers:ServiceLocator.AppSettings.ShowForward, Mode=OneWay}"
                                                 IsCompact="True">
                                <FlyoutBase.AttachedFlyout>
                                    <Flyout Placement="BottomEdgeAlignedLeft">
                                        <Flyout.FlyoutPresenterStyle>
                                            <Style TargetType="FlyoutPresenter">
                                                <Setter Property="Padding"
                                                        Value="0,4" />
                                            </Style>
                                        </Flyout.FlyoutPresenterStyle>
                                        <ListView SelectionMode="None"
                                                  ItemsSource="{x:Bind ((ngservices:NavigationService)ViewModel.CurrentTab.NavigationHelper.NavigationService).Context.ForwardStack, Mode=OneWay, Converter={StaticResource ReverseStackConverter}}"
                                                  IsItemClickEnabled="True"
                                                  MaxHeight="320"
                                                  MinWidth="240"
                                                  MaxWidth="320">
                                            <ListView.ItemTemplate>
                                                <DataTemplate x:DataType="PageStackEntry">
                                                    <Grid Background="Transparent"
                                                          ToolTipService.ToolTip="{x:Bind converters:TabParameterConverter.GetPath(Parameter)}">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto" />
                                                            <ColumnDefinition Width="*" />
                                                        </Grid.ColumnDefinitions>
                                                        <Viewbox Width="20"
                                                                 Height="20">
                                                            <IconSourceElement IconSource="{x:Bind converters:TabParameterConverter.GetIconSource(Parameter)}" />
                                                        </Viewbox>
                                                        <TextBlock Text="{x:Bind converters:TabParameterConverter.GetDisplayName(Parameter)}"
                                                                   VerticalAlignment="Center"
                                                                   Grid.Column="1"
                                                                   FontSize="14"
                                                                   Padding="8,0,20,0" />
                                                    </Grid>
                                                </DataTemplate>
                                            </ListView.ItemTemplate>
                                            <i:Interaction.Behaviors>
                                                <core:EventTriggerBehavior EventName="ItemClick">
                                                    <actions:CloseFlyoutAction />
                                                    <core:InvokeCommandAction Command="{x:Bind JumpForwardCommand}"
                                                                              InputConverter="{StaticResource ItemClickEventArgsConverter}" />
                                                </core:EventTriggerBehavior>
                                            </i:Interaction.Behaviors>
                                        </ListView>
                                    </Flyout>
                                </FlyoutBase.AttachedFlyout>
                                <i:Interaction.Behaviors>
                                    <core:EventTriggerBehavior EventName="RightTapped">
                                        <core:CallMethodAction TargetObject="{x:Bind ViewModel}"
                                                               MethodName="RaiseCurrentTabChanged" />
                                        <actions:OpenFlyoutAction />
                                    </core:EventTriggerBehavior>
                                </i:Interaction.Behaviors>
                            </controls:IconButton>
                            <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                 Command="{StaticResource UpCommand}"
                                                 IsEnabled="{x:Bind commands:NavigationBar.IsUpEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                 x:Name="navUp"
                                                 x:Load="{x:Bind helpers:ServiceLocator.AppSettings.ShowUp, Mode=OneWay}"
                                                 IsCompact="True" />
                            <controls:IconButton Command="{StaticResource RefreshCommand}"
                                                 x:Name="navRefresh"
                                                 x:Load="{x:Bind helpers:ServiceLocator.AppSettings.ShowRefresh, Mode=OneWay}"
                                                 IsCompact="True" />
                            <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                 Command="{StaticResource DashboardCommand}"
                                                 x:Name="navDashboard"
                                                 x:Load="{x:Bind helpers:ServiceLocator.AppSettings.ShowDashboard, Mode=OneWay}"
                                                 IsCompact="True" />
                        </StackPanel>

                        <Grid x:Name="paneNavigationBar"
                              Grid.Row="1"
                              Grid.Column="1"
                              Margin="4,0"
                              CornerRadius="4"
                              Background="{ThemeResource SystemChromeMediumLowColor}"
                              x:Load="{x:Bind ViewModel.IsEditingPath, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <winui:ProgressBar VerticalAlignment="Stretch"
                                               HorizontalAlignment="Stretch"
                                               Maximum="{x:Bind ViewModel.CurrentTab.Context.ProgressInfo.Total, Mode=OneWay, Converter={StaticResource ZeroWhenNullConverter}}"
                                               Minimum="0"
                                               Opacity="0.5"
                                               Background="Transparent"
                                               CornerRadius="4"
                                               Grid.ColumnSpan="3"
                                               MinHeight="31"
                                               Value="{x:Bind ViewModel.CurrentTab.Context.ProgressInfo.Value, Mode=OneWay}"
                                               IsIndeterminate="{x:Bind ViewModel.CurrentTab.Context.ProgressInfo.Total, Mode=OneWay, Converter={StaticResource IsNullConverter}}"
                                               Visibility="{x:Bind ViewModel.CurrentTab.Context.ProgressInfo.IsRunning, Mode=OneWay, Converter={StaticResource VisibleWhenTrueConverter}}" />
                            <Button Background="Transparent"
                                    VerticalAlignment="Stretch"
                                    BorderThickness="0"
                                    Margin="2"
                                    Padding="8,4,8,4">
                                <Viewbox Width="20"
                                         Height="20">
                                    <IconSourceElement IconSource="{x:Bind converters:IconConverter.GetPathTypeIconSource(ViewModel.CurrentTab.Context.PathInfo.Type, ViewModel.CurrentTab.Context.PathInfo.Tag), Mode=OneWay}" />
                                </Viewbox>
                                <Button.Resources>
                                    <converters:AppBarSeparatorVisibilityConverter x:Name="pathToolSeparator">
                                        <ngconv:Binding Value="{x:Bind commands:NavigationBar.IsAddToWorkspaceEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                        <ngconv:Binding Value="{x:Bind commands:NavigationBar.IsAddToFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                        <ngconv:Binding Value="{x:Bind commands:NavigationBar.IsRemoveFromFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                    </converters:AppBarSeparatorVisibilityConverter>
                                    <converters:AppBarSeparatorVisibilityConverter x:Name="pathTemplateSeparator">
                                        <ngconv:Binding Value="{x:Bind commands:NavigationBar.IsSetWorkspaceTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                        <ngconv:Binding Value="{x:Bind commands:NavigationBar.IsSetFolderTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                    </converters:AppBarSeparatorVisibilityConverter>
                                </Button.Resources>
                                <Button.Flyout>
                                    <MenuFlyout Placement="BottomEdgeAlignedLeft">
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource CopyPathCommand}" />
                                        <MenuFlyoutSeparator />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInNewTabCommand}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInNewWindowCommand}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInFileExplorerCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsOpenInFileExplorerEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInCommandPromptCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsOpenInCommandPromptEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInPowershellCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsOpenInPowershellEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource OpenPathInWindowsTerminalCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsOpenInWindowsTerminalEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />

                                        <MenuFlyoutSeparator Visibility="{x:Bind pathToolSeparator.Output, Mode=OneWay}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource AddPathToWorkspaceCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsAddToWorkspaceEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource AddPathToFavoritesCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsAddToFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource RemovePathFromFavoritesCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsRemoveFromFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />

                                        <MenuFlyoutSeparator Visibility="{x:Bind pathTemplateSeparator.Output, Mode=OneWay}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource SetPathWorkspaceTemplateCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsSetWorkspaceTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource SetPathFolderTemplateCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsSetFolderTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />

                                        <MenuFlyoutSeparator Visibility="{x:Bind pathTemplateSeparator.Output, Mode=OneWay}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource SharePathCommand}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource PathPropertiesCommand}"
                                                        IsEnabled="{x:Bind commands:NavigationBar.IsPropertiesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                        Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                    </MenuFlyout>
                                </Button.Flyout>
                            </Button>
                            <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                          VerticalScrollBarVisibility="Hidden"
                                          VerticalScrollMode="Disabled"
                                          Grid.Column="1"
                                          Padding="4,0"
                                          Style="{StaticResource TabScrollViewerStyle}">
                                <winui:ItemsRepeater ItemsSource="{x:Bind ViewModel.CurrentTab.Context.PathInfo.Breadcrumbs, Mode=OneWay}"
                                                     VerticalAlignment="Center">
                                    <winui:ItemsRepeater.Layout>
                                        <winui:StackLayout Orientation="Horizontal"
                                                           Spacing="4" />
                                    </winui:ItemsRepeater.Layout>
                                    <winui:ItemsRepeater.ItemTemplate>
                                        <DataTemplate x:DataType="models:Breadcrumb">
                                            <Grid ColumnSpacing="4">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <HyperlinkButton Padding="0"
                                                                 Foreground="{ThemeResource ApplicationForegroundThemeBrush}"
                                                                 CommandParameter="{x:Bind Mode=OneWay}"
                                                                 Command="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbCommand}">
                                                    <TextBlock Text="{x:Bind DisplayName, Mode=OneWay}"
                                                               FontSize="14" />
                                                </HyperlinkButton>
                                                <Button Grid.Column="1"
                                                        Padding="2"
                                                        VerticalAlignment="Stretch"
                                                        Background="Transparent"
                                                        BorderThickness="0"
                                                        Foreground="{ThemeResource ApplicationForegroundThemeBrush}">
                                                    <FontIcon FontFamily="Segoe MDL2 Assets"
                                                              Glyph="&#xE00F;"
                                                              FontSize="10" />
                                                    <Button.Flyout>
                                                        <Flyout Placement="BottomEdgeAlignedLeft">
                                                            <Flyout.FlyoutPresenterStyle>
                                                                <Style TargetType="FlyoutPresenter">
                                                                    <Setter Property="Padding"
                                                                            Value="0,4" />
                                                                </Style>
                                                            </Flyout.FlyoutPresenterStyle>
                                                            <ListView ItemsSource="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbChildren.Children}"
                                                                      MaxHeight="320"
                                                                      MinWidth="240"
                                                                      MaxWidth="320"
                                                                      IsItemClickEnabled="True"
                                                                      Loaded="OnBreadcrumbChildrenLoaded"
                                                                      Unloaded="OnBreadcrumbChildrenUnloaded"
                                                                      ItemClick="OnBreadcrumbChildItemClick"
                                                                      SelectionMode="None"
                                                                      Tag="{x:Bind Mode=OneWay}">
                                                                <ListView.Resources>
                                                                    <converters:NothingToShowConverter x:Key="NothingToShowConverter">
                                                                        <ngconv:Binding Value="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbChildren.IsLoading}" />
                                                                        <ngconv:Binding Value="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbChildren.Children.Count}" />
                                                                    </converters:NothingToShowConverter>
                                                                </ListView.Resources>
                                                                <ListView.Header>
                                                                    <Grid>
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="Auto" />
                                                                            <RowDefinition Height="*" />
                                                                        </Grid.RowDefinitions>
                                                                        <winui:ProgressBar IsIndeterminate="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbChildren.IsLoading}"
                                                                                           Visibility="{Binding Source={StaticResource Locator}, Path=TabbedShell.BreadcrumbChildren.IsLoading}"/>
                                                                        <StackPanel Margin="0,12"
                                                                                    VerticalAlignment="Center"
                                                                                    HorizontalAlignment="Center"
                                                                                    Visibility="{Binding Source={StaticResource NothingToShowConverter}, Path=Output, Mode=OneWay}">
                                                                            <Image HorizontalAlignment="Center"
                                                                                   Width="64"
                                                                                   Height="64">
                                                                                <Image.Source>
                                                                                    <BitmapImage DecodePixelHeight="64"
                                                                                                 DecodePixelWidth="64"
                                                                                                 DecodePixelType="Logical"
                                                                                                 UriSource="/Assets/Icons/Empty.png" />
                                                                                </Image.Source>
                                                                            </Image>
                                                                            <TextBlock Text="Nothing to show"
                                                                                       Style="{StaticResource SubtitleTextBlockStyle}"
                                                                                       FontWeight="Normal"
                                                                                       FontSize="14"
                                                                                       HorizontalAlignment="Center" />
                                                                        </StackPanel>
                                                                    </Grid>
                                                                </ListView.Header>
                                                                <ListView.ItemTemplate>
                                                                    <DataTemplate x:DataType="items:JumpPointItem">
                                                                        <Grid ColumnSpacing="8"
                                                                              ToolTipService.ToolTip="{x:Bind DisplayName, Mode=OneWay}">
                                                                            <Grid.ColumnDefinitions>
                                                                                <ColumnDefinition Width="Auto" />
                                                                                <ColumnDefinition Width="*" />
                                                                            </Grid.ColumnDefinitions>
                                                                            <Image Source="{x:Bind converters:IconConverter.GetImageSource((items:JumpPointItem)), Mode=OneWay}"
                                                                                   Width="20"
                                                                                   Height="20"
                                                                                   Opacity="{x:Bind (items:JumpPointItem), Mode=OneWay, Converter={StaticResource HiddenOpacityConverter}}"/>
                                                                            <TextBlock Text="{x:Bind DisplayName, Mode=OneWay}"
                                                                                       FontSize="14"
                                                                                       Grid.Column="1"
                                                                                       TextTrimming="CharacterEllipsis"/>
                                                                        </Grid>
                                                                    </DataTemplate>
                                                                </ListView.ItemTemplate>
                                                                <i:Interaction.Behaviors>
                                                                    <core:EventTriggerBehavior EventName="ItemClick">
                                                                        <actions:CloseFlyoutAction />
                                                                    </core:EventTriggerBehavior>
                                                                </i:Interaction.Behaviors>
                                                            </ListView>
                                                        </Flyout>
                                                    </Button.Flyout>
                                                </Button>
                                            </Grid>
                                        </DataTemplate>
                                    </winui:ItemsRepeater.ItemTemplate>
                                </winui:ItemsRepeater>
                            </ScrollViewer>
                            <StackPanel Grid.Column="2"
                                        Margin="2"
                                        Orientation="Horizontal">
                                <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                     Command="{StaticResource PinPathCommand}"
                                                     IsCompact="True"
                                                     Visibility="{x:Bind ViewModel.CurrentTab.Context.IsPinned, Mode=OneWay, Converter={StaticResource VisibleWhenFalseConverter}}" />
                                <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                     Command="{StaticResource UnpinPathCommand}"
                                                     IsCompact="True"
                                                     Visibility="{x:Bind ViewModel.CurrentTab.Context.IsPinned, Mode=OneWay}" />
                                <controls:IconButton Command="{StaticResource EditPathCommand}"
                                                     IsCompact="True" />
                            </StackPanel>
                        </Grid>
                        <AutoSuggestBox Grid.Row="1"
                                        Grid.Column="1"
                                        Margin="4,0"
                                        CornerRadius="4"
                                        QueryIcon="Forward"
                                        x:Name="txtPathQuery"
                                        x:Load="{x:Bind ViewModel.IsEditingPath, Mode=OneWay}"
                                        Text="{x:Bind ViewModel.PathQuery, Mode=TwoWay}">
                            <i:Interaction.Behaviors>
                                <core:EventTriggerBehavior EventName="Loaded">
                                    <actions:FocusAction />
                                </core:EventTriggerBehavior>
                                <core:EventTriggerBehavior EventName="QuerySubmitted">
                                    <core:InvokeCommandAction Command="{x:Bind ViewModel.CommitPathCommand}" />
                                </core:EventTriggerBehavior>
                                <core:EventTriggerBehavior EventName="GotFocus">
                                    <jpactions:SelectAllAutoSuggestBoxAction />
                                </core:EventTriggerBehavior>
                                <core:EventTriggerBehavior EventName="LostFocus">
                                    <core:InvokeCommandAction Command="{x:Bind ViewModel.RollbackPathCommand}" />
                                </core:EventTriggerBehavior>
                            </i:Interaction.Behaviors>
                        </AutoSuggestBox>

                        <StackPanel Grid.Row="1"
                                    Grid.Column="2"
                                    Spacing="4"
                                    Orientation="Horizontal">
                            <Button x:Name="btnSupportDeveloper"
                                    VerticalAlignment="Stretch"
                                    Background="Transparent"
                                    BorderThickness="0">
                                <Button.Resources>
                                    <winui:TeachingTip x:Name="supportDeveloperTip"
                                                       Target="{x:Bind btnSupportDeveloper}"
                                                       IsLightDismissEnabled="True"
                                                       PreferredPlacement="BottomRight"
                                                       Title="Support the Developer"
                                                       Subtitle="Loving the app? Your support is much appreciated."
                                                       IsOpen="False"
                                                       Background="Transparent">

                                        <winui:TeachingTip.IconSource>
                                            <winui:BitmapIconSource ShowAsMonochrome="False"
                                                                    UriSource="/Assets/Icons/Support.png" />
                                        </winui:TeachingTip.IconSource>
                                        <winui:TeachingTip.Content>
                                            <StackPanel Spacing="4">
                                                <TextBlock Text="Your donations are deeply appreciated and will help in making Jump Point more awesome."
                                                           TextWrapping="WrapWholeWords" />
                                                <winui:ProgressBar IsIndeterminate="{x:Bind ViewModel.LoadAddOnsCommand.IsRunning, Mode=OneWay}"
                                                                   Visibility="{x:Bind ViewModel.LoadAddOnsCommand.IsRunning, Mode=OneWay}" />
                                                <Pivot Margin="-12,0">
                                                    <Pivot.HeaderTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Style="{StaticResource BodyTextBlockStyle}"
                                                                       FontWeight="SemiBold"
                                                                       Text="{Binding}" />
                                                        </DataTemplate>
                                                    </Pivot.HeaderTemplate>
                                                    <PivotItem Header="Monthly"
                                                               Margin="12,0">
                                                        <winui:ItemsRepeater ItemsSource="{x:Bind ViewModel.Subscriptions, Mode=OneWay}">
                                                            <winui:ItemsRepeater.Layout>
                                                                <winui:UniformGridLayout MinColumnSpacing="4"
                                                                                         MinRowSpacing="4"
                                                                                         ItemsJustification="Start"
                                                                                         ItemsStretch="Fill"
                                                                                         MinItemWidth="75"
                                                                                         MinItemHeight="50" />
                                                            </winui:ItemsRepeater.Layout>
                                                            <DataTemplate x:DataType="store:SubscriptionAddOn">
                                                                <Button HorizontalAlignment="Stretch"
                                                                        HorizontalContentAlignment="Center"
                                                                        VerticalAlignment="Stretch"
                                                                        VerticalContentAlignment="Center"
                                                                        Background="Transparent"
                                                                        CommandParameter="{x:Bind}"
                                                                        Command="{Binding Source={StaticResource Locator}, Path=TabbedShell.PurchaseAddOnCommand}"
                                                                        BorderThickness="0">
                                                                    <Grid>
                                                                        <TextBlock Text="{x:Bind Price, Mode=OneWay}"
                                                                                   Visibility="{x:Bind IsActive, Mode=OneWay, Converter={StaticResource VisibleWhenFalseConverter}}" />
                                                                        <Image Source="/Assets/Icons/Celebrate.png"
                                                                               Visibility="{x:Bind IsActive, Mode=OneWay}"
                                                                               Width="20"
                                                                               Height="20" />
                                                                    </Grid>
                                                                </Button>
                                                            </DataTemplate>
                                                        </winui:ItemsRepeater>
                                                    </PivotItem>
                                                    <PivotItem Header="One-Time"
                                                               Margin="12,0">
                                                        <winui:ItemsRepeater ItemsSource="{x:Bind ViewModel.Durables, Mode=OneWay}">
                                                            <winui:ItemsRepeater.Layout>
                                                                <winui:UniformGridLayout MinColumnSpacing="4"
                                                                                         MinRowSpacing="4"
                                                                                         ItemsJustification="Start"
                                                                                         ItemsStretch="Fill"
                                                                                         MinItemWidth="75"
                                                                                         MinItemHeight="50" />
                                                            </winui:ItemsRepeater.Layout>
                                                            <DataTemplate x:DataType="store:DurableAddOn">
                                                                <Button HorizontalAlignment="Stretch"
                                                                        HorizontalContentAlignment="Center"
                                                                        VerticalAlignment="Stretch"
                                                                        VerticalContentAlignment="Center"
                                                                        Background="Transparent"
                                                                        CommandParameter="{x:Bind}"
                                                                        Command="{Binding Source={StaticResource Locator}, Path=TabbedShell.PurchaseAddOnCommand}"
                                                                        BorderThickness="0">
                                                                    <Grid>
                                                                        <TextBlock Text="{x:Bind Price, Mode=OneWay}"
                                                                                   Visibility="{x:Bind IsActive, Mode=OneWay, Converter={StaticResource VisibleWhenFalseConverter}}" />
                                                                        <Image Source="/Assets/Icons/Celebrate.png"
                                                                               Visibility="{x:Bind IsActive, Mode=OneWay}"
                                                                               Width="20"
                                                                               Height="20" />
                                                                    </Grid>
                                                                </Button>
                                                            </DataTemplate>
                                                        </winui:ItemsRepeater>
                                                    </PivotItem>
                                                </Pivot>

                                                <TextBlock Text="You could also:"
                                                           FontWeight="SemiBold"
                                                           Margin="0,8,0,0" />
                                                <Button Content="Manage Subscriptions"
                                                        HorizontalAlignment="Stretch"
                                                        Command="{x:Bind ViewModel.ManageSubscriptionsCommand}" />
                                                <Button Content="Rate us on the Microsoft Store"
                                                        HorizontalAlignment="Stretch"
                                                        Command="{x:Bind ViewModel.RateCommand}" />
                                                <Button Content="Submit an issue on Github"
                                                        HorizontalAlignment="Stretch"
                                                        Command="{x:Bind ViewModel.GithubIssueCommand}" />
                                            </StackPanel>
                                        </winui:TeachingTip.Content>
                                    </winui:TeachingTip>
                                </Button.Resources>
                                <Image Width="18"
                                       Height="18">
                                    <Image.Source>
                                        <BitmapImage DecodePixelHeight="18"
                                                     DecodePixelWidth="18"
                                                     DecodePixelType="Logical"
                                                     UriSource="/Assets/Icons/Support.png" />
                                    </Image.Source>
                                </Image>
                                <i:Interaction.Behaviors>
                                    <core:EventTriggerBehavior EventName="Click">
                                        <core:ChangePropertyAction TargetObject="{x:Bind supportDeveloperTip}"
                                                                   PropertyName="IsOpen">
                                            <core:ChangePropertyAction.Value>
                                                <x:Boolean>True</x:Boolean>
                                            </core:ChangePropertyAction.Value>
                                        </core:ChangePropertyAction>
                                    </core:EventTriggerBehavior>
                                </i:Interaction.Behaviors>
                            </Button>
                            <controls:IconButton Command="{StaticResource MoreCommand}"
                                                 IsCompact="True">
                                <controls:IconButton.Flyout>
                                    <MenuFlyout Placement="BottomEdgeAlignedRight">
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                        Command="{StaticResource NewTabCommand}" />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                        Command="{StaticResource NewWindowCommand}" />
                                        <MenuFlyoutSubItem Text="New Item">
                                            <MenuFlyoutSubItem.Icon>
                                                <IconSourceElement IconSource="{StaticResource NewItemIcon}" />
                                            </MenuFlyoutSubItem.Icon>
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                            Command="{StaticResource NewFileCommand}"
                                                            IsEnabled="{x:Bind commands:NavigationBar.IsNewFileEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                            Command="{StaticResource NewFolderCommand}"
                                                            IsEnabled="{x:Bind commands:NavigationBar.IsNewFolderEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                            Command="{StaticResource NewWorkspaceCommand}" />
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                            Command="{StaticResource NewAppLinkCommand}" />
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                            Command="{StaticResource MoreNewItemsCommand}"
                                                            IsEnabled="{x:Bind commands:NavigationBar.IsMoreNewItemsEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                        </MenuFlyoutSubItem>
                                        <MenuFlyoutSeparator />
                                        <MenuFlyoutSubItem Text="Layout">
                                            <MenuFlyoutSubItem.Icon>
                                                <IconSourceElement IconSource="{StaticResource LayoutIcon}" />
                                            </MenuFlyoutSubItem.Icon>
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GridLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGridLayout, Mode=TwoWay}" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource DetailsLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsDetailsLayout, Mode=TwoWay}" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource TilesLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsTilesLayout, Mode=TwoWay}" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource ListLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsListLayout, Mode=TwoWay}" />
                                        </MenuFlyoutSubItem>
                                        <MenuFlyoutSubItem Text="Show/Hide">
                                            <MenuFlyoutSubItem.Icon>
                                                <IconSourceElement IconSource="{StaticResource ShowHideIcon}" />
                                            </MenuFlyoutSubItem.Icon>
                                            <ToggleMenuFlyoutItem Text="Item Checkbox"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowCheckbox, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource ItemCheckboxIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="File Extension"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowFileExtension, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource FileExtensionIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Hidden Items"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowHiddenItems, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource HiddenItemsIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Details Pane"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowDetailsPane, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource DetailsPaneIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <MenuFlyoutSeparator />
                                            <ToggleMenuFlyoutItem Text="Back button"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowBack, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource BackIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Forward button"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowForward, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource ForwardIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Up button"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowUp, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource UpIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Refresh button"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowRefresh, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource RefreshIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                            <ToggleMenuFlyoutItem Text="Dashboard button"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowDashboard, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource DashboardIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                        </MenuFlyoutSubItem>
                                        <MenuFlyoutSeparator />
                                        <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                        Command="{StaticResource SettingsCommand}" />
                                    </MenuFlyout>
                                </controls:IconButton.Flyout>
                            </controls:IconButton>
                        </StackPanel>

                        <Grid x:Name="paneToolBar"
                              Grid.Row="2"
                              Grid.ColumnSpan="3"
                              Margin="0,4,0,0"
                              Visibility="{x:Bind converters:VisibilityConverter.IsToolbarVisible(ViewModel.CurrentTab.Context.PathInfo.Type), Mode=OneWay}">
                            <Grid.ChildrenTransitions>
                                <TransitionCollection>
                                    <RepositionThemeTransition />
                                </TransitionCollection>
                            </Grid.ChildrenTransitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <ScrollViewer HorizontalScrollBarVisibility="Auto"
                                          VerticalScrollBarVisibility="Hidden"
                                          VerticalScrollMode="Disabled"
                                          Style="{StaticResource TabScrollViewerStyle}">
                                <StackPanel Orientation="Horizontal"
                                            Spacing="4">
                                    <StackPanel.Resources>
                                        <SolidColorBrush x:Key="ButtonBackgroundDisabled"
                                                         Color="Transparent" />
                                    </StackPanel.Resources>
                                    <controls:IconButton Command="{StaticResource NewItemCommand}"
                                                         Content="New">
                                        <controls:IconButton.Flyout>
                                            <MenuFlyout Placement="BottomEdgeAlignedLeft">
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                                Command="{StaticResource NewFileCommand}"
                                                                IsEnabled="{x:Bind commands:NavigationBar.IsNewFileEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                                Command="{StaticResource NewFolderCommand}"
                                                                IsEnabled="{x:Bind commands:NavigationBar.IsNewFolderEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                                Command="{StaticResource NewWorkspaceCommand}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                                Command="{StaticResource NewAppLinkCommand}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab, Mode=OneWay}"
                                                                Command="{StaticResource MoreNewItemsCommand}"
                                                                IsEnabled="{x:Bind commands:NavigationBar.IsMoreNewItemsEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                            </MenuFlyout>
                                        </controls:IconButton.Flyout>
                                    </controls:IconButton>
                                    <controls:IconSplitButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                              Command="{StaticResource CopyCommand}"
                                                              IsPrimaryButtonEnabled="{x:Bind commands:Toolbar.IsCopyEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                              IsCompact="True">
                                        <controls:IconSplitButton.Flyout>
                                            <MenuFlyout Placement="BottomEdgeAlignedRight">
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource CutCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsCutEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                                <MenuFlyoutItem Command="{StaticResource ClipboardManagerCommand}" />
                                                <MenuFlyoutSeparator />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource CopyItemsPathCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsCopyItemsPathEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                            </MenuFlyout>
                                        </controls:IconSplitButton.Flyout>
                                    </controls:IconSplitButton>
                                    <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                         Command="{StaticResource PasteCommand}"
                                                         IsEnabled="{x:Bind commands:Toolbar.IsPasteEnabled(ViewModel.CurrentTab.Context, ViewModel.CommandHelper.ClipboardHasFiles), Mode=OneWay}"
                                                         IsCompact="True"/>
                                    <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                         Command="{StaticResource RenameCommand}"
                                                         IsEnabled="{x:Bind commands:Toolbar.IsRenameEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                         IsCompact="True"/>
                                    <controls:IconSplitButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                              Command="{StaticResource DeleteCommand}"
                                                              IsPrimaryButtonEnabled="{x:Bind commands:Toolbar.IsDeleteEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                              IsCompact="True">
                                        <controls:IconSplitButton.Flyout>
                                            <MenuFlyout Placement="BottomEdgeAlignedRight">
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource DeletePermanentlyCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsDeletePermanentlyEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                            </MenuFlyout>
                                        </controls:IconSplitButton.Flyout>
                                    </controls:IconSplitButton>
                                    <AppBarSeparator />
                                    <controls:IconSplitButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                              Command="{StaticResource OpenCommand}"
                                                              IsPrimaryButtonEnabled="{x:Bind commands:Toolbar.IsOpenEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}">
                                        <controls:IconSplitButton.Flyout>
                                            <MenuFlyout Placement="BottomEdgeAlignedRight">
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenWithCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenWithEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenItemsInNewWindowCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenInNewWindowEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenItemsInFileExplorerCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenInFileExplorerEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenItemsInCommandPromptCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenInCommandPromptEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenItemsInPowershellCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenInPowershellEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource OpenItemsInWindowsTerminalCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsOpenInWindowsTerminalEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                            </MenuFlyout>
                                        </controls:IconSplitButton.Flyout>
                                    </controls:IconSplitButton>
                                    <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                         Command="{StaticResource DownloadItemsCommand}"
                                                         IsEnabled="{x:Bind commands:Toolbar.IsDownloadEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                         IsCompact="True"
                                                         Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}"/>
                                    <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                         Command="{StaticResource ShareItemsCommand}"
                                                         IsEnabled="{x:Bind commands:Toolbar.IsShareEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                         IsCompact="True" />
                                    <controls:IconButton CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                         Command="{StaticResource ItemsPropertiesCommand}"
                                                         IsEnabled="{x:Bind commands:Toolbar.IsPropertiesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                         IsCompact="True" />
                                    <AppBarSeparator />
                                    <controls:IconButton IconSource="{StaticResource ToolsIcon}"
                                                         Content="Tools">
                                        <controls:IconButton.Resources>
                                            <converters:AppBarSeparatorVisibilityConverter x:Name="itemsTemplateSeparator">
                                                <ngconv:Binding Value="{x:Bind commands:Toolbar.IsSetWorkspaceTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                                <ngconv:Binding Value="{x:Bind commands:Toolbar.IsSetFolderTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}" />
                                            </converters:AppBarSeparatorVisibilityConverter>
                                        </controls:IconButton.Resources>
                                        <controls:IconButton.Flyout>
                                            <MenuFlyout Placement="BottomEdgeAlignedLeft">
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource AddItemsToWorkspaceCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsAddToWorkspaceEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource AddItemsToFavoritesCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsAddToFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource RemoveItemsFromFavoritesCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsRemoveFromFavoritesEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutSeparator Visibility="{x:Bind itemsTemplateSeparator.Output, Mode=OneWay}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource SetItemsWorkspaceTemplateCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsSetWorkspaceTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource SetItemsFolderTemplateCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsSetFolderTemplateEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"
                                                                Visibility="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsEnabled}" />
                                                <MenuFlyoutSeparator />
                                                <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                                Command="{StaticResource MoreToolsCommand}"
                                                                IsEnabled="{x:Bind commands:Toolbar.IsMoreToolsEnabled(ViewModel.CurrentTab.Context), Mode=OneWay}"/>
                                            </MenuFlyout>
                                        </controls:IconButton.Flyout>
                                    </controls:IconButton>
                                </StackPanel>
                            </ScrollViewer>
                            <StackPanel Grid.Column="1"
                                        Margin="8,0,0,0"
                                        Orientation="Horizontal"
                                        Spacing="4">
                                <ToggleButton IsChecked="{x:Bind ViewModel.CurrentTab.Context.IsSearching, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                              Background="Transparent"
                                              Padding="8,3,8,4"
                                              BorderThickness="0"
                                              VerticalAlignment="Stretch"
                                              ToolTipService.ToolTip="Search (Control+F)">
                                    <IconSourceElement IconSource="{StaticResource SearchIcon}" />
                                    <ToggleButton.KeyboardAccelerators>
                                        <KeyboardAccelerator Modifiers="Control" Key="F" />
                                    </ToggleButton.KeyboardAccelerators>
                                </ToggleButton>
                                <controls:IconButton Command="{StaticResource LayoutCommand}"
                                                     IsCompact="True">
                                    <controls:IconButton.Flyout>
                                        <MenuFlyout Placement="Bottom">
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GridLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGridLayout, Mode=TwoWay}"
                                                                       GroupName="Layout" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource DetailsLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsDetailsLayout, Mode=TwoWay}"
                                                                       GroupName="Layout" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource TilesLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsTilesLayout, Mode=TwoWay}"
                                                                       GroupName="Layout" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource ListLayoutCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsListLayout, Mode=TwoWay}"
                                                                       GroupName="Layout" />
                                            <MenuFlyoutSeparator />
                                            <ToggleMenuFlyoutItem Text="Details Pane"
                                                                  IsChecked="{x:Bind helpers:ServiceLocator.AppSettings.ShowDetailsPane, Mode=TwoWay}">
                                                <ToggleMenuFlyoutItem.Icon>
                                                    <IconSourceElement IconSource="{StaticResource DetailsPaneIcon}" />
                                                </ToggleMenuFlyoutItem.Icon>
                                            </ToggleMenuFlyoutItem>
                                        </MenuFlyout>
                                    </controls:IconButton.Flyout>
                                </controls:IconButton>
                                <controls:IconButton Command="{StaticResource SortByCommand}"
                                                     IsCompact="True">
                                    <controls:IconButton.Flyout>
                                        <MenuFlyout Placement="BottomEdgeAlignedRight">
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortByNameCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortByName, Mode=TwoWay}"
                                                                       GroupName="SortBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortByDateModifiedCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortByDateModified, Mode=TwoWay}"
                                                                       GroupName="SortBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortByDisplayTypeCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortByDisplayType, Mode=TwoWay}"
                                                                       GroupName="SortBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortBySizeCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortBySize, Mode=TwoWay}"
                                                                       GroupName="SortBy" />
                                            <MenuFlyoutSeparator />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortByAscendingCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortAscending, Mode=TwoWay}"
                                                                       GroupName="SortDirection" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource SortByDescendingCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsSortDescending, Mode=TwoWay}"
                                                                       GroupName="SortDirection" />
                                        </MenuFlyout>
                                    </controls:IconButton.Flyout>
                                </controls:IconButton>
                                <controls:IconButton Command="{StaticResource GroupByCommand}"
                                                     IsCompact="True">
                                    <controls:IconButton.Flyout>
                                        <MenuFlyout Placement="BottomEdgeAlignedRight">
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByNoneCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupByNone, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByNameCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupByName, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByDateModifiedCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupByDateModified, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByDisplayTypeCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupByDisplayType, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupBySizeCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupBySize, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByItemTypeCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupByItemType, Mode=TwoWay}"
                                                                       IsEnabled="{x:Bind ViewModel.CurrentTab.Context.HasCustomGrouping, Mode=OneWay, Converter={StaticResource NegateBooleanConverter}}"
                                                                       GroupName="GroupBy" />
                                            <MenuFlyoutSeparator />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByAscendingCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupAscending, Mode=TwoWay}"
                                                                       GroupName="GroupDirection" />
                                            <winui:RadioMenuFlyoutItem Command="{StaticResource GroupByDescendingCommand}"
                                                                       IsChecked="{x:Bind ViewModel.CurrentTab.Context.Settings.IsGroupDescending, Mode=TwoWay}"
                                                                       GroupName="GroupDirection" />
                                        </MenuFlyout>
                                    </controls:IconButton.Flyout>
                                </controls:IconButton>
                                <controls:IconButton Command="{StaticResource SelectCommand}"
                                                     IsCompact="True">
                                    <controls:IconButton.Flyout>
                                        <MenuFlyout Placement="BottomEdgeAlignedRight">
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                            Command="{StaticResource SelectAllCommand}" />
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                            Command="{StaticResource SelectNoneCommand}" />
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                            Command="{StaticResource InvertSelectionCommand}" />
                                        </MenuFlyout>
                                    </controls:IconButton.Flyout>
                                </controls:IconButton>
                            </StackPanel>
                        </Grid>
                    </Grid>
                </Grid>
            </controls:PanedTabView2.TabStripContent>
            <controls:PanedTabView2.DetailsPane>
                <Grid Padding="16">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Details"
                               Style="{StaticResource SubtitleTextBlockStyle}"/>
                    <controls:IconButton Grid.Column="1"
                                         IsCompact="True"
                                         IconSource="{StaticResource CloseTabIcon}"
                                         Command="{x:Bind ViewModel.CloseDetailsPaneCommand}" />
                    <ScrollViewer Grid.Row="1"
                                  Grid.ColumnSpan="2"
                                  Margin="-16,0,-16,-16">
                        <StackPanel Margin="16,12,16,64">
                            <Grid Visibility="{x:Bind ViewModel.CurrentTab.Context.Items.Count, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}"
                                  Margin="0,0,0,16">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <TextBlock FontWeight="SemiBold"
                                           FontSize="16">
                                    <Run Text="Contains" />
                                    <Run Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('item', ViewModel.CurrentTab.Context.Items.Count, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}" />
                                </TextBlock>
                                <TextBlock Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
                                           Grid.Row="1"
                                           Visibility="{x:Bind ViewModel.CurrentTab.Context.ItemStats.FileSize, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}">
                                    <Run Text="{x:Bind ViewModel.CurrentTab.Context.ItemStats.FileSize, Converter={StaticResource ByteSizeConverter}, Mode=OneWay}" />
                                    <Run Text="{x:Bind ViewModel.CurrentTab.Context.ItemStats.HasItemsWithNoSizes, Converter={StaticResource HasNullFileSizeIndicatorConverter}, Mode=OneWay}" />
                                </TextBlock>
                                <controls:IconButton Grid.Column="1"
                                                     IconSource="{StaticResource ChevronDownIcon}"
                                                     IsCompact="True"
                                                     Flyout="{StaticResource AllItemsFlyout}" />
                            </Grid>
                            
                            <ContentControl HorizontalAlignment="Stretch"
                                            HorizontalContentAlignment="Stretch"
                                            Content="{x:Bind ViewModel.CurrentTab.Context.Item, Mode=OneWay}"
                                            Visibility="{x:Bind ViewModel.CurrentTab.Context.Item, Mode=OneWay, Converter={StaticResource CollapsedWhenNullConverter}}"
                                            Margin="0,0,0,8">
                                <ContentControl.ContentTemplateSelector>
                                    <jpselectors:ItemDetailsTemplateSelector>
                                        <jpselectors:ItemDetailsTemplateSelector.Drive>
                                            <DataTemplate x:DataType="items:DriveBase">
                                                <controls:DriveDetails Drive="{x:Bind Mode=OneWay}"
                                                                       IsInDetailsPane="True" />
                                            </DataTemplate>
                                        </jpselectors:ItemDetailsTemplateSelector.Drive>
                                        <jpselectors:ItemDetailsTemplateSelector.Folder>
                                            <DataTemplate x:DataType="items:FolderBase">
                                                <controls:FolderDetails Folder="{x:Bind Mode=OneWay}"
                                                                        IsInDetailsPane="True" />
                                            </DataTemplate>
                                        </jpselectors:ItemDetailsTemplateSelector.Folder>
                                        <jpselectors:ItemDetailsTemplateSelector.File>
                                            <DataTemplate x:DataType="items:FileBase">
                                                <controls:FileDetails File="{x:Bind Mode=OneWay}"
                                                                      IsInDetailsPane="True" />
                                            </DataTemplate>
                                        </jpselectors:ItemDetailsTemplateSelector.File>
                                        <jpselectors:ItemDetailsTemplateSelector.Workspace>
                                            <DataTemplate x:DataType="items:Workspace">
                                                <controls:WorkspaceDetails Workspace="{x:Bind Mode=OneWay}"
                                                                           IsInDetailsPane="True" />
                                            </DataTemplate>
                                        </jpselectors:ItemDetailsTemplateSelector.Workspace>
                                        <jpselectors:ItemDetailsTemplateSelector.AppLink>
                                            <DataTemplate x:DataType="items:AppLink">
                                                <controls:AppLinkDetails AppLink="{x:Bind Mode=OneWay}"
                                                                         IsInDetailsPane="True" />
                                            </DataTemplate>
                                        </jpselectors:ItemDetailsTemplateSelector.AppLink>
                                    </jpselectors:ItemDetailsTemplateSelector>
                                </ContentControl.ContentTemplateSelector>
                            </ContentControl>

                            <Grid Visibility="{x:Bind ViewModel.CurrentTab.Context.Item, Mode=OneWay, Converter={StaticResource VisibleWhenNullConverter}}"
                                  Margin="0,0,0,8"
                                  RowSpacing="4"
                                  ColumnSpacing="8">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Viewbox Width="28"
                                         Height="28">
                                    <IconSourceElement IconSource="{x:Bind converters:IconConverter.GetPathTypeIconSource(ViewModel.CurrentTab.Context.PathInfo.Type, ViewModel.CurrentTab.Context.PathInfo.Tag), Mode=OneWay}" />
                                </Viewbox>
                                <TextBlock Text="{x:Bind ViewModel.CurrentTab.Context.PathInfo.DisplayName, Mode=OneWay}"
                                           Grid.Column="1"
                                           Margin="8,0"
                                           TextTrimming="CharacterEllipsis"
                                           VerticalAlignment="Center"
                                           FontSize="16"
                                           FontWeight="SemiBold"
                                           FontStyle="{x:Bind gtext:FontStyleExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStyle), Mode=OneWay}"
                                           FontStretch="{x:Bind gtext:FontStretchExtensions.ToPlatform(helpers:ServiceLocator.AppSettings.FontStretch), Mode=OneWay}">
                                    <i:Interaction.Behaviors>
                                        <behaviors:FontFamilyBehavior FontFamily="{x:Bind helpers:ServiceLocator.AppSettings.Font, Mode=OneWay, Converter={StaticResource FontFamilyConverter}}" />
                                    </i:Interaction.Behaviors>
                                </TextBlock>

                                <TextBlock Text="Path:"
                                           Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
                                           Grid.Row="1" />
                                <TextBlock Text="{x:Bind ViewModel.CurrentTab.Context.PathInfo.Path, Mode=OneWay}"
                                           Grid.Row="1"
                                           Grid.Column="1"
                                           TextWrapping="Wrap" />

                                <winui:SplitButton Grid.Row="2"
                                                   Grid.ColumnSpan="2"
                                                   Margin="0,4"
                                                   HorizontalAlignment="Stretch"
                                                   CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                   Command="{x:Bind ViewModel.OpenPathInNewTabCommand}">
                                    <StackPanel Orientation="Horizontal"
                                                Spacing="8">
                                        <IconSourceElement IconSource="{StaticResource OpenPathInNewTabIcon}" />
                                        <TextBlock Text="Open in New Tab" />
                                    </StackPanel>
                                    <winui:SplitButton.Flyout>
                                        <MenuFlyout Placement="BottomEdgeAlignedRight">
                                            <MenuFlyoutItem CommandParameter="{x:Bind ViewModel.CurrentTab.Context, Mode=OneWay}"
                                                            Command="{StaticResource OpenPathInNewWindowCommand}" />
                                        </MenuFlyout>
                                    </winui:SplitButton.Flyout>
                                </winui:SplitButton>

                                <MenuFlyoutSeparator Grid.ColumnSpan="2"
                                                     Grid.Row="3" />
                            </Grid>

                            <Grid Visibility="{x:Bind ViewModel.CurrentTab.Context.SelectedItems.Count, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}"
                                  Margin="0,4,0,16">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('selected item', ViewModel.CurrentTab.Context.SelectedItems.Count, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                                           FontWeight="SemiBold"
                                           FontSize="16" />
                                <TextBlock Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
                                           Visibility="{x:Bind ViewModel.CurrentTab.Context.SelectedItemStats.FileSize, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}"
                                           Grid.Row="1">
                                    <Run Text="{x:Bind ViewModel.CurrentTab.Context.SelectedItemStats.FileSize, Converter={StaticResource ByteSizeConverter}, Mode=OneWay}" />
                                    <Run Text="{x:Bind ViewModel.CurrentTab.Context.SelectedItemStats.HasItemsWithNoSizes, Converter={StaticResource HasNullFileSizeIndicatorConverter}, Mode=OneWay}" />
                                </TextBlock>
                                <controls:IconButton Grid.Column="1"
                                                     IconSource="{StaticResource ChevronDownIcon}"
                                                     IsCompact="True"
                                                     Flyout="{StaticResource SelectedItemsFlyout}"/>
                            </Grid>

                            <winui:ItemsRepeater ItemsSource="{x:Bind ViewModel.CurrentTab.Context.SelectedItems, Mode=OneWay}">
                                <winui:ItemsRepeater.Layout>
                                    <winui:StackLayout Orientation="Vertical"
                                                       Spacing="8"/>
                                </winui:ItemsRepeater.Layout>
                                <jpselectors:ItemDetailsTemplateSelector>
                                    <jpselectors:ItemDetailsTemplateSelector.Drive>
                                        <DataTemplate x:DataType="items:DriveBase">
                                            <controls:DriveDetails Drive="{x:Bind Mode=OneWay}"
                                                                   IsInDetailsPane="True"/>
                                        </DataTemplate>
                                    </jpselectors:ItemDetailsTemplateSelector.Drive>
                                    <jpselectors:ItemDetailsTemplateSelector.Folder>
                                        <DataTemplate x:DataType="items:FolderBase">
                                            <controls:FolderDetails Folder="{x:Bind Mode=OneWay}"
                                                                    IsInDetailsPane="True"/>
                                        </DataTemplate>
                                    </jpselectors:ItemDetailsTemplateSelector.Folder>
                                    <jpselectors:ItemDetailsTemplateSelector.File>
                                        <DataTemplate x:DataType="items:FileBase">
                                            <controls:FileDetails File="{x:Bind Mode=OneWay}"
                                                                  IsInDetailsPane="True"/>
                                        </DataTemplate>
                                    </jpselectors:ItemDetailsTemplateSelector.File>
                                    <jpselectors:ItemDetailsTemplateSelector.Workspace>
                                        <DataTemplate x:DataType="items:Workspace">
                                            <controls:WorkspaceDetails Workspace="{x:Bind Mode=OneWay}"
                                                                       IsInDetailsPane="True"/>
                                        </DataTemplate>
                                    </jpselectors:ItemDetailsTemplateSelector.Workspace>
                                    <jpselectors:ItemDetailsTemplateSelector.AppLink>
                                        <DataTemplate x:DataType="items:AppLink">
                                            <controls:AppLinkDetails AppLink="{x:Bind Mode=OneWay}"
                                                                     IsInDetailsPane="True"/>
                                        </DataTemplate>
                                    </jpselectors:ItemDetailsTemplateSelector.AppLink>
                                </jpselectors:ItemDetailsTemplateSelector>
                            </winui:ItemsRepeater>
                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </controls:PanedTabView2.DetailsPane>
            <i:Interaction.Behaviors>
                <core:EventTriggerBehavior EventName="ItemInvoked">
                    <core:InvokeCommandAction Command="{x:Bind ViewModel.ShellItemCommand}"
                                              InputConverter="{StaticResource NavigationViewItemInvokedEventArgsConverter}" />
                </core:EventTriggerBehavior>
            </i:Interaction.Behaviors>
        </controls:PanedTabView2>

        <winui:TeachingTip x:Name="notifyGrantAccess"
                           Title="GRANT ACCESS"
                           Subtitle="File System"
                           ShouldConstrainToRootBounds="True"
                           PreferredPlacement="Top"
                           IsLightDismissEnabled="False"
                           IsOpen="False"
                           Grid.Row="2"
                           Target="{x:Bind statusBar}">
            <winui:TeachingTip.IconSource>
                <winui:FontIconSource Glyph="&#xE1F6;" />
            </winui:TeachingTip.IconSource>
            <winui:TeachingTip.HeroContent>
                <Image Source="/Assets/Screens/grant access.png" />
            </winui:TeachingTip.HeroContent>
            <StackPanel Spacing="4">
                <TextBlock Text="You need to grant the app permission to access your file system in settings. You'll need to restart the app once completed."
                           TextWrapping="WrapWholeWords"
                           VerticalAlignment="Center" />
                <Button Style="{StaticResource AccentButtonStyle}"
                        Content="Allow Access"
                        HorizontalAlignment="Right"
                        Click="AllowAccess_Click" />
            </StackPanel>
        </winui:TeachingTip>

        <Grid Grid.Row="1"
              Background="{StaticResource SystemAccentBrush}"
              ColumnSpacing="4"
              x:Name="statusBar">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Button Style="{StaticResource StatusBarButton}"
                    x:Name="btnProblems">
                <Grid>
                    <TextBlock FontFamily="Segoe UI Emoji"
                               Text="&#x2705;"
                               FontSize="14"
                               IsColorFontEnabled="True"
                               x:Name="iconNoProblems"
                               Visibility="{x:Bind Problems.Count, Mode=OneWay, Converter={StaticResource VisibleWhenZeroConverter}}" />
                    <TextBlock FontFamily="Segoe UI Emoji"
                               Text="&#x26A0;"
                               FontSize="14"
                               IsColorFontEnabled="True"
                               x:Name="iconHasProblems"
                               Visibility="{x:Bind Problems.Count, Mode=OneWay, Converter={StaticResource VisibleWhenMoreThanZeroConverter}}" />
                </Grid>
                <Button.Flyout>
                    <Flyout Placement="TopEdgeAlignedLeft"
                            x:Name="flyoutProblems">
                        <Grid Padding="0,0,96,0"
                              RowSpacing="4"
                              MaxHeight="320"
                              Width="320">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <TextBlock Text="PROBLEMS ENCOUNTERED"
                                       FontWeight="SemiBold" />
                            <ScrollViewer Grid.Row="1">
                                <winui:ItemsRepeater ItemsSource="{x:Bind Problems, Mode=OneWay}">
                                    <DataTemplate x:DataType="x:String">
                                        <TextBlock Text="{x:Bind}"
                                                   TextWrapping="WrapWholeWords" />
                                    </DataTemplate>
                                </winui:ItemsRepeater>
                            </ScrollViewer>
                            <StackPanel Orientation="Horizontal"
                                        Margin="0,8,0,0"
                                        Grid.Row="2"
                                        Spacing="8">
                                <Button Content="Clear"
                                        Style="{StaticResource AccentButtonStyle}"
                                        Click="ClearProblems_Click" />
                                <HyperlinkButton Content="Github Issues"
                                                 Foreground="{ThemeResource ApplicationForegroundThemeBrush}"
                                                 NavigateUri="https://github.com/MarkIvanDev/JumpPoint/issues" />
                            </StackPanel>
                        </Grid>
                    </Flyout>
                </Button.Flyout>
            </Button>
            <Button Style="{StaticResource StatusBarButton}"
                    Flyout="{StaticResource AllItemsFlyout}"
                    Grid.Column="1">
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('item', ViewModel.CurrentTab.Context.ItemStats.Total, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Foreground="White" />
            </Button>

            <Button Style="{StaticResource StatusBarButton}"
                    Flyout="{StaticResource SelectedItemsFlyout}"
                    Grid.Column="2">
                <TextBlock Text="{x:Bind humanizer:ToQuantityExtensions.ToQuantity('selected item', ViewModel.CurrentTab.Context.SelectedItems.Count, humanizer:ShowQuantityAs.Numeric), Mode=OneWay}"
                           Foreground="White" />
            </Button>
        </Grid>

        <i:Interaction.Behaviors>
            <core:DataTriggerBehavior Binding="{Binding Tabs.Count}" ComparisonCondition="Equal">
                <core:DataTriggerBehavior.Value>
                    <x:Int32>0</x:Int32>
                </core:DataTriggerBehavior.Value>
                <jpactions:ConsolidateApplicationViewAction />
            </core:DataTriggerBehavior>
        </i:Interaction.Behaviors>
    </Grid>
</controls:PageBase>
