Files
effector.plugin.lib/Effector.Plugin.Lib/Themes/Generic.xaml
T
2025-06-12 20:04:21 +02:00

426 lines
21 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Effector.Plugin.Lib"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
<EgwWPFBaseLib:CaptionHeightConverter x:Key="CaptionHeightConverter"/>
<!--#region COLORS -->
<!--#e8eef5-->
<Color x:Key="Effector_LightBlue_Color" R="232" G="238" B="245" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue" Color="{StaticResource Effector_LightBlue_Color}" />
<!--#afc5d6-->
<Color x:Key="Effector_Blue_Color" R="175" G="197" B="214" A="255"/>
<SolidColorBrush x:Key="Effector_Blue" Color="{StaticResource Effector_Blue_Color}" />
<!--#749fc4-->
<Color x:Key="Effector_DarkBlue_Color" R="116" G="159" B="196" A="255"/>
<SolidColorBrush x:Key="Effector_DarkBlue" Color="{StaticResource Effector_DarkBlue_Color}" />
<!--#92bde3-->
<Color x:Key="Effector_LightBlue_Status_Color" R="146" G="189" B="227" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue_Status" Color="{StaticResource Effector_LightBlue_Status_Color}" />
<!--#5682a6-->
<Color x:Key="Effector_Blue_Status_Color" R="86" G="130" B="166" A="255"/>
<SolidColorBrush x:Key="Effector_Blue_Status" Color="{StaticResource Effector_Blue_Status_Color}" />
<!--#cd5c5c-->
<Color x:Key="Effector_Red_Status_Color" R="205" G="92" B="92" A="255"/>
<SolidColorBrush x:Key="Effector_Red_Status" Color="{StaticResource Effector_Red_Status_Color}" />
<!--#b1cbaa-->
<Color x:Key="Effector_Green_Status_Color" R="177" G="203" B="170" A="255"/>
<SolidColorBrush x:Key="Effector_Green_Status" Color="{StaticResource Effector_Green_Status_Color}" />
<!--#9c9c9c-->
<Color x:Key="Effector_Gray_Status_Color" R="156" G="156" B="156" A="255"/>
<SolidColorBrush x:Key="Effector_Gray_Status" Color="{StaticResource Effector_Gray_Status_Color}" />
<!--#ffd932-->
<Color x:Key="Effector_Yellow_Status_Color" R="255" G="217" B="50" A="255"/>
<SolidColorBrush x:Key="Effector_Yellow_Status" Color="{StaticResource Effector_Yellow_Status_Color}" />
<!--#6398c7-->
<Color x:Key="Effector_LightBlue_SelStatus_Color" R="99" G="152" B="199" A="255"/>
<SolidColorBrush x:Key="Effector_LightBlue_SelStatus" Color="{StaticResource Effector_LightBlue_SelStatus_Color}" />
<!--#4b677e-->
<Color x:Key="Effector_Blue_SelStatus_Color" R="75" G="103" B="126" A="255"/>
<SolidColorBrush x:Key="Effector_Blue_SelStatus" Color="{StaticResource Effector_Blue_SelStatus_Color}" />
<!--#a94444-->
<Color x:Key="Effector_Red_SelStatus_Color" R="169" G="68" B="68" A="255"/>
<SolidColorBrush x:Key="Effector_Red_SelStatus" Color="{StaticResource Effector_Red_SelStatus_Color}" />
<!--#89aa81-->
<Color x:Key="Effector_Green_SelStatus_Color" R="137" G="170" B="129" A="255"/>
<SolidColorBrush x:Key="Effector_Green_SelStatus" Color="{StaticResource Effector_Green_SelStatus_Color}" />
<!--#7d7d7d-->
<Color x:Key="Effector_Gray_SelStatus_Color" R="125" G="125" B="125" A="255"/>
<SolidColorBrush x:Key="Effector_Gray_SelStatus" Color="{StaticResource Effector_Gray_SelStatus_Color}" />
<!--#dcb718-->
<Color x:Key="Effector_Yellow_SelStatus_Color" R="220" G="183" B="24" A="255"/>
<SolidColorBrush x:Key="Effector_Yellow_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
<!--#e5ebf1-->
<Color x:Key="Effector_White_SelStatus_Color" R="229" G="235" B="241" A="255"/>
<SolidColorBrush x:Key="Effector_White_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
<!--#endregion COLORS-->
<!--#region USERCONTROL -->
<!--#region Button-->
<!--Colori default dei controlli-->
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
<Style TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Button.EffectorWindow.TitleBar" TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="White" />
<Setter Property="Padding" Value="0" />
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border"
Background="Transparent"
BorderThickness="0"
SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter"
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False"
RecognizesAccessKey="True" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="border" Property="Background" Value="{DynamicResource MouseOverOverlayBackgroundBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="border" Property="Background" Value="{DynamicResource PressedOverlayBackgroundBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Test_Button" TargetType="Button">
<Setter Property="Background" Value="Red" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="DarkRed" />
<Setter Property="BorderThickness" Value="5" />
<Setter Property="Height" Value="50" />
<Setter Property="Width" Value="200" />
</Style>
<Style x:Key="Button.DoorList" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="40"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="2"/>
</Style>
<Style x:Key="Button.Confirm" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="70"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="Regular"/>
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
<Setter Property="Background" Value="{StaticResource Effector_DarkBlue}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="10,5,10,5"/>
</Style>
<!--#endregion Button-->
<!--#region Image-->
<Style x:Key="Button.Image.DoorList" TargetType="{x:Type Image}">
<Setter Property="Stretch" Value="Uniform" />
</Style>
<!--#endregion Image-->
<!--#region TextBlock-->
<Style x:Key="TextBlock.DataGridTextColumn.DoorList" TargetType="{x:Type TextBlock}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="TextBlock.MultipleCopy" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="Regular"/>
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!--#endregion TextBlock-->
<!--#region TextBox-->
<Style x:Key="TextBox.DataGridTextColumn.DoorList" TargetType="{x:Type TextBox}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="TextBox.MultipleCopy" TargetType="{x:Type TextBox}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="Regular"/>
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!--#endregion TextBox-->
<!--#region ComboBox-->
<Style x:Key="ComboBox.DataGridTemplateColumn.DoorList" TargetType="{x:Type ComboBox}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</Setter.Value>
</Setter>
</Style>
<!--#endregion ComboBox-->
<!--#region DataGridRow-->
<Style x:Key="RowDataGrid_CustomHighLight" TargetType="{x:Type DataGridRow}">
<Setter Property="BorderBrush" Value="LightGray" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderThickness" Value="2,2,2,2" />
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="Margin" Value="-2,0,-2,0" />
<Setter Property="Foreground" Value="Blue" />
</Trigger>
</Style.Triggers>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
</Style.Resources>
</Style>
<!--#endregion DataGridRow-->
<!--#endregion USERCONTROL-->
<!--#region CUSTOMCONTROLS -->
<Grid x:Key="EffectorWindow.Path.Maximize">
<Path Width="46"
Height="32"
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Grid>
<Grid x:Key="EffectorWindow.Path.Normal">
<Path Width="46"
Height="32"
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Grid>
<ControlTemplate x:Key="EffectorWindow.ControlTemplate.WithTitleBar" TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="LightGray"
Background="{TemplateBinding Background}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type local:EffectorWindow}}}"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Grid.ColumnSpan="6"
BorderThickness="0"
BorderBrush="{StaticResource Effector_Blue}"
Background="{StaticResource Effector_Blue}"/>
<Image Grid.Column="0"
MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
Source="{TemplateBinding Icon}"/>
<ContentControl Grid.Column="1"
Content="{TemplateBinding TitlePanel}"/>
<TextBlock Grid.Column="2"
Margin="4 0 0 0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="14"
Text="{TemplateBinding Title}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Button Grid.Column="3"
Name="PART_MinimizeBtn"
RenderOptions.EdgeMode="Aliased"
Style="{StaticResource Button.EffectorWindow.TitleBar}">
<Path Width="46"
Height="32"
Data="M 18,15 H 28"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Button>
<Button Grid.Column="4"
Name="PART_MaximizeRestoreBtn">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource Button.EffectorWindow.TitleBar}">
<Style.Triggers>
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindow}}}" Value="Maximized">
<Setter Property="Content" Value="{StaticResource EffectorWindow.Path.Maximize}" />
</DataTrigger>
<DataTrigger Binding="{Binding WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:EffectorWindow}}}" Value="Normal">
<Setter Property="Content" Value="{StaticResource EffectorWindow.Path.Normal}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Grid.Column="5"
Name="PART_CloseBtn"
Style="{StaticResource Button.EffectorWindow.TitleBar}">
<Path Width="46"
Height="32"
Data="M 18,11 27,20 M 18,20 27,11"
Stroke="{Binding Path=Foreground,
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
StrokeThickness="1" />
</Button>
</Grid>
<ContentPresenter Grid.Row="1"
Content="{TemplateBinding Content}"/>
</Grid>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="EffectorWindow.ControlTemplate.WithoutTitleBar" TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="LightGray"
Background="Red">
<ContentPresenter Grid.Row="1"
Content="{TemplateBinding Content}"/>
</Border>
</ControlTemplate>
<Style TargetType="{x:Type local:EffectorWindow}" BasedOn="{StaticResource {x:Type EgwWPFBaseLib:EgtWindow}}">
<Setter Property="Background" Value="White"/>
<Setter Property="TitleBarHeight" Value="45"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="IsMinimizable" Value="True"/>
<Setter Property="Icon" Value="pack://application:,,,/Effector.Plugin.Lib;Component/Resources/Effector.ico"/>
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome CaptionHeight="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"
GlassFrameThickness="0"
CornerRadius="0"
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
</Setter.Value>
</Setter>
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithTitleBar}"/>
<Style.Triggers>
<Trigger Property="WindowStyle" Value="None">
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithoutTitleBar}"/>
</Trigger>
<Trigger Property="WindowState" Value="Maximized">
<Setter Property="BorderThickness" Value="7"/>
<!--da impostare perche' lo perde!-->
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithTitleBar}"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="WindowState" Value="Maximized"/>
<Condition Property="WindowStyle" Value="None"/>
</MultiTrigger.Conditions>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template" Value="{StaticResource EffectorWindow.ControlTemplate.WithoutTitleBar}"/>
</MultiTrigger>
</Style.Triggers>
</Style>
<Style x:Key="EffectorWindow.Dialog" TargetType="{x:Type local:EffectorWindow}">
<Setter Property="IsMinimizable" Value="False"/>
<Setter Property="IsResizable" Value="False"/>
</Style>
<Style x:Key="EffectorWindow.Dialog.NoClose" TargetType="{x:Type local:EffectorWindow}">
<Setter Property="IsMinimizable" Value="False"/>
<Setter Property="IsResizable" Value="False"/>
<Setter Property="IsClosable" Value="False"/>
</Style>
<!--#endregion CUSTOMCONTROLS-->
</ResourceDictionary>