/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Views/Shells/ModernShellPage.xaml
207 строк
7 KB
yair100
Feature: Updated Status Bar design (#18789)
04 авг 2026, 01:51
Не верифицирован
04 авг 2026, 01:51
ca7b24d
Код
Авторство
О чём код?
<!-- Copyright (c) Files Community. Licensed under the MIT License. --> <local:BaseShellPage x:Class="Files.App.Views.Shells.ModernShellPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:helpers="using:Files.App.Helpers" xmlns:local="using:Files.App.Views.Shells" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:uc="using:Files.App.UserControls" xmlns:wct="using:CommunityToolkit.WinUI" xmlns:wctconverters="using:CommunityToolkit.WinUI.Converters" x:Name="RootPage" KeyboardAcceleratorPlacementMode="Hidden" Loaded="Page_Loaded" mc:Ignorable="d"> <local:BaseShellPage.Resources> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Light"> <Thickness x:Key="Local.ActivePane.BorderThickness">1</Thickness> </ResourceDictionary> <ResourceDictionary x:Key="Dark"> <Thickness x:Key="Local.ActivePane.BorderThickness">1</Thickness> </ResourceDictionary> <ResourceDictionary x:Key="HighContrast"> <Thickness x:Key="Local.ActivePane.BorderThickness">3</Thickness> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> </ResourceDictionary> </local:BaseShellPage.Resources> <Grid x:Name="RootGrid" wct:UIElementExtensions.ClipToBounds="True" x:FieldModifier="public" Background="{ThemeResource App.Theme.FileArea.BackgroundBrush}" BackgroundSizing="InnerBorderEdge" BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" BorderThickness="1" CornerRadius="8"> <Grid.Shadow> <ThemeShadow x:Name="ShellContentThemeShadow" x:FieldModifier="public" /> </Grid.Shadow> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Image Grid.RowSpan="3" HorizontalAlignment="{x:Bind ShellViewModel.FolderBackgroundImageHorizontalAlignment, Mode=OneWay}" VerticalAlignment="{x:Bind ShellViewModel.FolderBackgroundImageVerticalAlignment, Mode=OneWay}" Opacity="{x:Bind ShellViewModel.FolderBackgroundImageOpacity, Mode=OneWay}" Source="{x:Bind ShellViewModel.FolderBackgroundImageSource, Mode=OneWay}" Stretch="{x:Bind ShellViewModel.FolderBackgroundImageFit, Mode=OneWay}" /> <!-- Swipe Backward Icon --> <Border x:Name="BackIcon" Grid.RowSpan="3" Width="48" Height="48" Margin="-4,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" wct:VisualExtensions.NormalizedCenterPoint="0.5,0.5" Background="{ThemeResource AccentFillColorDefaultBrush}" BorderBrush="{ThemeResource AccentControlElevationBorderBrush}" BorderThickness="1" Canvas.ZIndex="64" CornerRadius="24"> <FontIcon HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}" Glyph="" /> </Border> <!-- Swipe Forward Icon --> <Border x:Name="ForwardIcon" Grid.RowSpan="3" Width="48" Height="48" Margin="0,0,-4,0" HorizontalAlignment="Right" VerticalAlignment="Center" wct:VisualExtensions.NormalizedCenterPoint="0.5,0.5" Background="{ThemeResource AccentFillColorDefaultBrush}" BorderBrush="{ThemeResource AccentControlElevationBorderBrush}" BorderThickness="1" Canvas.ZIndex="64" CornerRadius="24"> <SymbolIcon HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}" Symbol="Forward" /> </Border> <!-- Search header --> <Grid x:Name="SearchHeader" Grid.Row="0" Padding="26,16,16,16" BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}" BorderThickness="0,0,0,1" Visibility="{x:Bind ShellViewModel.IsSearchResults, Mode=OneWay}"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="12"> <Image Height="24" VerticalAlignment="Center" Source="{x:Bind ShellViewModel.SearchIconBitmapImage, Mode=OneWay}" /> <TextBlock VerticalAlignment="Center" Style="{StaticResource SubtitleTextBlockStyle}" Text="{x:Bind ShellViewModel.SearchHeaderTitle, Mode=OneWay}" /> </StackPanel> </Grid> <!-- Filter header --> <Grid x:Name="FilterHeader" Grid.Row="1" Padding="26,8,12,8" BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}" BorderThickness="0,0,0,1" IsTabStop="False" Visibility="{x:Bind ShellViewModel.ShowFilterHeader, Mode=OneWay}"> <StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="12"> <Image Height="16" VerticalAlignment="Center" Source="{x:Bind ShellViewModel.FolderThumbnailImageSource, Mode=OneWay}" /> <TextBlock VerticalAlignment="Center" Style="{StaticResource BodyStrongTextBlockStyle}" Text="{helpers:ResourceString Name=FilteringFor}" /> <AutoSuggestBox x:Name="FilterTextBox" Width="180" VerticalAlignment="Center" PlaceholderText="{helpers:ResourceString Name=Filename}" PreviewKeyDown="FilterTextBox_PreviewKeyDown" Text="{x:Bind ShellViewModel.FilesAndFoldersFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> </StackPanel> </Grid> <!-- Shell Frame --> <Frame x:Name="ItemDisplayFrame" Grid.Row="2" x:FieldModifier="public" Navigated="ItemDisplayFrame_Navigated" TabIndex="1" /> <!-- Status Bar --> <uc:StatusBar x:Name="StatusBar" Grid.Row="3" ShowInfoText="{x:Bind IsStatusBarVisible, Mode=OneWay}" Visibility="{x:Bind IsStatusBarVisible, Mode=OneWay}" /> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="ShellBorderFocusState"> <VisualState x:Name="ShellBorderFocusOnState"> <VisualState.Setters> <Setter Target="RootGrid.BorderThickness" Value="{ThemeResource Local.ActivePane.BorderThickness}" /> </VisualState.Setters> </VisualState> <VisualState x:Name="ShellBorderFocusOffState"> <VisualState.Setters> <Setter Target="RootGrid.BorderThickness" Value="1" /> </VisualState.Setters> </VisualState> <VisualState x:Name="ShellBorderDualPaneOffState"> <VisualState.Setters> <Setter Target="RootGrid.BorderThickness" Value="1" /> </VisualState.Setters> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="ShellBackgroundFocusState"> <VisualState x:Name="ShellBackgroundFocusOnState"> <VisualState.Setters> <Setter Target="RootGrid.Background" Value="{ThemeResource App.Theme.FileArea.BackgroundBrush}" /> </VisualState.Setters> </VisualState> <VisualState x:Name="ShellBackgroundFocusOffState"> <VisualState.Setters> <Setter Target="RootGrid.Background" Value="{ThemeResource App.Theme.FileArea.SecondaryBackgroundBrush}" /> </VisualState.Setters> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Grid> </local:BaseShellPage>