Files
PowerToys/src/settings-ui/Settings.UI/Controls/FancyZonesPreviewControl.xaml
Niels Laute f41fe145fc [Settings] New Settings controls, XAML formatting and cleanup (#21317)
* Awake

* Always On Top

* ColorPicker

* FancyZones

* FancyZones

* Hosts file editor

* ImageResizer

* Update ImageResizerPage.xaml

* KBM

* General

* Update MeasureToolPage.xaml

* Mouse utils

* PowerAccent

* Run

* PowerOCR

* File preview

* PowerRename

* Shortcut Guide

* VCM

* XAML styler

* Update ShellPage.xaml

* XAML formatting and cleanup

* Moving converters

* Update App.xaml

* XAML formatting

* XAML formatting

* Fixes

* XAML formatting

* Image resizer updates

* Color picker page and margin tweaks

* Update PowerLauncherPage.xaml

* Tweaks based on Jay's feedback

* Resolve conflicts

* Add labs source to unit tests

* Fix feedback

* Fix KBM bug

* Infobar fix

* Fixes

* Resolve conflicts

* Add converter
2022-11-23 18:57:09 +00:00

135 lines
5.0 KiB
XML

<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Controls.FancyZonesPreviewControl"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Loaded="FancyZonesPreviewControl_Loaded"
RequestedTheme="Dark"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush
x:Key="SolidBackgroundBrush"
Color="Black" />
<SolidColorBrush
x:Key="SolidZoneNumberBrush"
Color="White" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<SolidColorBrush
x:Key="SolidBackgroundBrush"
Color="White" />
<SolidColorBrush
x:Key="SolidZoneNumberBrush"
Color="Black" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush
x:Key="SolidBackgroundBrush"
Color="Black" />
<SolidColorBrush
x:Key="SolidZoneNumberBrush"
Color="White" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<SolidColorBrush
x:Key="DefaultAccentBrush"
Color="{ThemeResource SystemAccentColor}" />
<SolidColorBrush
x:Key="DefaultBorderBrush"
Color="{ThemeResource SystemAccentColor}" />
</ResourceDictionary>
</UserControl.Resources>
<Grid
x:Name="RootGrid"
MinWidth="170"
MinHeight="86"
HorizontalAlignment="Center"
Background="Black"
BorderBrush="Black"
BorderThickness="6"
CornerRadius="4">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Grid.RowSpan="3"
Grid.ColumnSpan="2"
CornerRadius="2"
Opacity="0.8">
<Image
AutomationProperties.AccessibilityView="Raw"
Source="{x:Bind WallpaperPath, Mode=OneWay}"
Stretch="UniformToFill" />
</Border>
<Grid
Grid.Row="2"
Grid.ColumnSpan="2"
Background="{ThemeResource SystemControlAcrylicElementBrush}" />
<Border
x:Name="Zone1"
Grid.RowSpan="2"
Margin="4,4,2,4"
BorderThickness="1"
CornerRadius="2">
<TextBlock
x:Name="Zone1Number"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="SemiBold"
Text="1"
Visibility="{x:Bind ShowZoneNumber, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
</Border>
<Border
x:Name="Zone2"
Grid.Column="1"
Margin="2,4,4,2"
BorderThickness="1"
CornerRadius="2">
<TextBlock
x:Name="Zone2Number"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="SemiBold"
Text="2"
Visibility="{x:Bind ShowZoneNumber, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
</Border>
<Border
x:Name="Zone3"
Grid.Row="1"
Grid.Column="1"
Margin="2,2,4,4"
BorderThickness="1"
CornerRadius="2">
<TextBlock
x:Name="Zone3Number"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontWeight="SemiBold"
Text="3"
Visibility="{x:Bind ShowZoneNumber, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />
</Border>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="RootGrid.Opacity" Value="0.4" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</UserControl>