Files
Wand-Enhancer-luanslimadev/WeModPatcher/Style/Styles.xaml
T
2025-03-21 23:35:16 +02:00

245 lines
13 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<CircleEase EasingMode="EaseInOut" x:Key="BaseAnimationFunction"/>
<Style TargetType="{x:Type Button}">
<Style.Resources>
<CornerRadius x:Key="CornerRadius">3 3 3 3</CornerRadius>
</Style.Resources>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="BorderBrush" Value="{DynamicResource Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource Foreground}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="{DynamicResource CornerRadius}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource Secondary}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ColoredButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="{DynamicResource Primary}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryForeground}"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource Muted}"/>
<Setter Property="Foreground" Value="{DynamicResource MutedForeground}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Margin" Value="0 2 0 2"/>
<Setter Property="Background" Value="{DynamicResource Primary}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="IconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="{DynamicResource CornerRadius}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}">
<Viewbox HorizontalAlignment="Center" VerticalAlignment="Center">
<Path x:Name="Icon" Stretch="Fill" Data="{TemplateBinding Tag}" Fill="{TemplateBinding Foreground}"/>
</Viewbox>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<CircleEase EasingMode="EaseIn" x:Key="DefaultAnimationFunction"/>
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border x:Name="Content" CornerRadius="5" Margin="5"
Background="{StaticResource Background}"
BorderThickness="1"
BorderBrush="{DynamicResource Border}"
Padding="4">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
<Border.Effect>
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Color="Black" Opacity="0.4"/>
</Border.Effect>
<Border.RenderTransform>
<ScaleTransform ScaleX="0" ScaleY="0"/>
</Border.RenderTransform>
</Border>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:0.15" Storyboard.TargetName="Content" EasingFunction="{StaticResource DefaultAnimationFunction}"
Storyboard.TargetProperty="(Border.RenderTransform).(ScaleTransform.ScaleY)" From="0" To="1"/>
<DoubleAnimation Duration="0:0:0.15" Storyboard.TargetName="Content" EasingFunction="{StaticResource DefaultAnimationFunction}"
Storyboard.TargetProperty="(Border.RenderTransform).(ScaleTransform.ScaleX)" From="0" To="1"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Foreground" Value="{DynamicResource Foreground}"/>
<Setter Property="BorderBrush" Value="{DynamicResource Border}"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FontWeight" Value="Medium"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border Name="Root" Height="30" Background="Transparent" CornerRadius="4">
<ContentPresenter Name="HeaderHost" Margin="10,0,10,0"
ContentSource="Header" MinWidth="100"
RecognizesAccessKey="True"
HorizontalAlignment="Left" VerticalAlignment="Center"
TextOptions.TextRenderingMode="ClearType" TextBlock.FontSize="12" TextBlock.FontWeight="{TemplateBinding FontWeight}" TextBlock.Foreground="{TemplateBinding Foreground}" TextOptions.TextFormattingMode="Display"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Foreground}"/>
<Setter TargetName="Root" Property="Background" Value="{DynamicResource Accent}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Background}"/>
<Setter TargetName="Root" Property="Background" Value="{DynamicResource Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="LabelCard" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{DynamicResource Card}"/>
<Setter Property="Opacity" Value="0.9"/>
<Setter Property="CornerRadius" Value="10"/>
<Setter Property="Padding" Value="12 6"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="Label" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Foreground}"/>
<Setter Property="FontWeight" Value="Medium"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="Content" Value=""/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Border x:Name="Border" Height="17" Width="17"
CornerRadius="3"
Background="{DynamicResource Foreground}" BorderBrush="{DynamicResource Border}"
BorderThickness="0">
<TextBlock x:Name="Text" VerticalAlignment="Center" HorizontalAlignment="Center"
Foreground="{DynamicResource PrimaryForeground}"></TextBlock>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter TargetName="Border"
Property="Background" Value="Transparent"/>
<Setter TargetName="Border"
Property="BorderThickness" Value="1"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Text"
Property="Text" Value="✓"/>
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter TargetName="Text"
Property="Text" Value=""/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TextBox" x:Key="TitledTextBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Height" Value="30" />
<Setter Property="Foreground" Value="{StaticResource Foreground}" />
<Setter Property="FontSize" Value="13" />
<Setter Property="CaretBrush" Value="{DynamicResource MutedForeground}" />
<Setter Property="SelectionBrush" Value="{DynamicResource MutedForeground}" />
<Setter Property="FontWeight" Value="Medium" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border BorderBrush="{StaticResource Border}" Cursor="IBeam"
BorderThickness="1" CornerRadius="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border BorderBrush="{DynamicResource Border}"
BorderThickness="0 0 1 0">
<TextBlock Text="{TemplateBinding Uid}"
VerticalAlignment="Center" Cursor="Hand"
FontSize="12"
Foreground="{DynamicResource MutedForeground}"
Padding="10 0" />
</Border>
<ScrollViewer
Grid.Column="1"
Margin="5 0"
VerticalAlignment="Center"
x:Name="PART_ContentHost" />
<TextBlock IsHitTestVisible="False"
Grid.Column="1"
Opacity="0.3"
Text="{TemplateBinding Tag}"
Margin="7 0 5 1"
VerticalAlignment="Center"
Visibility="Collapsed"
x:Name="Placeholder" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Text" Value="">
<Setter TargetName="Placeholder"
Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>