|
| 1 | +<!-- Copyright (c) Files Community. Licensed under the MIT License. --> |
| 2 | +<ResourceDictionary |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:local="using:Files.App.Controls"> |
| 6 | + |
| 7 | + <!--<ResourceDictionary.ThemeDictionaries> |
| 8 | + <ResourceDictionary x:Key="Default"> |
| 9 | + <SolidColorBrush x:Key="OmnibarModeDivisiderBrush" Color="{ThemeResource DividerStrokeColorDefaultBrush}" /> |
| 10 | + </ResourceDictionary> |
| 11 | + <ResourceDictionary x:Key="HighContrast"> |
| 12 | + <SolidColorBrush x:Key="OmnibarModeDivisiderBrush" Color="{ThemeResource DividerStrokeColorDefaultBrush}" /> |
| 13 | + </ResourceDictionary> |
| 14 | + </ResourceDictionary.ThemeDictionaries>--> |
| 15 | + |
| 16 | + <x:Double x:Key="OmnibarDefaultHeight">36</x:Double> |
| 17 | + <CornerRadius x:Key="OmnibarDefaultCornerRadius">18</CornerRadius> |
| 18 | + <Thickness x:Key="OmnibarFocusedBorderThickness">2</Thickness> |
| 19 | + <Thickness x:Key="OmnibarUnfocusedBorderThickness">1</Thickness> |
| 20 | + <Thickness x:Key="OmnibarUnfocusedRootPadding">1</Thickness> |
| 21 | + |
| 22 | + <x:Double x:Key="OmnibarModeDividerDefaultHeight">24</x:Double> |
| 23 | + <SolidColorBrush x:Key="OmnibarModeDivisiderBrush" Color="{ThemeResource DividerStrokeColorDefaultBrush}" /> |
| 24 | + |
| 25 | + <Style BasedOn="{StaticResource DefaultOmnibarStyle}" TargetType="local:Omnibar" /> |
| 26 | + |
| 27 | + <Style x:Key="DefaultOmnibarStyle" TargetType="local:Omnibar"> |
| 28 | + <Setter Property="IsTabStop" Value="True" /> |
| 29 | + <Setter Property="Height" Value="{StaticResource OmnibarDefaultHeight}" /> |
| 30 | + <Setter Property="UseSystemFocusVisuals" Value="True" /> |
| 31 | + <Setter Property="HorizontalAlignment" Value="Stretch" /> |
| 32 | + <Setter Property="Background" Value="{ThemeResource ControlFillColorDefaultBrush}" /> |
| 33 | + <Setter Property="Padding" Value="{ThemeResource OmnibarUnfocusedRootPadding}" /> |
| 34 | + <Setter Property="BorderBrush" Value="{ThemeResource CircleElevationBorderBrush}" /> |
| 35 | + <Setter Property="BorderThickness" Value="{StaticResource OmnibarUnfocusedBorderThickness}" /> |
| 36 | + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
| 37 | + <Setter Property="CornerRadius" Value="{StaticResource OmnibarDefaultCornerRadius}" /> |
| 38 | + <Setter Property="VerticalAlignment" Value="Center" /> |
| 39 | + <Setter Property="IsFocusEngagementEnabled" Value="True" /> |
| 40 | + <Setter Property="Template"> |
| 41 | + <Setter.Value> |
| 42 | + <ControlTemplate TargetType="local:Omnibar"> |
| 43 | + <Grid |
| 44 | + x:Name="PART_RootGrid" |
| 45 | + Padding="{TemplateBinding Padding}" |
| 46 | + Background="{TemplateBinding Background}" |
| 47 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 48 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 49 | + CornerRadius="{TemplateBinding CornerRadius}"> |
| 50 | + <Grid x:Name="PART_ModesHostGrid" /> |
| 51 | + |
| 52 | + <VisualStateManager.VisualStateGroups> |
| 53 | + |
| 54 | + <VisualStateGroup x:Name="PointerStates"> |
| 55 | + <VisualState x:Name="Normal" /> |
| 56 | + <VisualState x:Name="Focused"> |
| 57 | + <VisualState.Setters> |
| 58 | + <Setter Target="PART_RootGrid.BorderBrush" Value="{ThemeResource AccentFillColorDefaultBrush}" /> |
| 59 | + <Setter Target="PART_RootGrid.BorderThickness" Value="{StaticResource OmnibarFocusedBorderThickness}" /> |
| 60 | + <Setter Target="PART_RootGrid.Margin" Value="-1" /> |
| 61 | + </VisualState.Setters> |
| 62 | + </VisualState> |
| 63 | + </VisualStateGroup> |
| 64 | + |
| 65 | + </VisualStateManager.VisualStateGroups> |
| 66 | + </Grid> |
| 67 | + </ControlTemplate> |
| 68 | + </Setter.Value> |
| 69 | + </Setter> |
| 70 | + </Style> |
| 71 | + |
| 72 | +</ResourceDictionary> |
0 commit comments