8f912cae70
- Miglioramento comunicazione per prove su macchina. - Aggiunto componente checkbox nel dictionary. - Usato checkbox per parametro di lavorazione inveti.
1237 lines
80 KiB
XML
1237 lines
80 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:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
|
xmlns:local="clr-namespace:OmagCUT.ArithmeticConverterNameSpace"
|
|
x:Class="OmagCUTDictionary">
|
|
|
|
<!-- ** COLORI ** -->
|
|
|
|
<!-- ** TAB CONTROL ** -->
|
|
<!-- ** Tab Item ** -->
|
|
<SolidColorBrush x:Key="TabItemBorderColor_Unselected" Color="Gray" />
|
|
<SolidColorBrush x:Key="TabItemBackground_Unselected" Color="Gray" />
|
|
<SolidColorBrush x:Key="TabItemTextColor_Unselected" Color="White" />
|
|
<SolidColorBrush x:Key="TabItemBorderColor_Selected" Color="DarkGray" />
|
|
<SolidColorBrush x:Key="TabItemBackground_Selected" Color="LightGray" />
|
|
<SolidColorBrush x:Key="TabItemTextColor_Selected" Color="Black" />
|
|
<!-- ** Tab Page ** -->
|
|
<SolidColorBrush x:Key="TabControlBackgroundColor" Color="Gray" />
|
|
<SolidColorBrush x:Key="TabPageBorderColor" Color="DarkGray" />
|
|
<SolidColorBrush x:Key="TabPageBorderColor_Shadow" Color="LightGray" />
|
|
<SolidColorBrush x:Key="TabPageColor" Color="#FFE5E5E5" />
|
|
|
|
<!-- ** BUTTON ** -->
|
|
<SolidColorBrush x:Key="ButtonBorderColor_Unselected" Color="DarkGray" />
|
|
<SolidColorBrush x:Key="ButtonBackGroundColor_Unselected" Color="LightGray" />
|
|
<SolidColorBrush x:Key="ButtonTextColor_Unselected" Color="Black" />
|
|
<SolidColorBrush x:Key="ButtonBorderColor_Selected" Color="LightGray" />
|
|
<SolidColorBrush x:Key="ButtonBackGroundColor_Selected" Color="LightGray" />
|
|
<SolidColorBrush x:Key="ButtonTextColor_Selected" Color="White" />
|
|
|
|
<!-- ** TOGGLEBUTTON ** -->
|
|
<SolidColorBrush x:Key="ToggleButtonBorderColor_Pressed" Color="Gray" />
|
|
<SolidColorBrush x:Key="ToggleButtonBackGroundColor_Pressed" Color="Gold" />
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** PARAMETRI VARI (dimensioni, ecc...) ** -->
|
|
|
|
<!-- ** TAB CONTROL ** -->
|
|
|
|
<!-- ** Tab Header ** -->
|
|
|
|
<sys:Double x:Key="TabHeaderWidth">250</sys:Double>
|
|
<sys:Double x:Key="TabHeaderHeight">75</sys:Double>
|
|
<GridLength x:Key="TabHeaderImageColumnWidth">1.3*</GridLength>
|
|
<GridLength x:Key="TabHeaderTextBlockColumnWidth">3*</GridLength>
|
|
|
|
<!-- ** Tab Page ** -->
|
|
|
|
<GridLength x:Key="TabPageColumn0Width">11*</GridLength>
|
|
<GridLength x:Key="TabPageColumn1Width">1*</GridLength>
|
|
<GridLength x:Key="TabPageColumn2Width">0</GridLength>
|
|
<GridLength x:Key="TabPageRow0Width">1*</GridLength>
|
|
<GridLength x:Key="TabPageRow1Width">8*</GridLength>
|
|
<GridLength x:Key="TabPageRow2Width">1*</GridLength>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** STYLES ** -->
|
|
|
|
<!-- ** TAB CONTROL ** -->
|
|
|
|
<Style TargetType="{x:Type TabControl}">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabControl">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!--
|
|
The Border around each TabItem will allow us to draw the line
|
|
between the TabItemPanel and the TabControl (resp. the
|
|
TabPage-container) when a TabItem is NOT selected, which
|
|
replaces the bottom line of the TabItemPanel's border.
|
|
Thus, we'll avoid drawing the bottom line for the selected
|
|
TabItem. Also, since the TabItem, when selected, applies a left
|
|
Margin of 4px, we need to add these here as Padding.
|
|
-->
|
|
|
|
<Border Background="{StaticResource TabControlBackgroundColor}"
|
|
Padding="5,10,0,5">
|
|
<!-- This is the area in which TabItems (the strips) will be drawn. -->
|
|
<TabPanel IsItemsHost="True"/>
|
|
</Border>
|
|
<!--
|
|
This is the outer border of the TabControl itself, actually meaning
|
|
the Panel that will host a TabItem's content.
|
|
The top-border here will not be drawn as, otherwise, the TabItemPanel
|
|
would always show a thin line for the selected Tab (which we want
|
|
to avoid).
|
|
-->
|
|
|
|
<Border BorderThickness="0"
|
|
Grid.Column="1"
|
|
Background="{StaticResource TabControlBackgroundColor}" >
|
|
<!-- This is the first/outer Border drawn on the TabPage -->
|
|
<Border BorderThickness="2"
|
|
BorderBrush="{StaticResource TabPageBorderColor}"
|
|
CornerRadius="5"
|
|
Margin="0,3,3,3">
|
|
<!--
|
|
This is the second/inner Border drawn on the TabPage.
|
|
This Border is drawn with a horizontal Gradient that is transparent
|
|
on the left which produces the fading effect.
|
|
-->
|
|
<Border BorderThickness="2"
|
|
BorderBrush="{StaticResource TabPageBorderColor_Shadow}"
|
|
Background="{StaticResource TabPageColor}"
|
|
CornerRadius="3"
|
|
Margin="0"
|
|
Padding="2"
|
|
>
|
|
<!--
|
|
This is where the Content of the selected TabPage
|
|
will be rendered.
|
|
-->
|
|
<ContentPresenter ContentSource="SelectedContent" Margin="0"/>
|
|
</Border>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- ** Tab Item ** -->
|
|
|
|
<Style TargetType="{x:Type TabItem}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabItem}">
|
|
<!-- The Grid helps defining the general dimension of TabItems. -->
|
|
<Grid Width="{StaticResource TabHeaderWidth}" Height="{StaticResource TabHeaderHeight}" Margin="0,0,0,0">
|
|
<Border Name="Border"
|
|
BorderBrush="Black"
|
|
BorderThickness="2,2,0,2"
|
|
CornerRadius="4,0,0,4">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
|
|
</Border.Effect>
|
|
<ContentPresenter x:Name="ContentSite"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
ContentSource="Header"
|
|
Margin="0"
|
|
RecognizesAccessKey="True"/>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<!--The appearance of a TabItem when it's inactive/unselected-->
|
|
<Trigger Property="IsSelected" Value="False">
|
|
<Setter Property="Panel.ZIndex" Value="90" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="Transparent" />
|
|
<Setter Property="Foreground"
|
|
Value="{StaticResource TabItemTextColor_Unselected}" />
|
|
<Setter Property="Effect" TargetName="Border" >
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="0" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
|
|
<!--The appearance of a TabItem when it's active/selected-->
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<!--We want the selected TabItem to always be on top.-->
|
|
<Setter Property="Panel.ZIndex" Value="100" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{StaticResource TabItemBorderColor_Selected}" />
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{StaticResource TabItemBackground_Selected}" />
|
|
|
|
<Setter Property="Foreground"
|
|
Value="{StaticResource TabItemTextColor_Selected}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Tab Header Image Style -->
|
|
<Style TargetType="Image" x:Key="TabHeaderImage">
|
|
<Setter Property="Stretch" Value="Uniform"/>
|
|
<Setter Property="Grid.Column" Value="0"/>
|
|
</Style>
|
|
|
|
<!-- Tab Header TextBlock Style -->
|
|
<Style TargetType="TextBlock" x:Key="TabHeaderTextBlock">
|
|
<Setter Property="FontSize" Value="25"/>
|
|
<Setter Property="Grid.Column" Value="1"/>
|
|
<Setter Property="Padding" Value="0,17,0,0"/>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** BUTTON ** -->
|
|
|
|
<Style TargetType="Button">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Name="Border"
|
|
CornerRadius="5"
|
|
Background="{StaticResource ButtonBackGroundColor_Unselected}"
|
|
BorderThickness="2"
|
|
BorderBrush="{StaticResource ButtonBorderColor_Unselected}"
|
|
Margin="2">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
|
|
</Border.Effect>
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
</ContentPresenter>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<!--The appearance of a Button when it's pressed-->
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Panel.ZIndex" Value="90" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="Transparent" />
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="Transparent" />
|
|
<Setter Property="Foreground"
|
|
Value="{StaticResource ButtonTextColor_Selected}" />
|
|
<Setter Property="Effect" TargetName="Border" >
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="0" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
|
|
<!--The appearance of a Button when it's not pressed-->
|
|
<Trigger Property="IsPressed" Value="False">
|
|
<Setter Property="Foreground"
|
|
Value="{StaticResource ButtonTextColor_Unselected}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Button Image Style -->
|
|
<Style TargetType="Image" x:Key="ButtonImage">
|
|
<Setter Property="Stretch" Value="UniformToFill"/>
|
|
<Setter Property="Width" Value="35"/>
|
|
<Setter Property="Height" Value="35"/>
|
|
</Style>
|
|
|
|
<!-- Button TextBlock Style -->
|
|
<Style TargetType="TextBlock" x:Key="ButtonTextBlock">
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<!--<Setter Property="Padding" Value="0,17,0,0"/>-->
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** TOGGLEBUTTON ** -->
|
|
|
|
<Style TargetType="ToggleButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Name="Border"
|
|
CornerRadius="5"
|
|
Background="{StaticResource ButtonBackGroundColor_Unselected}"
|
|
BorderThickness="2"
|
|
BorderBrush="{StaticResource ButtonBorderColor_Unselected}"
|
|
Margin="2">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
|
|
</Border.Effect>
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
</ContentPresenter>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<!--The appearance of a Button when it's checked-->
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="Panel.ZIndex" Value="90" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{StaticResource ToggleButtonBorderColor_Pressed}" />
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{StaticResource ToggleButtonBackGroundColor_Pressed}" />
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** BORDER ** -->
|
|
|
|
<Style TargetType="Border" x:Key="CustomBorder">
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
<Setter Property="Background" Value="LightGray"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter Property="BorderBrush" Value="DarkGray"/>
|
|
<Setter Property="Margin" Value="2" />
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** TEXTBOX ** -->
|
|
|
|
<Style TargetType="{x:Type TextBox}" x:Key="NumericKeyboard">
|
|
<Setter Property="IsReadOnly" Value="True"/>
|
|
<EventSetter Event="PreviewMouseDown" Handler="NumericKeyboard_PreviewMouseDown"/>
|
|
<EventSetter Event="TextChanged" Handler="NumericKeyboard_TextChanged" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type TextBox}" x:Key="Keyboard">
|
|
<Setter Property="IsReadOnly" Value="True"/>
|
|
<EventSetter Event="PreviewMouseDown" Handler="Keyboard_PreviewMouseDown"/>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** LISTBOX ** -->
|
|
|
|
<DataTemplate x:Key="DataTemplateItem">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" VerticalAlignment="Center" />
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** COMBOBOX ** -->
|
|
|
|
<Style x:Key="ComboBoxFocusVisual">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle StrokeDashArray="1 2" StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" Margin="4,4,21,4"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#F3F3F3" Offset="0"/>
|
|
<GradientStop Color="#EBEBEB" Offset="0.5"/>
|
|
<GradientStop Color="#DDDDDD" Offset="0.5"/>
|
|
<GradientStop Color="#CDCDCD" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
|
|
<Geometry x:Key="DownArrowGeometry">M 0 0 L 3.5 4 L 7 0 Z</Geometry>
|
|
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="ToggleButton">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="ClickMode" Value="Press"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border Name="Border"
|
|
CornerRadius="5"
|
|
Background="{StaticResource ButtonBackGroundColor_Unselected}"
|
|
BorderThickness="2"
|
|
BorderBrush="{StaticResource ButtonBorderColor_Unselected}"
|
|
Margin="2" >
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="0" BlurRadius="10"/>
|
|
</Border.Effect>
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" >
|
|
</ContentPresenter>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource ButtonBorderColor_Unselected}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="BorderBrush" TargetName="Border" Value="#AFAFAF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<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 x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="AllowDrop" Value="true"/>
|
|
<Setter Property="MinWidth" Value="0"/>
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
<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 TextBox}">
|
|
<ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="ClickMode" Value="Press"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Themes:ButtonChrome x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" RoundCorners="false" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
|
<Path x:Name="Arrow" Data="{StaticResource DownArrowGeometry}" Fill="Black" HorizontalAlignment="Center" Margin="0,1,0,0" VerticalAlignment="Center"/>
|
|
</Themes:ButtonChrome>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
|
|
<Grid x:Name="Placement" SnapsToDevicePixels="true">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
|
<Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=Placement}">
|
|
<Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
|
<ScrollViewer x:Name="DropDownScrollViewer">
|
|
<Grid RenderOptions.ClearTypeHint="Enabled">
|
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
|
<Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
|
|
</Canvas>
|
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Themes:SystemDropShadowChrome>
|
|
</Popup>
|
|
<Themes:ListBoxChrome x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"/>
|
|
<TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
<ToggleButton Grid.Column="1" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsKeyboardFocusWithin" Value="true">
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDropDownOpen" Value="true">
|
|
<Setter Property="RenderFocused" TargetName="Border" Value="true"/>
|
|
</Trigger>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
<Setter Property="Background" Value="#FFF4F4F4"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
</Trigger>
|
|
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
|
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
|
|
<Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
|
|
</Trigger>
|
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
|
<Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
|
<Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
<Style TargetType="{x:Type ComboBox}">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
|
|
<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
|
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="Padding" Value="4,3"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ComboBox}">
|
|
<Grid x:Name="MainGrid" SnapsToDevicePixels="true">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
|
<Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=MainGrid}">
|
|
<Border x:Name="DropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
|
|
<ScrollViewer x:Name="DropDownScrollViewer">
|
|
<Grid RenderOptions.ClearTypeHint="Enabled">
|
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
|
<Rectangle x:Name="OpaqueRect" Fill="{Binding Background, ElementName=DropDownBorder}" Height="{Binding ActualHeight, ElementName=DropDownBorder}" Width="{Binding ActualWidth, ElementName=DropDownBorder}"/>
|
|
</Canvas>
|
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Themes:SystemDropShadowChrome>
|
|
</Popup>
|
|
<ToggleButton BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxReadonlyToggleButton}"/>
|
|
<ContentPresenter ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
|
|
<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
|
|
<Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
|
|
</Trigger>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter Property="Height" TargetName="DropDownBorder" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
<Setter Property="Background" Value="#FFF4F4F4"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
</Trigger>
|
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
|
<Setter Property="Canvas.Top" TargetName="OpaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
|
<Setter Property="Canvas.Left" TargetName="OpaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEditable" Value="true">
|
|
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Padding" Value="3"/>
|
|
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** SLIDER ** -->
|
|
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
|
|
<GradientStop Color="white" Offset="0"/>
|
|
<GradientStop Color="#B8E2F9" Offset="0.5"/>
|
|
<GradientStop Color="#B0DFF8" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
|
|
<GradientStop Color="#B8E4FA" Offset="0.25"/>
|
|
<GradientStop Color="#5EB4E3" Offset="0.5"/>
|
|
<GradientStop Color="#4C8BB4" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
|
|
<Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
|
|
<Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
|
|
<Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
|
|
<GradientStop Color="White" Offset="0"/>
|
|
<GradientStop Color="#F0EFEF" Offset="0.4"/>
|
|
<GradientStop Color="#D6D5D5" Offset=".8"/>
|
|
</LinearGradientBrush>
|
|
<Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
|
|
<Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="18"/>
|
|
<Setter Property="Width" Value="10"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="180"/>
|
|
<TranslateTransform X="5" Y="9"/>
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackgroundInverted}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="white" Offset="0"/>
|
|
<GradientStop Color="#B8E2F9" Offset="0.5"/>
|
|
<GradientStop Color="#B0DFF8" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#B8E4FA" Offset="0.25"/>
|
|
<GradientStop Color="#5EB4E3" Offset="0.5"/>
|
|
<GradientStop Color="#4C8BB4" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="White" Offset="0"/>
|
|
<GradientStop Color="#F0EFEF" Offset="0.4"/>
|
|
<GradientStop Color="#D6D5D5" Offset=".8"/>
|
|
</LinearGradientBrush>
|
|
<!-- Style che definisce la barretta mobile orizzontale con la freccia in giù -->
|
|
<Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="18"/>
|
|
<Setter Property="Width" Value="10"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TranslateTransform X="5" Y="9"/>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#FFAEB1AF" Offset="0.1"/>
|
|
<GradientStop Color="White" Offset=".9"/>
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
|
|
<Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Rectangle Fill="Transparent"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!-- Geometry che probabilmente definiscono forma e dimensioni della barretta mobile orizzontale -->
|
|
<Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
|
|
<Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
|
|
<!-- Style che definisce la barretta mobile orizzontale -->
|
|
<Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="22"/>
|
|
<Setter Property="Width" Value="11"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TranslateTransform X="5.5" Y="11"/>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource HorizontalSliderThumbNormalBackground}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
|
|
<GradientStop Color="white" Offset="0"/>
|
|
<GradientStop Color="#B8E2F9" Offset="0.5"/>
|
|
<GradientStop Color="#B0DFF8" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
|
|
<GradientStop Color="#B8E4FA" Offset="0.25"/>
|
|
<GradientStop Color="#5EB4E3" Offset="0.5"/>
|
|
<GradientStop Color="#4C8BB4" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
|
|
<GradientStop Color="White" Offset="0"/>
|
|
<GradientStop Color="#F0EFEF" Offset="0.4"/>
|
|
<GradientStop Color="#D6D5D5" Offset=".8"/>
|
|
</LinearGradientBrush>
|
|
<Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="10"/>
|
|
<Setter Property="Width" Value="18"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="90"/>
|
|
<TranslateTransform X="9" Y="5"/>
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
|
|
<GradientStop Color="white" Offset="0"/>
|
|
<GradientStop Color="#B8E2F9" Offset="0.5"/>
|
|
<GradientStop Color="#B0DFF8" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
|
|
<GradientStop Color="#B8E4FA" Offset="0.25"/>
|
|
<GradientStop Color="#5EB4E3" Offset="0.5"/>
|
|
<GradientStop Color="#4C8BB4" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
<LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
|
|
<GradientStop Color="White" Offset="0"/>
|
|
<GradientStop Color="#F0EFEF" Offset="0.4"/>
|
|
<GradientStop Color="#D6D5D5" Offset=".8"/>
|
|
</LinearGradientBrush>
|
|
<Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="10"/>
|
|
<Setter Property="Width" Value="18"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="-90"/>
|
|
<TranslateTransform X="9" Y="5"/>
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
|
|
<GradientStop Color="#FFAEB1AF" Offset="0.1"/>
|
|
<GradientStop Color="White" Offset=".9"/>
|
|
</LinearGradientBrush>
|
|
<Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Height" Value="11"/>
|
|
<Setter Property="Width" Value="22"/>
|
|
<Setter Property="Foreground" Value="Gray"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Canvas SnapsToDevicePixels="true">
|
|
<Canvas.RenderTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="90"/>
|
|
<TranslateTransform X="11" Y="5.5"/>
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Canvas.RenderTransform>
|
|
<Path x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}" Fill="{StaticResource VerticalSliderThumbNormalBackground}"/>
|
|
<Path x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}" Stroke="White" StrokeThickness="1"/>
|
|
<Path x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}" Stroke="#FF929292" StrokeThickness="1"/>
|
|
</Canvas>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="Foreground" Value="Blue">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="true">
|
|
<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
|
|
<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
|
|
<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
|
|
<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type Slider}">
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#FFC4C4C4"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Slider}">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<!-- TickBar che definiscono la riga con le linette -->
|
|
<TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
|
|
<TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
|
|
<!-- Border che definisce la riga orizzontale -->
|
|
<Border x:Name="TrackBackground" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" CornerRadius="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
|
|
<Canvas Margin="-6,-1">
|
|
<Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden"/>
|
|
</Canvas>
|
|
</Border>
|
|
<Track x:Name="PART_Track" Grid.Row="1">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
|
|
</Track.IncreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
|
<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
|
|
<Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
|
|
</Trigger>
|
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
|
<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
|
|
<Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
|
|
</Trigger>
|
|
<Trigger Property="TickPlacement" Value="Both">
|
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelectionRangeEnabled" Value="true">
|
|
<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="Orientation" Value="Vertical">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Slider}">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left" Visibility="Collapsed" Width="4"/>
|
|
<TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right" Visibility="Collapsed" Width="4"/>
|
|
<Border x:Name="TrackBackground" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" Grid.Column="1" CornerRadius="1" HorizontalAlignment="center" Margin="0,5" Width="4.0">
|
|
<Canvas Margin="-1,-6">
|
|
<Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Visibility="Hidden" Width="4.0"/>
|
|
</Canvas>
|
|
</Border>
|
|
<Track x:Name="PART_Track" Grid.Column="1">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonStyle}"/>
|
|
</Track.IncreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
|
<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
|
|
<Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
|
|
</Trigger>
|
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
|
<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
|
|
<Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
|
|
</Trigger>
|
|
<Trigger Property="TickPlacement" Value="Both">
|
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelectionRangeEnabled" Value="true">
|
|
<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** TREEVIEW ** -->
|
|
<!-- ** Particolare Style e colori per la freccetta triangolare necessari per il funzionamento del TreeView ** -->
|
|
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Fill" Color="#FF595959"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Checked.Stroke" Color="#FF262626"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Stroke" Color="#FF1BBBFA"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Fill" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Stroke" Color="#FF262626"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.MouseOver.Checked.Fill" Color="#FF595959"/>
|
|
<PathGeometry x:Key="TreeArrow" Figures="M0,0 L0,6 L6,0 z"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Fill" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="TreeViewItem.TreeArrow.Static.Stroke" Color="#FF989898"/>
|
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Focusable" Value="False"/>
|
|
<Setter Property="Width" Value="16"/>
|
|
<Setter Property="Height" Value="16"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Background="Transparent" Height="16" Padding="5,5,5,5" Width="16">
|
|
<Path x:Name="ExpandPath" Data="{StaticResource TreeArrow}" Fill="{StaticResource TreeViewItem.TreeArrow.Static.Fill}" Stroke="{StaticResource TreeViewItem.TreeArrow.Static.Stroke}">
|
|
<Path.RenderTransform>
|
|
<RotateTransform Angle="135" CenterY="3" CenterX="3"/>
|
|
</Path.RenderTransform>
|
|
</Path>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
|
<Setter.Value>
|
|
<RotateTransform Angle="180" CenterY="3" CenterX="3"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Fill}"/>
|
|
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.Static.Checked.Stroke}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Stroke}"/>
|
|
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Fill}"/>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
<Condition Property="IsChecked" Value="True"/>
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Stroke" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Stroke}"/>
|
|
<Setter Property="Fill" TargetName="ExpandPath" Value="{StaticResource TreeViewItem.TreeArrow.MouseOver.Checked.Fill}"/>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
<!-- ** CHECKBOX ** -->
|
|
|
|
<local:CheckboxConverter x:Key="converter"></local:CheckboxConverter>
|
|
<Style TargetType="{x:Type CheckBox}">
|
|
<Setter Property="FocusVisualStyle">
|
|
<Setter.Value>
|
|
<Style>
|
|
<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>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background" Value="White"/>
|
|
<Setter Property="BorderBrush" Value="#FF707070"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type CheckBox}">
|
|
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True" >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border x:Name="checkBoxBorder" Height="{Binding Path=ActualHeight, ElementName=templateRoot}" Width="{Binding Path=ActualHeight, ElementName=templateRoot}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
|
<Grid x:Name="markGrid">
|
|
<Path x:Name="optionMark" Data="F1M9.97498,1.22334L4.6983,9.09834 4.52164,9.09834 0,5.19331 1.27664,3.52165 4.255,6.08833 8.33331,1.52588E-05 9.97498,1.22334z" Fill="#FF212121" Margin="1" Opacity="0" Stretch="None" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<Path.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform>
|
|
<ScaleTransform.ScaleX>
|
|
<MultiBinding Converter="{StaticResource converter}">
|
|
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
|
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
|
</MultiBinding>
|
|
</ScaleTransform.ScaleX>
|
|
<ScaleTransform.ScaleY>
|
|
<MultiBinding Converter="{StaticResource converter}">
|
|
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
|
|
|
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
|
</MultiBinding>
|
|
</ScaleTransform.ScaleY>
|
|
</ScaleTransform>
|
|
</TransformGroup>
|
|
</Path.RenderTransform>
|
|
</Path>
|
|
<Rectangle x:Name="indeterminateMark" Fill="#FF212121" Margin="2" Opacity="0"/>
|
|
</Grid>
|
|
</Border>
|
|
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasContent" Value="True">
|
|
<Setter Property="FocusVisualStyle">
|
|
<Setter.Value>
|
|
<Style>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Padding" Value="4,-1,0,0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFF3F9FF"/>
|
|
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF5593FF"/>
|
|
<Setter Property="Fill" TargetName="optionMark" Value="#FF212121"/>
|
|
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF212121"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFE6E6E6"/>
|
|
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FFBCBCBC"/>
|
|
<Setter Property="Fill" TargetName="optionMark" Value="#FF707070"/>
|
|
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF707070"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FFD9ECFF"/>
|
|
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF3C77DD"/>
|
|
<Setter Property="Fill" TargetName="optionMark" Value="#FF212121"/>
|
|
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF212121"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
|
|
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
|
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
|
|
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- *************************************************************************** -->
|
|
|
|
</ResourceDictionary>
|