Files
effector.plugin.lib/Effector.Plugin.Lib/Themes/Generic.xaml
T
Emmanuele Sassi dcaef9eaa9 - aggiunta EffectorWindow con TitleBar
- Utilizzata EffectorWindow per MultipleCopyWnd
- Utilizzata BaseWindow per ProcessManagerV
- aggiunto titolo a TitleBar
- aggiunto modulo Converters
2025-02-26 15:01:11 +01:00

194 lines
9.7 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 CUSTOMCONTROLS -->
<Style TargetType="{x:Type local:EffectorWindow}" BasedOn="{StaticResource {x:Type EgwWPFBaseLib:EgtWindow}}">
<Setter Property="Background" Value="White"/>
<Setter Property="TitleBarHeight" Value="40"/>
<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">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgwWPFBaseLib:EgtWindow}">
<Border BorderThickness="0"
BorderBrush="LightGray"
Background="{TemplateBinding Background}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}}"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<!--<Border Grid.ColumnSpan="6"
Style="{StaticResource TitleBar_Border}"/>
<Image MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
Source="/Resources/Effector.ico"/>
<ContentControl Grid.Column="1"
Content="{Binding ContentMenu}"/>
<TextBlock Grid.Column="2"
Text="{Binding sTitle}"
Margin="20,0,20,0"
Style="{StaticResource TitleBar_TextBlock}">
</TextBlock>-->
<local:TitleBar Title="{TemplateBinding Title}"/>
<ContentPresenter Grid.Row="1"
Content="{TemplateBinding Content}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="WindowState" Value="Maximized">
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome CaptionHeight="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgtWindow}}, Converter={StaticResource CaptionHeightConverter}}"
GlassFrameThickness="0"
CornerRadius="0"
ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}"/>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<!--bordo necessario per evitare la parte che esce dallo schermo-->
<Border BorderThickness="7"
BorderBrush="LightGray"
Background="{TemplateBinding Background}">
<ContentPresenter Grid.Row="1"
Content="{TemplateBinding Content}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!--#endregion CUSTOMCONTROLS-->
<!--#region USERCONTROL -->
<!--#endregion USERCONTROL-->
<!--#region STILES -->
<!--<Style x:Key="TitleBar_Border" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource Effector_Blue}" />
</Style>
<Style x:Key="TitleBar_TextBlock" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="FontSize" Value="14" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="TitleBar_Button" TargetType="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>-->
<!--#endregion STILES-->
</ResourceDictionary>