98 lines
4.6 KiB
XML
98 lines
4.6 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:Livia.Views.Converters"
|
|
xmlns:properties="clr-namespace:Livia.Properties">
|
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style TargetType="{x:Type Window}"
|
|
x:Key="LiviaWindow">
|
|
<Style.Resources>
|
|
<converters:StringToFontFamilyConverter x:Key="StringToFontFamilyConverter" />
|
|
<Style x:Key="{x:Type ToolTip}"
|
|
BasedOn="{StaticResource MaterialDesignToolTip}"
|
|
TargetType="ToolTip">
|
|
<Setter Property="FontFamily"
|
|
Value="{Binding FontFamily, Source={x:Static properties:ViewSettings.Default}, Converter={StaticResource StringToFontFamilyConverter}}" />
|
|
</Style>
|
|
</Style.Resources>
|
|
<Setter Property="Background"
|
|
Value="{DynamicResource MaterialDesignPaper}" />
|
|
<Setter Property="TextElement.Foreground"
|
|
Value="{DynamicResource MaterialDesignBody}" />
|
|
<Setter Property="TextOptions.TextFormattingMode"
|
|
Value="Ideal" />
|
|
<Setter Property="TextOptions.TextRenderingMode"
|
|
Value="Auto" />
|
|
<Setter Property="FontFamily"
|
|
Value="{Binding FontFamily, Source={x:Static properties:ViewSettings.Default}, Converter={StaticResource StringToFontFamilyConverter}}" />
|
|
<Setter Property="WindowStyle"
|
|
Value="None" />
|
|
<Setter Property="ResizeMode"
|
|
Value="CanResizeWithGrip" />
|
|
<Setter Property="AllowsTransparency"
|
|
Value="True" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Window}"
|
|
x:Key="LiviaDialog">
|
|
<Style.Resources>
|
|
<converters:StringToFontFamilyConverter x:Key="StringToFontFamilyConverter" />
|
|
</Style.Resources>
|
|
<Setter Property="Background"
|
|
Value="{DynamicResource MaterialDesignPaper}" />
|
|
<Setter Property="TextOptions.TextFormattingMode"
|
|
Value="Ideal" />
|
|
<Setter Property="TextOptions.TextRenderingMode"
|
|
Value="Auto" />
|
|
<Setter Property="FontFamily"
|
|
Value="{Binding FontFamily, Source={x:Static properties:ViewSettings.Default}, Converter={StaticResource StringToFontFamilyConverter}}" />
|
|
<Setter Property="WindowStyle"
|
|
Value="None" />
|
|
<Setter Property="AllowsTransparency"
|
|
Value="True" />
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Window}">
|
|
<Border BorderThickness="1"
|
|
CornerRadius="6"
|
|
Background="{StaticResource White1Brush}"
|
|
BorderBrush="{StaticResource Gray3Brush}">
|
|
|
|
<AdornerDecorator>
|
|
<ContentPresenter />
|
|
</AdornerDecorator>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="ToolTip" x:Key="CustomToolTipStyle">
|
|
<Setter Property="Padding" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToolTip">
|
|
<Border CornerRadius="5,5,5,5"
|
|
BorderThickness="1"
|
|
BorderBrush="{StaticResource PrimaryToolTipBorderBrush}"
|
|
Background="{StaticResource PrimaryColorDarkBrush}">
|
|
<TextBlock FontWeight="Bold"
|
|
FontSize="13"
|
|
TextWrapping="Wrap"
|
|
Margin="10"
|
|
Foreground="{StaticResource PrimaryToolTipBorderBrush}"
|
|
MaxWidth="200"
|
|
Width="auto"
|
|
HorizontalAlignment="Center"
|
|
TextAlignment="Left"
|
|
Text="{TemplateBinding Content}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |