Skip to content

Commit

Permalink
Ran XAML styler
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed May 18, 2023
1 parent 99c0d8e commit 255e9a5
Show file tree
Hide file tree
Showing 3 changed files with 504 additions and 504 deletions.
44 changes: 22 additions & 22 deletions components/SegmentedControl/src/Segmented/Segmented.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:tk="using:CommunityToolkit.WinUI"
Expand All @@ -9,23 +9,23 @@
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="SegmentedBackground"
ResourceKey="ControlAltFillColorSecondaryBrush" />
ResourceKey="ControlAltFillColorSecondaryBrush" />
<StaticResource x:Key="SegmentedBorderBrush"
ResourceKey="ControlStrokeColorDefaultBrush" />
ResourceKey="ControlStrokeColorDefaultBrush" />
<Thickness x:Key="SegmentedBorderThickness">1</Thickness>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="SegmentedBackground"
ResourceKey="ControlAltFillColorSecondaryBrush" />
ResourceKey="ControlAltFillColorSecondaryBrush" />
<StaticResource x:Key="SegmentedBorderBrush"
ResourceKey="ControlStrokeColorDefaultBrush" />
ResourceKey="ControlStrokeColorDefaultBrush" />
<Thickness x:Key="SegmentedBorderThickness">1</Thickness>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="SegmentedBackground"
ResourceKey="SystemColorButtonFaceColor" />
ResourceKey="SystemColorButtonFaceColor" />
<StaticResource x:Key="SegmentedBorderBrush"
ResourceKey="SystemColorHighlightColorBrush" />
ResourceKey="SystemColorHighlightColorBrush" />
<Thickness x:Key="SegmentedBorderThickness">1</Thickness>

</ResourceDictionary>
Expand All @@ -35,10 +35,10 @@
<x:Double x:Key="ButtonItemSpacing">2</x:Double>

<Style BasedOn="{StaticResource DefaultSegmentedStyle}"
TargetType="labs:Segmented" />
TargetType="labs:Segmented" />

<Style x:Key="DefaultSegmentedStyle"
TargetType="labs:Segmented">
TargetType="labs:Segmented">
<Style.Setters>
<Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
<Setter Property="Background" Value="{ThemeResource SegmentedBackground}" />
Expand All @@ -49,15 +49,15 @@
<Setter Property="SelectionMode" Value="Single" />
<Setter Property="IsItemClickEnabled" Value="False" />
<win:Setter Property="SingleSelectionFollowsFocus"
Value="False" />
Value="False" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="TabNavigation" Value="Once" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<labs:EqualPanel HorizontalAlignment="{Binding (tk:FrameworkElementExtensions.Ancestor).HorizontalAlignment, RelativeSource={RelativeSource Self}}"
tk:FrameworkElementExtensions.AncestorType="labs:Segmented"
Spacing="{ThemeResource SegmentedItemSpacing}" />
tk:FrameworkElementExtensions.AncestorType="labs:Segmented"
Spacing="{ThemeResource SegmentedItemSpacing}" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
Expand All @@ -66,10 +66,10 @@
<ControlTemplate TargetType="labs:Segmented">
<Grid>
<Border VerticalAlignment="Stretch"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
<ItemsPresenter Margin="{TemplateBinding Padding}" />
</Grid>
</ControlTemplate>
Expand All @@ -79,8 +79,8 @@
</Style>

<Style x:Key="PivotSegmentedStyle"
BasedOn="{StaticResource DefaultSegmentedStyle}"
TargetType="labs:Segmented">
BasedOn="{StaticResource DefaultSegmentedStyle}"
TargetType="labs:Segmented">
<Style.Setters>
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
Expand All @@ -91,16 +91,16 @@
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
Spacing="{ThemeResource SegmentedItemSpacing}" />
Spacing="{ThemeResource SegmentedItemSpacing}" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>

<Style x:Key="ButtonSegmentedStyle"
BasedOn="{StaticResource DefaultSegmentedStyle}"
TargetType="labs:Segmented">
BasedOn="{StaticResource DefaultSegmentedStyle}"
TargetType="labs:Segmented">
<Style.Setters>
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
Expand All @@ -111,7 +111,7 @@
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
Spacing="{ThemeResource ButtonItemSpacing}" />
Spacing="{ThemeResource ButtonItemSpacing}" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
Expand Down
Loading

0 comments on commit 255e9a5

Please sign in to comment.