Projektdateien hinzufügen.
This commit is contained in:
118
Valheim Mod Sync Desktop/Skins/Overwrite_Styles.xaml
Normal file
118
Valheim Mod Sync Desktop/Skins/Overwrite_Styles.xaml
Normal file
@@ -0,0 +1,118 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:materialDesign="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
|
||||
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf">
|
||||
|
||||
|
||||
<Style x:Key="MaterialDesignFilledComboBox" BasedOn="{StaticResource MaterialDesignFilledComboBox}" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="wpf:TextFieldAssist.UnderlineBrush" Value="Transparent" />
|
||||
|
||||
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
<Style x:Key="MaterialDesignCheckBox" BasedOn="{StaticResource MaterialDesignCheckBox}" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}"/>
|
||||
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
||||
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<ControlTemplate.Resources>
|
||||
<Storyboard x:Key="Click">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="InteractionEllipse">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="InteractionEllipse">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="InteractionEllipse">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="InteractionEllipse">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InteractionEllipse">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Viewbox Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:CheckBoxAssist.CheckBoxSize)}"
|
||||
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(wpf:CheckBoxAssist.CheckBoxSize)}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
FlowDirection="LeftToRight" >
|
||||
<Canvas Width="24" Height="24">
|
||||
<Path x:Name="Graphic"
|
||||
Data="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"
|
||||
Fill="{DynamicResource MaterialDesignCheckBoxOff}" />
|
||||
|
||||
<Ellipse x:Name="InteractionEllipse" Fill="{TemplateBinding Foreground}" Width="0" Height="0" Canvas.Top="12" Canvas.Left="12" Opacity="0" RenderTransformOrigin="0.5,0.5"
|
||||
IsHitTestVisible="False">
|
||||
<Ellipse.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Ellipse.RenderTransform>
|
||||
</Ellipse>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
<ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsPressed}" Value="true" />
|
||||
<Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:RippleAssist.IsDisabled)}" Value="false" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.EnterActions>
|
||||
<BeginStoryboard Storyboard="{StaticResource Click}"/>
|
||||
</MultiDataTrigger.EnterActions>
|
||||
</MultiDataTrigger>
|
||||
<Trigger Property="HasContent" Value="true">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="4,2,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true"/>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Data" TargetName="Graphic" Value="M19,19H5V5H15V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V11H19M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" />
|
||||
<Setter Property="Fill" TargetName="Graphic" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Fill" TargetName="Graphic" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" />
|
||||
<Setter Property="Opacity" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter Property="Data" TargetName="Graphic" Value="M6,13L6,11L18,11L18,13M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" />
|
||||
<Setter Property="Fill" TargetName="Graphic" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="Validation.HasError" Value="true">
|
||||
<Setter Property="Fill" TargetName="Graphic" Value="{DynamicResource MaterialDesignValidationErrorBrush}" />
|
||||
<Setter Property="Control.Foreground" TargetName="contentPresenter" Value="{DynamicResource MaterialDesignValidationErrorBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user