2017-10-27 12:33:35 +02:00
|
|
|
<ResourceDictionary
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2018-07-05 18:32:42 +02:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2017-10-27 12:33:35 +02:00
|
|
|
<!-- Default style for Windows.UI.Xaml.Controls.Button -->
|
|
|
|
<Style TargetType="Button" x:Key="NoBorderButtonStyle">
|
2020-04-29 16:39:20 +02:00
|
|
|
<Setter Property="Background" Value="{ThemeResource ToggleButtonBackgroundThemeBrush}" />
|
2020-05-04 20:56:19 +02:00
|
|
|
<Setter Property="Foreground" Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}"/>
|
2017-10-27 12:33:35 +02:00
|
|
|
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderThemeBrush}" />
|
|
|
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
|
|
|
<Setter Property="Padding" Value="12,4,12,4" />
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
<Grid>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
<VisualState x:Name="Normal" />
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
|
|
|
Storyboard.TargetProperty="Background">
|
2020-04-29 16:39:20 +02:00
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonPointerOverBackgroundThemeBrush}" />
|
2017-10-27 12:33:35 +02:00
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPointerOverForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
|
|
|
Storyboard.TargetProperty="Background">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPressedBackgroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPressedForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
|
|
|
Storyboard.TargetProperty="Background">
|
2018-07-12 18:19:26 +02:00
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarBackgroundThemeBrush}" />
|
2017-10-27 12:33:35 +02:00
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
|
|
|
Storyboard.TargetProperty="BorderBrush">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledBorderThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
|
|
Storyboard.TargetProperty="Foreground">
|
|
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledForegroundThemeBrush}" />
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="FocusStates">
|
|
|
|
<VisualState x:Name="Focused">
|
|
|
|
<Storyboard>
|
|
|
|
<DoubleAnimation Storyboard.TargetName="FocusVisualWhite"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="1"
|
|
|
|
Duration="0" />
|
|
|
|
<DoubleAnimation Storyboard.TargetName="FocusVisualBlack"
|
|
|
|
Storyboard.TargetProperty="Opacity"
|
|
|
|
To="1"
|
|
|
|
Duration="0" />
|
|
|
|
</Storyboard>
|
|
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Unfocused" />
|
|
|
|
<VisualState x:Name="PointerFocused" />
|
|
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Border x:Name="Border"
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
Margin="0">
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
|
|
Content="{TemplateBinding Content}"
|
|
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
AutomationProperties.AccessibilityView="Raw"/>
|
|
|
|
</Border>
|
|
|
|
<Rectangle x:Name="FocusVisualWhite"
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}"
|
|
|
|
StrokeEndLineCap="Square"
|
|
|
|
StrokeDashArray="1,1"
|
|
|
|
Opacity="0"
|
|
|
|
StrokeDashOffset="1.5" />
|
|
|
|
<Rectangle x:Name="FocusVisualBlack"
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}"
|
|
|
|
StrokeEndLineCap="Square"
|
|
|
|
StrokeDashArray="1,1"
|
|
|
|
Opacity="0"
|
|
|
|
StrokeDashOffset="0.5" />
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
</ResourceDictionary>
|