Files
EgtWPFLib5/Themes/Generic.xaml
T
Emmanuele Sassi f40c607526 EgtWPFLib5 :
- Aggiunta finestra stime costi e tempi.
- Corretto errore barra di scorrimento setup.
2018-08-10 16:41:13 +00:00

865 lines
51 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtWPFLib5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating">
<!--Colori predefiniti-->
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF4D84C4" />
<SolidColorBrush x:Key="EgaltechBlue2" Color="#FF7096CE" />
<SolidColorBrush x:Key="EgaltechBlue3" Color="#FF90ABD9" />
<SolidColorBrush x:Key="EgaltechBlue4" Color="#FFB2C3E4" />
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="EgaltechGray" Color="#FF58585B" />
<SolidColorBrush x:Key="EgaltechLightGray" Color="LightGray" />
<!--Style that defines the aspect of the EgtPanelWindow-->
<Style TargetType="{x:Type local:EgtPanelWindow}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="ShowInTaskbar" Value="False"/>
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="Silver"/>
<Setter Property="TitleBarHeight" Value="10"/>
<Setter Property="TitleBarOrientation" Value="Vertical"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtPanelWindow}">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Rectangle x:Name="PART_MoveRectangle" Fill="{TemplateBinding BorderBrush}" Height="{TemplateBinding TitleBarHeight}"
Grid.Row="0" />
<Grid Background="{TemplateBinding Background}"
Grid.Row="1" Margin="0">
<AdornerDecorator>
<ContentPresenter/>
</AdornerDecorator>
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="TitleBarOrientation" Value="Horizontal">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtPanelWindow}">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Rectangle x:Name="PART_MoveRectangle" Fill="{TemplateBinding BorderBrush}" Width="{TemplateBinding TitleBarHeight}"
Grid.Column="0" />
<Grid Background="{TemplateBinding Background}"
Grid.Column="1" Margin="0">
<AdornerDecorator>
<ContentPresenter/>
</AdornerDecorator>
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!--Style for the EgtTabControl that permit to select new tab without cancel the older one-->
<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
<Style TargetType="{x:Type local:EgtTabControl}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Padding" Value="4,4,4,4"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
<Setter Property="Background" Value="#F9F9F9"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtTabControl}">
<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<TabPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<Grid x:Name="PART_ItemsHolder" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style for the EgtTextBox that permit to lose focus when enter is pushed -->
<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
<GradientStop Color="#ABADB3" Offset="0.05"/>
<GradientStop Color="#E2E3EA" Offset="0.07"/>
<GradientStop Color="#E3E9EF" Offset="1"/>
</LinearGradientBrush>
<Style BasedOn="{x:Null}" TargetType="{x:Type local:EgtTextBox}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtTextBox}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="#FF7EB4EA"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="BorderBrush" TargetName="Bd" Value="#FF569DE5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style for the EgtMsgBox that is used for basic validation question -->
<!--<Style TargetType="{x:Type local:EgtMsgBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtMsgBox}">
<Grid Name="PART_Grid" >
<TextBlock Name="PART_Title" FontSize="{DynamicResource EgtMsgBox_TitleFontSize}"
VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Image Name="PART_Icon" HorizontalAlignment="left" VerticalAlignment="Top" Height="70" Width="70"/>
<TextBlock Name="PART_Text" FontSize="{DynamicResource EgtMsgBox_TextFontSize}"
VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="WrapWithOverflow"/>
<ProgressBar Name="PART_ProgressBar" Grid.Row="2" Minimum="0" Maximum="100"/>
<Button Name="PART_Button1" IsCancel="True"/>
<Button Name="PART_Button2" IsCancel="True"/>
<Button Name="PART_Button3" IsCancel="True"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
<!--Style per i button della CustomWindow-->
<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}" x:Key="WindowButtonStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border
x:Name="Chrome"
BorderBrush="{TemplateBinding BorderBrush}"
Margin="0"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter x:Name="contentPresenter"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Chrome" Value="{StaticResource Button.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="Chrome" Value="{StaticResource Button.Disabled.Border}"/>
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
<Setter Property="OpacityMask" Value="#54707070"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontFamily" Value="Webdings"/>
<Setter Property="FontSize" Value="13.333" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Margin" Value="0,2,3,0"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="IconButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<ContentPresenter x:Name="contentPresenter"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style per la CustomWindow-->
<Style TargetType="{x:Type local:EgtCustomWindow}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="WindowState" Value="Normal"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource EgaltechBlue1}"/>
<Setter Property="TitleBarHeight" Value="20"/>
<Setter Property="TitleBarBrush" Value="{StaticResource EgaltechBlue1}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtCustomWindow}">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<Border Background="{TemplateBinding TitleBarBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,2">
<Grid Height="{TemplateBinding TitleBarHeight}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Command="{TemplateBinding AboutBoxCommand}" Height="{TemplateBinding TitleBarHeight}" Width="{TemplateBinding TitleBarHeight}" Style="{StaticResource IconButtonStyle}">
<Image x:Name="PART_TitleBarIcon" Source="{TemplateBinding Icon}"/>
</Button>
<ContentPresenter Content="{TemplateBinding TitlePanel}" VerticalAlignment="Center" Grid.Column="1"/>
<TextBlock x:Name="PART_MoveRectangle" TextAlignment="Center" Foreground="White" FontSize="15" Grid.Column="2"
Text="{TemplateBinding Title}" VerticalAlignment="Center" Margin="20,0,20,0">
</TextBlock>
<StackPanel Grid.Column="3" Orientation="Horizontal" Background="White">
<Button x:Name="minimizeButton" Style="{StaticResource WindowButtonStyle}" Width="25"
Content="0" />
<Button x:Name="restoreButton" Style="{StaticResource WindowButtonStyle}" Width="25"
Content="1" />
<Button x:Name="closeButton" Command="{TemplateBinding CloseCommand}" CommandParameter="{TemplateBinding CloseCommandParameter}" Style="{StaticResource WindowButtonStyle}" Width="25"
Content="r"/>
</StackPanel>
</Grid>
</Border>
<Grid Background="{TemplateBinding Background}"
Grid.Row="1" Grid.ColumnSpan="4">
<AdornerDecorator>
<ContentPresenter/>
</AdornerDecorator>
</Grid>
</Grid>
<!-- Resize grid to be inserted here -->
<Grid x:Name="PART_ResizeGrid">
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
VerticalAlignment="Top"
Height="5"
x:Name="top"
Margin="5,0,5,0" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
x:Name="bottom"
Height="5"
VerticalAlignment="Bottom"
Margin="5,0,5,0" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Left"
Margin="0,5,0,5"
Width="5"
x:Name="left"/>
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
Margin="0,5,0,5"
Width="5"
HorizontalAlignment="Right"
x:Name="right" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Width="5"
Height="5"
x:Name="bottomLeft" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
VerticalAlignment="Bottom"
Height="5"
Width="5"
HorizontalAlignment="Right"
x:Name="bottomRight" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Right"
Width="5"
Height="5"
VerticalAlignment="Top"
x:Name="topRight" />
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Left"
Width="5"
VerticalAlignment="Top"
Height="5"
x:Name="topLeft" />
</Grid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--EGTFLOATING-->
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<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"/>
<Style x:Key="HorizontalTitleBarStyle" TargetType="{x:Type ContentControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Border BorderThickness="1" BorderBrush="{StaticResource Button.Static.Border}" Background="{StaticResource EgaltechLightGray}" CornerRadius="2" Margin="0,0,2,0"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VerticalTitleBarStyle" TargetType="{x:Type ContentControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Border BorderThickness="1" BorderBrush="{StaticResource Button.Static.Border}" Background="{StaticResource EgaltechLightGray}" CornerRadius="2" Margin="0,0,0,2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HorizontalExtendButtonStyle" TargetType="{x:Type ToggleButton}">
<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="Margin" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Canvas HorizontalAlignment="Center" Height="7" Margin="1,0,0,2" SnapsToDevicePixels="true" VerticalAlignment="Bottom" Width="6">
<Path Data="M 0 0 L 5 0" Stroke="{TemplateBinding BorderBrush}"/>
<Path Data="M -1 3 L 6 3 L 2.5 7 Z" Fill="{TemplateBinding BorderBrush}"/>
</Canvas>
</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}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VerticalExtendButtonStyle" TargetType="{x:Type ToggleButton}">
<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="Margin" Value="1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<Canvas HorizontalAlignment="Right" Height="7" Margin="0,0,3,-5" SnapsToDevicePixels="true" VerticalAlignment="Bottom" Width="6">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Canvas.RenderTransform>
<Path Data="M 0 0 L 5 0" Stroke="{TemplateBinding BorderBrush}"/>
<Path Data="M -1 3 L 6 3 L 2.5 7 Z" Fill="{TemplateBinding BorderBrush}"/>
</Canvas>
</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}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style dell'EgtFloatingPanel-->
<Style TargetType="{x:Type EgtFloating:EgtFloatingPanel}">
<Setter Property="BorderBrush" Value="{StaticResource EgaltechBlue2}"/>
<Setter Property="Background" Value="{StaticResource EgaltechBlue2}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="TitleBarHeight" Value="10"/>
<Setter Property="TitleBarOrientation" Value="Horizontal"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtFloating:EgtFloatingPanel}">
<StackPanel>
<Border Name="PanelBorder" BorderThickness="2" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="2" Margin="0,0,0,1">
<StackPanel Orientation="Vertical">
<ContentControl Name="PART_TitleBar" Height="{TemplateBinding TitleBarHeight}" Style="{StaticResource ResourceKey=VerticalTitleBarStyle}"/>
<ItemsPresenter Name="PART_PanelPresenter"/>
<ToggleButton Name="PART_ExtendButton" Height="12" Style="{StaticResource ResourceKey=VerticalExtendButtonStyle}"
IsChecked="{Binding PopUpIsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
</StackPanel>
</Border>
<Popup IsOpen="{Binding PopUpIsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Placement="Top" PlacementTarget="{Binding ElementName=PanelBorder}"
HorizontalOffset="{Binding ActualWidth, ElementName=PanelBorder}" VerticalOffset="{Binding ActualHeight, ElementName=PanelBorder}" StaysOpen="False" AllowsTransparency="True">
<Border BorderThickness="2" BorderBrush="{StaticResource EgaltechBlue2}" Background="{StaticResource EgaltechBlue2}" CornerRadius="2" Margin="0,0,0,1">
<StackPanel Orientation="Vertical" Name="PART_PopUpStackPanel"/>
</Border>
</Popup>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="TitleBarOrientation" Value="Horizontal">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtFloating:EgtFloatingPanel}">
<Grid>
<Border Name="PanelBorder" BorderThickness="2" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="2" Margin="0,0,1,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ContentControl Name="PART_TitleBar" Width="{TemplateBinding TitleBarHeight}" Style="{StaticResource ResourceKey=HorizontalTitleBarStyle}"/>
<ItemsPresenter Name="PART_PanelPresenter" Grid.Column="1"/>
<ToggleButton Name="PART_ExtendButton" Width="12" Style="{StaticResource ResourceKey=HorizontalExtendButtonStyle}"
IsChecked="{Binding PopUpIsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2"/>
</Grid>
</Border>
<Popup IsOpen="{Binding PopUpIsOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Placement="Left" PlacementTarget="{Binding ElementName=PanelBorder}"
HorizontalOffset="{Binding ActualWidth, ElementName=PanelBorder}" VerticalOffset="{Binding ActualHeight, ElementName=PanelBorder}" StaysOpen="False" AllowsTransparency="True">
<Border BorderThickness="2" BorderBrush="{StaticResource EgaltechBlue2}" Background="{StaticResource EgaltechBlue2}" CornerRadius="2" Margin="0,0,1,0">
<StackPanel Orientation="Horizontal" Name="PART_PopUpStackPanel"/>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsToolBar" Value="False">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<Grid/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!--Style dell'EgtFloatingWindow-->
<Style TargetType="{x:Type EgtFloating:EgtFloatingWindow}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="ShowInTaskbar" Value="False"/>
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Silver"/>
<!--<Setter Property="Topmost" Value="True"/>-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtFloating:EgtFloatingWindow}">
<ContentPresenter Name="PART_ContentPresenter"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style dell'EgtFloatingManager-->
<Style TargetType="{x:Type EgtFloating:EgtFloatingManager}">
<Setter Property="ItemsSource" Value="{Binding FloatingTrayList}" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<!--DockPanel che contiene le EgtFloatingPanelTray ai quattro lati-->
<DockPanel Name="dckP_DockManager" LastChildFill="{Binding Path=LastChildFill, RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingManager}}}"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtFloating:EgtFloatingManager}">
<ItemsPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Style dell'EgtFloatingTray-->
<Style TargetType="{x:Type EgtFloating:EgtFloatingTray}">
<Setter Property="ItemsSource" Value="{Binding}" />
<Setter Property="AllowDrop" Value="True" />
<Setter Property="Background" Value="Red" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel Name="PART_StackPanel">
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Background" Value="Transparent" />
<!--Triggers che permettono di coordinare l'orientamento dello Stackpanel con il lato su cui e' Dockato-->
<Style.Triggers>
<DataTrigger Binding="{Binding Path=(DockPanel.Dock), RelativeSource={RelativeSource AncestorType=ItemsControl}}"
Value="Top">
<Setter Property="Orientation" Value="Horizontal"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=(DockPanel.Dock), RelativeSource={RelativeSource AncestorType=ItemsControl}}"
Value="Bottom">
<Setter Property="Orientation" Value="Horizontal"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
</StackPanel>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtFloating:EgtFloatingTray}">
<Grid Background="{StaticResource EgaltechWhite}">
<!--Separatore che si colora quando si avvicina il
mouse durante il trascinamento per ancorare il Panel al Tray-->
<!--<Border Name="PART_Border">
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=(PART_StackPanel)}"
Value="Horizontal">
<Setter Property="Height" Value="5"/>
<Setter Property="Width" Value="Auto"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=(DockPanel.Dock), RelativeSource={RelativeSource AncestorType=ItemsControl}}"
Value="Bottom">
<Setter Property="Height" Value="Auto"/>
<Setter Property="Width" Value="5"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>-->
<ItemsPresenter/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ______________________________________________________________________________________________________________________ -->
<!-- EgtScrollViewer -->
<SolidColorBrush x:Key="ScrollBar.Static.Background" Color="#F0F0F0"/>
<SolidColorBrush x:Key="ScrollBar.Static.Border" Color="#F0F0F0"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="#FFFFFF"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="#000000"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="#BFBFBF"/>
<SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="#606060"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="#DADADA"/>
<SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="#DADADA"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="#606060"/>
<SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="#606060"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="#F0F0F0"/>
<SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="#F0F0F0"/>
<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="1"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}">
<Border x:Name="border" BorderBrush="{StaticResource ScrollBar.Static.Border}" BorderThickness="1" Background="{StaticResource ScrollBar.Static.Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Border}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
<Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Background}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Border}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Style for overall ScrollViewer -->
<Style TargetType="{x:Type local:EgtScrollViewer}">
<Setter Property="IsPageSlideCommand" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
<ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
<ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsCustom" Value="True" />
<Condition Property="Orientation" Value="Horizontal" />
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtScrollViewer}">
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<RepeatButton x:Name="PART_LineLeftButton"
Command="{x:Static ScrollBar.LineLeftCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{TemplateBinding RepeatButtonStyle}"
VerticalAlignment="Center" Grid.Column="0"
Width="{TemplateBinding RepeatButtonDimension}"
Height="{Binding Width,RelativeSource={RelativeSource Self}}" HorizontalAlignment="Center"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}">
<Path x:Name="ArrowLeft"
Data="M 3.18,7 C3.18,7 5,7 5,7 5,7 1.81,3.5 1.81,3.5 1.81,3.5 5,0 5,0 5,0 3.18,0 3.18,0 3.18,0 0,3.5 0,3.5 0,3.5 3.18,7 3.18,7 z"
Fill="{StaticResource ScrollBar.Static.Glyph}" Margin="3"
Stretch="Uniform"/>
</RepeatButton>
<!--<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
CanContentScroll="{TemplateBinding CanContentScroll}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CanHorizontallyScroll="False" Grid.Column="1"
Content="{TemplateBinding Content}"/>-->
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
CanContentScroll="{TemplateBinding CanContentScroll}"
CanHorizontallyScroll="False" CanVerticallyScroll="False"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Grid.Column="1"/>
<RepeatButton x:Name="PART_LineRightButton"
Command="{x:Static ScrollBar.LineRightCommand}"
IsEnabled="{TemplateBinding IsMouseOver}"
Style="{TemplateBinding RepeatButtonStyle}"
VerticalAlignment="Center" Grid.Column="2"
Width="{TemplateBinding RepeatButtonDimension}"
Height="{Binding Width,RelativeSource={RelativeSource Self}}"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}">
<Path x:Name="ArrowRight" Data="M 1.81,7 C1.81,7 0,7 0,7 0,7 3.18,3.5 3.18,3.5 3.18,3.5 0,0 0,0 0,0 1.81,0 1.81,0 1.81,0 5,3.5 5,3.5 5,3.5 1.81,7 1.81,7 z"
Fill="{StaticResource ScrollBar.Static.Glyph}" Margin="3" Stretch="Uniform"/>
</RepeatButton>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</MultiTrigger.Setters>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsCustom" Value="True" />
<Condition Property="Orientation" Value="Vertical" />
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:EgtScrollViewer}">
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
CanContentScroll="{TemplateBinding CanContentScroll}"
CanHorizontallyScroll="False" CanVerticallyScroll="False"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Grid.Column="0"
Grid.Row="0"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</MultiTrigger.Setters>
</MultiTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>