<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:system="clr-namespace:System;assembly=mscorlib"
   xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
   xmlns:project="clr-namespace:OmagCUT"
   xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions"

   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">


   <!--Importo EgtDictionary-->
   <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="EgtDictionary.xaml" />
   </ResourceDictionary.MergedDictionaries>

   <!--Colori predefiniti-->
   <SolidColorBrush x:Key="OmagCut_Blue" Color="#FF095CA8" />
   <SolidColorBrush x:Key="OmagCut_Yellow" Color="#FFFFCE5B" />
   <SolidColorBrush x:Key="OmagCut_Red" Color="Red" />
   <SolidColorBrush x:Key="OmagCut_Green" Color="LawnGreen" />
   <SolidColorBrush x:Key="OmagCut_VeryLightGray" Color="#FFF2F2F2" />
   <SolidColorBrush x:Key="OmagCut_LightGray" Color="LightGray" />
   <SolidColorBrush x:Key="OmagCut_Gray" Color="#FF9E9E9E" />
   <SolidColorBrush x:Key="OmagCut_DarkGray" Color="#FF444444" />
   <SolidColorBrush x:Key="OmagCut_White" Color="#FFFFFFFF" />

   <LinearGradientBrush x:Key="OmagCut_GradientBlue" StartPoint="0,0" EndPoint="0,1" >
      <GradientStop Color="LightGray"/>
      <GradientStop Color="#BCB8C3CD" Offset="0.3894"/>
      <GradientStop Color="#9387A6C3" Offset="0.7356"/>
      <GradientStop Color="#8E85A5C2" Offset="0.8942"/>
      <GradientStop Color="#826A95BD" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_GradientYellow" StartPoint="0,0" EndPoint="0,1" >
      <GradientStop Color="LightGray" Offset="0.2212"/>
      <GradientStop Color="#66FFCE5B" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_TopGradientGray" StartPoint="0,1" EndPoint="0,0" >
      <GradientStop Color="LightGray"/>
      <GradientStop Color="#FF9E9E9E" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_BottomGradientGray" StartPoint="0,0" EndPoint="0,1" >
      <GradientStop Color="LightGray"/>
      <GradientStop Color="#FF9E9E9E" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_LeftGradientGray" StartPoint="1,0" EndPoint="0,0" >
      <GradientStop Color="LightGray"/>
      <GradientStop Color="#FF9E9E9E" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_RightGradientGray" StartPoint="0,0" EndPoint="1,0" >
      <GradientStop Color="LightGray"/>
      <GradientStop Color="#FF9E9E9E" Offset="1"/>
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="OmagCut_TreeViewGradientGray" StartPoint="0,0" EndPoint="0,1" >
      <GradientStop Color="LightGray"/>
      <!--<GradientStop Color="#B29E9E9E" Offset="0.7007"/>
      <GradientStop Color="#CC565656" Offset="1"/>-->
      <GradientStop Color="#FF9E9E9E" Offset="1"/>
   </LinearGradientBrush>

   <!--Parametri predefiniti-->
   <system:Double x:Key="Button_CornerRadius">9.5</system:Double>          <!--2.5mm-->
   <CornerRadius x:Key="EmptyBorder_CornerRadius">9.5</CornerRadius>       <!--2.5mm-->
   <Thickness x:Key="BorderThickness">3.3</Thickness>                      <!--2.5pt-->
   <system:Double x:Key="GroupBox_CornerRadius">9.5</system:Double>        <!--2.5mm-->
   <system:Double x:Key="GroupBox_FirstColumn">12.5</system:Double>        <!--3.3mm-->
   <system:Double x:Key="CheckBox_Height">40</system:Double>
   <system:Double x:Key="FontSize_UpperCaseCharacter">18.6</system:Double> <!--14pt-->
   <system:Double x:Key="FontSize_LowerCaseCharacter">20</system:Double>   <!--15pt-->
   <system:Double x:Key="FontSize_LowerBarTitle">33.3</system:Double>      <!--25pt-->
   <system:Double x:Key="FontSize_LowerBarValue">24</system:Double>        <!--18pt-->
   <system:Double x:Key="FontSize_LowerBarOverride">18.6</system:Double>   <!--14pt-->
   <system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double>      <!--10pt-->
   <system:Double x:Key="FontSize_GroupBoxHeader">22</system:Double>
   <system:Double x:Key="ComboBox_Height">40</system:Double>
   <system:Double x:Key="ComboBoxTextBlock_Height">40</system:Double>
   <system:Double x:Key="ArrowImage_Height">65</system:Double>
   <system:Double x:Key="ScaleImage_Height">65</system:Double>
   <system:Double x:Key="MachineStatusImage_Height">75</system:Double>
   <system:Double x:Key="SplitPageBtn_FontSize">16</system:Double>
   <Thickness x:Key="Button_MarginThickness">1</Thickness>
   <Thickness x:Key="TextBoxInGroupBox_Margin">3,0,9,0</Thickness>
   <Thickness x:Key="RightTextBoxInBorder_Margin">2,0,11,0</Thickness>
   <Thickness x:Key="MachRightTextBoxInBorder_Margin">2,0,10,0</Thickness>
   <Thickness x:Key="LeftTextBoxInBorder_Margin">5,0,8,0</Thickness>
   <Thickness x:Key="MachLeftTextBoxInBorder_Margin">4,0,8,0</Thickness>
   <Thickness x:Key="LeftTextBoxNoBorder_Margin">6,0,8,0</Thickness>
   <Thickness x:Key="MachToolLeftTextBoxNoBorder_Margin">4,0,15,0</Thickness>
   <Thickness x:Key="LeftComboBoxInBorder_Margin">4,0,8,0</Thickness>
   <Thickness x:Key="RightComboBoxInBorder_Margin">2,0,10,0</Thickness>
   <CornerRadius x:Key="Page_CornerRadius">9.5</CornerRadius>              <!--2.5mm-->

    <BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/AlignPieces.png"></BitmapImage>
    <BitmapImage x:Key="BarCodeImg" UriSource="Resources/BarCode.png"></BitmapImage>
    <BitmapImage x:Key="SlabIdImg" UriSource="Resources/SlabId.png"></BitmapImage>
    <BitmapImage x:Key="BottomLeftImg" UriSource="Resources/BottomLeft.png"></BitmapImage>
    <BitmapImage x:Key="BottomRightImg" UriSource="Resources/BottomRight.png"></BitmapImage>
    <BitmapImage x:Key="PartRotOnImg" UriSource="Resources/PartRotOn.png"></BitmapImage>
    <BitmapImage x:Key="PartRotOffImg" UriSource="Resources/PartRotOff.png"></BitmapImage>
    <BitmapImage x:Key="ClockwiseRotateImg" UriSource="Resources/ClockwiseRotate.png"></BitmapImage>
    <BitmapImage x:Key="CounterClockwiseRotateImg" UriSource="Resources/CounterClockwiseRotate.png"></BitmapImage>
    <BitmapImage x:Key="CsvMinusImg" UriSource="Resources/CsvMinus.png"></BitmapImage>
    <BitmapImage x:Key="CsvNewImg" UriSource="Resources/CsvNew.png"></BitmapImage>
    <BitmapImage x:Key="CsvOpenImg" UriSource="Resources/CsvOpen.png"></BitmapImage>
    <BitmapImage x:Key="CsvPlusImg" UriSource="Resources/CsvPlus.png"></BitmapImage>
    <BitmapImage x:Key="CsvRuinedPartsImg" UriSource="Resources/CsvRuinedParts.png"></BitmapImage>
    <BitmapImage x:Key="DownArrowImg" UriSource="Resources/DownArrow.png"></BitmapImage>
    <BitmapImage x:Key="DrawImg" UriSource="Resources/Draw.png"></BitmapImage>
    <BitmapImage x:Key="FrameMachiningImg" UriSource="Resources/FrameMachining.png"></BitmapImage>
    <BitmapImage x:Key="GenerateCNImg" UriSource="Resources/GenerateCN.png"></BitmapImage>
    <BitmapImage x:Key="GenericViewImg" UriSource="Resources/GenericView.png"></BitmapImage>
    <BitmapImage x:Key="HalfTurnRotateImg" UriSource="Resources/HalfTurnRotate.png"></BitmapImage>
    <BitmapImage x:Key="ImportImg" UriSource="Resources/Import.png"></BitmapImage>
    <BitmapImage x:Key="LeftArrowImg" UriSource="Resources/LeftArrow.png"></BitmapImage>
    <BitmapImage x:Key="LookFromTOPImg" UriSource="Resources/LookFromTOP.png"></BitmapImage>
    <BitmapImage x:Key="ManualImg" UriSource="Resources/Manual.png"></BitmapImage>
    <BitmapImage x:Key="MeasureImg" UriSource="Resources/Measure.png"></BitmapImage>
    <BitmapImage x:Key="MHTImg" UriSource="Resources/MHT.png"></BitmapImage>
    <BitmapImage x:Key="NestImg" UriSource="Resources/Nest.png"></BitmapImage>
    <BitmapImage x:Key="NumericKeyboardArrowImg" UriSource="Resources/NumericKeyboardArrow.png"></BitmapImage>
    <BitmapImage x:Key="OptionsImg" UriSource="Resources/Options.png"></BitmapImage>
    <BitmapImage x:Key="PanImg" UriSource="Resources/Pan.png"></BitmapImage>
    <BitmapImage x:Key="PhotoImg" UriSource="Resources/Photo.png"></BitmapImage>
    <BitmapImage x:Key="RawPartImg" UriSource="Resources/RawPart.png"></BitmapImage>
    <BitmapImage x:Key="RawProbeImg" UriSource="Resources/RawProbe.png"></BitmapImage>
    <BitmapImage x:Key="RightArrowImg" UriSource="Resources/RightArrow.png"></BitmapImage>
    <BitmapImage x:Key="SawProbeImg" UriSource="Resources/SawProbe.png"></BitmapImage>
    <BitmapImage x:Key="SendImg" UriSource="Resources/Send.png"></BitmapImage>
    <BitmapImage x:Key="SplitImg" UriSource="Resources/Split.png"></BitmapImage>
    <BitmapImage x:Key="ToolChangerPosImg" UriSource="Resources/ToolChengerPos.png"></BitmapImage>
    <BitmapImage x:Key="TopLeftImg" UriSource="Resources/TopLeft.png"></BitmapImage>
    <BitmapImage x:Key="TopRightImg" UriSource="Resources/TopRight.png"></BitmapImage>
    <BitmapImage x:Key="UpArrowImg" UriSource="Resources/UpArrow.png"></BitmapImage>
    <BitmapImage x:Key="VImg" UriSource="Resources/V.png"></BitmapImage>
    <BitmapImage x:Key="XImg" UriSource="Resources/X.png"></BitmapImage>
    <BitmapImage x:Key="ZoomAllImg" UriSource="Resources/ZoomAll.png"></BitmapImage>
    <BitmapImage x:Key="ZoomInImg" UriSource="Resources/ZoomIn.png"></BitmapImage>
    <BitmapImage x:Key="ZoomOutImg" UriSource="Resources/ZoomOut.png"></BitmapImage>
    <BitmapImage x:Key="ZoomWinImg" UriSource="Resources/ZoomWIn.png"></BitmapImage>
    <BitmapImage x:Key="LogoOmagImg" UriSource="Resources/LogoOmag.jpg"></BitmapImage>
    <BitmapImage x:Key="AvantiVeloceImg" UriSource="Resources/AvantiVeloce.png"></BitmapImage>
    <BitmapImage x:Key="IndietroVeloceImg" UriSource="Resources/IndietroVeloce.png"></BitmapImage>
    <BitmapImage x:Key="MaxMoveImg" UriSource="Resources/MaxMove.png"></BitmapImage>
    <BitmapImage x:Key="PauseImg" UriSource="Resources/Pause.png"></BitmapImage>
    <BitmapImage x:Key="PlayImg" UriSource="Resources/Play.png"></BitmapImage>
    <BitmapImage x:Key="PlayStepImg" UriSource="Resources/PlayStep.png"></BitmapImage>
    <BitmapImage x:Key="StopImg" UriSource="Resources/Stop.png"></BitmapImage>
    <BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage>

    <!--sono le stesse immagini usate per l'interfaccia Dark-->
    <!--General-->
    <BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
    <BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>

    <!--ProjectManager-->
    <BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
    <BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
    <BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
    <BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
    <BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
    <BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
    <BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
    <BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
    <BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
    <BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
    <BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
    <BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
    <BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>

    <!--Machine-->
    <BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
    <BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
    <BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
    <BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
    <BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>


    <!--Direct cuts-->
    <BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
    <BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
    <BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
    <BitmapImage x:Key="Foro-singoloImg" UriSource="Resources/NewIcons/Foro-singolo.png"></BitmapImage>
    <BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
    <BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
    <BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
    <BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
    <BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
    <BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
    <BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
    <BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
    <BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
    <BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
    <BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
    <BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
    <BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>

    <BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
    <BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
    <BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>


    <!--Frame-->
    <BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
    <BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
    <BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>

    <!--Machinig-->
    <BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
    <BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
    <BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
    <BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
    <BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
    <BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
    <BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
    <BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
    <BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
    <BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
    <BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
    <BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
    <BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
    <BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
    <BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
    <BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
    <BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
    <BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
    <BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>

    <FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>

    <SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="OmagCut_TreeViewTextColor" Color="#000000" />
    <SolidColorBrush x:Key="OmagCut_TreeViewDelimiterColor" Color="Transparent" />
    
    <SolidColorBrush x:Key="OmagCut_TreeViewSelectedItemBackground" Color="Transparent" />
    <SolidColorBrush x:Key="OmagCut_TreeViewSelectedItemBorder" Color="RoyalBlue" />

    <!-- ______________________________________________________________________________________________________________________ -->

    <!--Empty Border-->
   <Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}">
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="CornerRadius" Value="{StaticResource EmptyBorder_CornerRadius}"/>
      <Setter Property="Margin" Value="1" />
   </Style>

    <Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
        <!--<Setter Property="Background" Value="#636974"   #3C3F48/>
        <Setter Property="BorderBrush" Value="#636974"      #3C3F48/>-->
        <Setter Property="Background" Value="{StaticResource OmagCut_Yellow}"/>
        <Setter Property="BorderBrush" Value="#3C3F48"/>
    </Style>

    <!--Border-->
   <Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
   </Style>

   <Style x:Key="OmagCut_IconBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
      <Setter Property="Background" Value="White"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Padding" Value="5"/>
   </Style>

   <Style x:Key="OmagCut_NoNameGroupBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
   </Style>

   <Style x:Key="OmagCut_PageBorder" TargetType="{x:Type Border}" >
      <Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
   </Style>

   <Style x:Key="OmagCut_WindowBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
      <Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_DarkGray}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_VeryLightGray}"/>
   </Style>

   <Style x:Key="OmagCut_Page2Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
   </Style>

    <Style x:Key="OmagCut_DirectCutPageBorder" TargetType="{x:Type Border}" >
        <Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
        <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
    </Style>

    <!-- ______________________________________________________________________________________________________________________ -->

   <LinearGradientBrush x:Key="Button_IsMouseOver" />

   <!--Button generico-->
   <Style x:Key="OmagCut_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="project:ButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
      <Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
      <Setter Property="Padding" Value="5"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
      <Style.Triggers>
         <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Background" Value="#FFB8C3CD"/>
         </Trigger>
         <Trigger Property="IsPressed" Value="True">
            <Setter Property="OpacityMask" Value="#33FF0000"/>
         </Trigger>
         <Trigger Property="ToggleButton.IsChecked" Value="True">
            <Setter Property="Background" Value="Transparent"/>
         </Trigger>
         <Trigger Property="IsEnabled" Value="False">
            <Setter Property="Background" Value="#FFF4F4F4"/>
            <Setter Property="BorderBrush" Value="#FFADB2B5"/>
            <Setter Property="TextElement.Foreground"  Value="#FF838383"/>
         </Trigger>
      </Style.Triggers>
   </Style>

    <Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
        <Setter Property="ContentTemplate" Value="{StaticResource Button_DataTemplate_Wrap}" />
        <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}" />
    </Style>

    <!--BlueIconOmagCutButton-->
   <Style x:Key="OmagCut_BlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--BlueTextOmagCutButton-->
   <Style x:Key="OmagCut_BlueTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--GradientBlueOmagCutButton-->
   <Style x:Key="OmagCut_GradientBlueTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientBlue}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

    <!--OmagCut_GradientBlueTextButtonPrjMgr-->
    <Style x:Key="OmagCut_GradientBlueTextButtonPrjMgr" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
        <Setter Property="Background" Value="{StaticResource OmagCut_GradientBlue}"/>
        <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    </Style>

    <!--GradientBlueOmagCutButton-->
   <Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientBlue}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowIconOmagCutButton-->
   <Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
   </Style>

   <!--YellowTextOmagCutButton-->
   <Style x:Key="OmagCut_YellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_YellowGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_YellowGradientYellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_TopGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_TopGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_BottomGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_BottomGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_LeftGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LeftGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_RightGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton-->
   <Style x:Key="OmagCut_TreeViewGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
      <Setter Property="Background" Value="{StaticResource OmagCut_TreeViewGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <Style x:Key="OmagCut_RightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--WindowGrayOmagCutButton-->
   <Style x:Key="OmagCut_WindowGrayTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_DarkGray}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
   </Style>

   <!--YellowOmagCutButton Special for MachineCommands-->
   <Style x:Key="OmagCut_MachineCommandsYellowGradientYellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="project:ButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
      <Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
      <Setter Property="Padding" Value="5"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Style.Triggers>
         <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Background" Value="#FFB8C3CD"/>
         </Trigger>
         <Trigger Property="IsPressed" Value="True">
            <Setter Property="Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
         <Trigger Property="ToggleButton.IsChecked" Value="True">
            <Setter Property="Background" Value="Transparent"/>
         </Trigger>
         <Trigger Property="IsEnabled" Value="False">
            <Setter Property="Background" Value="#FFF4F4F4"/>
            <Setter Property="BorderBrush" Value="#FFADB2B5"/>
            <Setter Property="TextElement.Foreground"  Value="#FF838383"/>
         </Trigger>
      </Style.Triggers>
   </Style>

    <Style x:Key="OmagCut_WjDbRightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
        <Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
        <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="FontSize" Value="15"/>
    </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--CheckBox-->

   <Style x:Key="OmagCut_CheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Setter Property="Height" Value="{DynamicResource CheckBox_Height}"/>
   </Style>

   <Style x:Key="OmagCut_CheckBox_Wrap" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource OmagCut_CheckBox}">
      <Setter Property="ContentTemplate" Value="{StaticResource CheckBox_DataTemplate_Wrap}" />
   </Style>

   <Style x:Key="OmagCut_CheckBox_Single" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource OmagCut_CheckBox}">
      <Setter Property="Width" Value="{DynamicResource CheckBox_Height}"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--ComboBox-->

   <!--ComboBoxBackground-->
   <LinearGradientBrush x:Key="ComboBox_Background" EndPoint="0.5,1" StartPoint="0.5,0">
      <GradientStop Color="#FFDDDDDD"/>
      <GradientStop Color="#FFA2A2A2" Offset="1"/>
   </LinearGradientBrush>

   <!--ComboBoxBorder-->
   <Style x:Key="ComboBox_Border" TargetType="{x:Type Border}">
      <Setter Property="Background" Value="{StaticResource ComboBox_Background}"/>
      <Setter Property="BorderThickness" Value="1"/>
   </Style>

   <!--ComboBoxToggleButton-->
   <Style x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="ToggleButton">
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition />
                     <ColumnDefinition Width="32" />
                  </Grid.ColumnDefinitions>
                  <Border
                     x:Name="Border" Grid.ColumnSpan="2"
                     Style="{StaticResource ComboBox_Border}"
                     BorderBrush="{TemplateBinding BorderBrush}"/>
                  <Border 
                     Grid.Column="0"
                     CornerRadius="0" 
                     Background="Transparent" 
                     BorderBrush="Transparent"
                     BorderThickness="10" />
                  <Path 
                     x:Name="Arrow"
                     Grid.Column="1"     
                     Fill="{TemplateBinding Foreground}"
                     Stroke="{TemplateBinding Foreground}"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Data="M 6,0 L 6,6 L 0,6 Z" RenderTransformOrigin="0.5,0.5">
                     <Path.RenderTransform>
                        <TransformGroup>
                           <ScaleTransform/>
                           <SkewTransform/>
                           <RotateTransform Angle="45"/>
                           <TranslateTransform/>
                        </TransformGroup>
                     </Path.RenderTransform>
                  </Path>
               </Grid>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsEnabled" Value="False">
                     <Setter TargetName="Border" Property="Background" Value="LightGray" />
                     <Setter TargetName="Border" Property="BorderBrush" Value="Gray" />
                     <Setter Property="Foreground" Value="Gray"/>
                     <Setter TargetName="Arrow" Property="Fill" Value="Gray" />
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!--ComboBoxTextBox-->
   <ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
      <Border x:Name="PART_ContentHost" Focusable="True" />
   </ControlTemplate>

   <!--ComboBox Style-->
   <Style TargetType="{x:Type ComboBox}">
      <Setter Property="Foreground" Value="Black" />
      <Setter Property="BorderBrush" Value="Black" />
      <Setter Property="Background" Value="White" />
      <Setter Property="SnapsToDevicePixels" Value="true"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
      <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
      <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
      <Setter Property="FontSize" Value="20" />
      <Setter Property="VerticalContentAlignment" Value="Center" />
      <Setter Property="FontWeight" Value="Normal" />
      <Setter Property="MinWidth" Value="50"/>
      <Setter Property="MinHeight" Value="32"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="ComboBox">
               <Grid>
                  <ToggleButton 
                     Name="ToggleButton" 
                     BorderBrush="{TemplateBinding BorderBrush}"
                     Background="{TemplateBinding Background}"
                     Foreground="{TemplateBinding Foreground}"
                     Style="{StaticResource ComboBoxToggleButton}" 
                     Grid.Column="2" 
                     Focusable="false"
                     IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                     ClickMode="Press">
                  </ToggleButton>
                  <ContentPresenter
                     Name="ContentSite"
                     IsHitTestVisible="False" 
                     Content="{TemplateBinding SelectionBoxItem}"
                     ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                     ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                     Margin="10,3,30,3"
                     VerticalAlignment="Center"
                     HorizontalAlignment="Center" />
                  <TextBox x:Name="PART_EditableTextBox"
                     Style="{x:Null}" 
                     Template="{StaticResource ComboBoxTextBox}" 
                     HorizontalAlignment="Center" 
                     VerticalAlignment="Center" 
                     Margin="3,3,23,3"
                     Focusable="True"                                
                     Visibility="Hidden"
                     IsReadOnly="{TemplateBinding IsReadOnly}"/>
                  <Popup
                     Name="Popup"
                     Placement="Bottom"
                     IsOpen="{TemplateBinding IsDropDownOpen}"
                     AllowsTransparency="True" 
                     Focusable="False"
                     PopupAnimation="Slide">
                     <Grid 
                        Name="DropDown"
                        SnapsToDevicePixels="True"                
                        MinWidth="{TemplateBinding ActualWidth}"
                        MaxHeight="{TemplateBinding MaxDropDownHeight}">
                        <Border 
                           x:Name="DropDownBorder"
                           Style="{StaticResource ComboBox_Border}"
                           BorderBrush="{TemplateBinding BorderBrush}"/>
                        <ScrollViewer Margin="2,4,2,4" SnapsToDevicePixels="True">
                           <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                        </ScrollViewer>
                     </Grid>
                  </Popup>

               </Grid>
               <ControlTemplate.Triggers>
                  <Trigger Property="HasItems" Value="false">
                     <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
                  </Trigger>
                  <Trigger Property="IsGrouping" Value="true">
                     <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                  </Trigger>
                  <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
                     <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0"/>
                     <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,2"/>
                  </Trigger>
                  <Trigger Property="IsEditable" Value="true">
                     <Setter Property="IsTabStop" Value="false"/>
                     <Setter TargetName="PART_EditableTextBox" Property="Visibility"    Value="Visible"/>
                     <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
      <Style.Triggers>
      </Style.Triggers>
   </Style>

   <!--ComboBoxItemStyle-->
   <Style TargetType="{x:Type ComboBoxItem}">
      <Setter Property="SnapsToDevicePixels" Value="true" />
      <Setter Property="HorizontalAlignment" Value="Stretch" />
      <Setter Property="VerticalAlignment" Value="Stretch" />
      <Setter Property="Height" Value="{StaticResource ComboBoxTextBlock_Height}" />
      <Setter Property="FontSize" Value="20" />
      <Setter Property="FontWeight" Value="Normal" />
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="ComboBoxItem">
               <Border
                  Name="Border"
                  Padding="0"
                  Margin="2"
                  BorderThickness="2"
                  CornerRadius="0"
                  Background="Transparent"
                  BorderBrush="Transparent"
                 >

                  <TextBlock TextAlignment="Center" VerticalAlignment="Center">
                     <ContentPresenter/>
                  </TextBlock>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsHighlighted" Value="true">
                     <Setter TargetName="Border" Property="BorderBrush" Value="White"/>
                     <Setter TargetName="Border" Property="Background" Value="LightGray"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <Style x:Key="OmagCut_ComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="{DynamicResource ComboBox_Height}"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
   </Style>

   <Style x:Key="OmagCut_LeftComboBoxNoBorder" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="{DynamicResource ComboBox_Height}"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Margin" Value="{DynamicResource LeftTextBoxNoBorder_Margin}"/>
   </Style>
   <Style x:Key="OmagCut_MachToolLeftComboBoxNoBorder" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="{DynamicResource ComboBox_Height}"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Margin" Value="{DynamicResource MachToolLeftTextBoxNoBorder_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_LeftComboBoxInBorder" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="{DynamicResource ComboBox_Height}"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Margin" Value="{DynamicResource LeftComboBoxInBorder_Margin}"/>
   </Style>
   
   <Style x:Key="OmagCut_RightComboBoxInBorder" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="{DynamicResource ComboBox_Height}"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Margin" Value="{DynamicResource RightComboBoxInBorder_Margin}"/>
   </Style>
   
   <!-- ______________________________________________________________________________________________________________________ -->

   <!--GroupBox-->

   <DataTemplate x:Key="GroupBoxHeaderTemplate">
        <TextBlock Text="{Binding}" FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
   </DataTemplate>

   <Style x:Key="OmagCut_GroupBox" TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}" />
      <Setter Property="HeaderTemplate" Value="{StaticResource GroupBoxHeaderTemplate}"/>
      <Setter Property="ControlExtensions:GroupBoxExtensions.CornerRadius" Value="{StaticResource GroupBox_CornerRadius}" />
      <Setter Property="ControlExtensions:GroupBoxExtensions.FirstColumn" Value="{StaticResource GroupBox_FirstColumn}" />
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--Image-->

   <!--Style dell'immagine all'interno di un Button-->
   <Style x:Key="OmagCut_ButtonIcon" TargetType="{x:Type Image}" >
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Width" Value="65"/>
      <Setter Property="Height" Value="65"/>
   </Style>

   <Style x:Key="OmagCut_ArrowButtonIcon" TargetType="{x:Type Image}" >
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Width" Value="{DynamicResource ArrowImage_Height}"/>
      <Setter Property="Height" Value="{DynamicResource ArrowImage_Height}"/>
   </Style>
   
   <Style x:Key="OmagCut_ScaleButtonIcon" TargetType="{x:Type Image}" >
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Width" Value="{DynamicResource ScaleImage_Height}"/>
      <Setter Property="Height" Value="{DynamicResource ScaleImage_Height}"/>
   </Style>

   <Style x:Key="OmagCut_MachineStatusIcon" TargetType="{x:Type Image}" >
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Width" Value="{DynamicResource MachineStatusImage_Height}"/>
      <Setter Property="Height" Value="{DynamicResource MachineStatusImage_Height}"/>
   </Style>

   <!--Style di un immagine in una ListBox-->
   <Style x:Key="OmagCut_ListBoxIcon" TargetType="{x:Type Image}" >
      <Setter Property="Width" Value="32"/>
      <Setter Property="Height" Value="32"/>
      <Setter Property="Margin" Value="0,8,6,4"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!-- ScrollBar & it's component (RepeatButton, Thumb) -->

   <!-- SrollViewer ScrollBar Repeat Buttons (The part in the middle, not the thumb the long area between the
      buttons ) -->
   <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
      <Setter Property="SnapsToDevicePixels" Value="True"/>
      <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}">
               <Border Background="Transparent" />
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ScrollViewer Vertical ScrollBar Thumb, that part that can be dragged up/down or left/right Buttons -->
   <Style x:Key="VerticalScrollBarThumb" TargetType="{x:Type Thumb}">
      <Setter Property="SnapsToDevicePixels" Value="True"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="IsTabStop" Value="false"/>
      <Setter Property="Focusable" Value="false"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type Thumb}">
               <Border CornerRadius="6"
                  Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="0">
                  <Grid>
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="4*"/>
                        <ColumnDefinition Width="1*"/>
                     </Grid.ColumnDefinitions>
                     <Grid.RowDefinitions>
                        <RowDefinition Height="50*"/>
                        <RowDefinition Height="1"/>
                        <RowDefinition Height="50*"/>
                     </Grid.RowDefinitions>
                     <Border Grid.Column="1" Grid.Row="1" CornerRadius="1" Background="LightGray"/>
                  </Grid>
               </Border>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ScrollViewer Horizontal ScrollBar Thumb, that part that can be dragged up/down or left/right Buttons -->
   <Style x:Key="HorizontalScrollBarThumb" TargetType="{x:Type Thumb}">
      <Setter Property="SnapsToDevicePixels" Value="True"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Setter Property="IsTabStop" Value="false"/>
      <Setter Property="Focusable" Value="false"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type Thumb}">
               <Border CornerRadius="6"
                  Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="0">
                  <Grid>
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50*"/>
                        <ColumnDefinition Width="1"/>
                        <ColumnDefinition Width="50*"/>
                     </Grid.ColumnDefinitions>
                     <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="4*"/>
                        <RowDefinition Height="1*"/>
                     </Grid.RowDefinitions>
                     <Border Grid.Column="1" Grid.Row="1" CornerRadius="1" Background="LightGray"/>
                  </Grid>
               </Border>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- VerticalScrollBar Template using the previously created Templates -->
   <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
      <Grid >
         <Grid.RowDefinitions>
            <RowDefinition Height="0.00001*"/>
         </Grid.RowDefinitions>
         <Border Grid.RowSpan="3"
            CornerRadius="0"
            Background="Transparent" />
         <Track Name="PART_Track"
            Grid.Row="1"
            IsDirectionReversed="true">
            <Track.DecreaseRepeatButton>
               <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                  Command="ScrollBar.PageUpCommand" />
            </Track.DecreaseRepeatButton>
            <Track.Thumb>
               <Thumb Style="{StaticResource VerticalScrollBarThumb}"
                  Margin="0,2.75,2,2.75"
                  Background="{StaticResource OmagCut_Blue}"
                  BorderBrush="Transparent" />
            </Track.Thumb>
            <Track.IncreaseRepeatButton>
               <RepeatButton Style="{StaticResource ScrollBarPageButton}"
                  Command="ScrollBar.PageDownCommand" />
            </Track.IncreaseRepeatButton>
         </Track>
      </Grid>
   </ControlTemplate>

   <!-- HorizontalScrollBar Template using the previously created Templates -->
   <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
      <Grid >
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.00001*"/>
         </Grid.ColumnDefinitions>
         <Border Grid.ColumnSpan="3"
            CornerRadius="0"
            Background="Transparent" />
         <Track Name="PART_Track"
            Grid.Column="1"
            IsDirectionReversed="False">
            <Track.DecreaseRepeatButton>
               <RepeatButton
               Style="{StaticResource ScrollBarPageButton}"
               Command="ScrollBar.PageLeftCommand" />
            </Track.DecreaseRepeatButton>
            <Track.Thumb>
               <Thumb Style="{StaticResource HorizontalScrollBarThumb}"
                  Margin="2.75,0,0,2"
                  Background="{StaticResource OmagCut_Blue}"
                  BorderBrush="Transparent" />
            </Track.Thumb>
            <Track.IncreaseRepeatButton>
               <RepeatButton
                  Style="{StaticResource ScrollBarPageButton}"
                  Command="ScrollBar.PageRightCommand" />
            </Track.IncreaseRepeatButton>
         </Track>
      </Grid>
   </ControlTemplate>

   <!-- Style for overall  ScrollBar -->
   <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
      <Setter Property="SnapsToDevicePixels" Value="True"/>
      <Setter Property="OverridesDefaultStyle" Value="true"/>
      <Style.Triggers>
         <Trigger Property="Orientation" Value="Horizontal">
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="Height" Value="12" />
            <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
         </Trigger>
         <Trigger Property="Orientation" Value="Vertical">
            <Setter Property="Width" Value="12"/>
            <Setter Property="Height" Value="Auto" />
            <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
         </Trigger>
      </Style.Triggers>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!-- ScrollViewer -->

   <!-- Style for overall  ScrollViewer -->
   <Style x:Key="FavsScrollViewer" TargetType="{x:Type ScrollViewer}">
      <Setter Property="OverridesDefaultStyle" Value="True"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ScrollViewer}">
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition />
                     <ColumnDefinition Width="Auto"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition/>
                     <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ScrollContentPresenter Grid.Column="0"/>
                  <ScrollBar Name="PART_VerticalScrollBar"
                        Grid.Row="0"
                        Grid.Column="1"
                        Value="{TemplateBinding VerticalOffset}"
                        Maximum="{TemplateBinding ScrollableHeight}"
                        ViewportSize="{TemplateBinding ViewportHeight}"
                        Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                  <ScrollBar Name="PART_HorizontalScrollBar"
                        Orientation="Horizontal"
                        Grid.Row="1"
                        Grid.Column="0"
                        Value="{TemplateBinding HorizontalOffset}"
                        Maximum="{TemplateBinding ScrollableWidth}"
                        ViewportSize="{TemplateBinding ViewportWidth}"
                        Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!-- ListBox -->

   <!--TextBlock per elementi delle ListBox-->
   <Style x:Key="OmagCut_LowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
   </Style>

   <Style x:Key="OmagCut_ListBoxTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
      <Setter Property="TextWrapping" Value="NoWrap"/>
   </Style>

   <Style x:Key="OmagCut_CurrProjSummeryTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
      <Setter Property="TextWrapping" Value="NoWrap"/>
      <Setter Property="Margin" Value="6,0,0,0"/>
   </Style>

   <!--DataTemplate solo testo-->
   <DataTemplate x:Key="NameIdLsBxItem">
      <TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" />
   </DataTemplate>

   <DataTemplate x:Key="FileNameLsBxItem">
       <DockPanel>
           <TextBlock Text="{Binding GraphicName}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" 
                      DockPanel.Dock="Left" Width="130"/>
           <TextBlock Text="{Binding sDate}" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
                      DockPanel.Dock="Right" />
       </DockPanel>
   </DataTemplate>

    <!--DataTemplate testo ed immagine-->
   <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" />-->
         <Image Grid.Column="0" Source="{Binding PictureString}" Style="{StaticResource OmagCut_ListBoxIcon}" />
         <!--<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" VerticalAlignment="Center" />-->
         <TextBlock Grid.Column="1" Text="{Binding Name}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />

      </Grid>
   </DataTemplate>

   <Style TargetType="{x:Type ListBox}">
      <Setter Property="Background" Value="{StaticResource OmagCut_TreeViewGradientGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
      <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
      <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
      <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
      <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
      <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListBox}">
               <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="9.5" Padding="1" SnapsToDevicePixels="true">
                  <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}" Style="{StaticResource FavsScrollViewer}">
                     <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                  </ScrollViewer>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                  </Trigger>
                  <Trigger Property="IsGrouping" Value="false">
                     <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ListBoxItem -->

   <Style TargetType="{x:Type ListBoxItem}">
      <Setter Property="Background" Value="Transparent"/>
      <Setter Property="BorderBrush" Value="Transparent"/>
      <Setter Property="BorderThickness" Value="2"/>
      <Setter Property="Margin" Value="1,0,1,0"/>
      <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
      <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
      <Setter Property="Padding" Value="2"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListBoxItem}">
               <Border x:Name="Bd"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
							Background="{TemplateBinding Background}"
							Padding="{TemplateBinding Padding}"
							Margin="{TemplateBinding Margin}"
							SnapsToDevicePixels="true">
                  <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsSelected" Value="true">
                     <Setter Property="Background" TargetName="Bd" Value="LightGray"/>
                     <Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
                  </Trigger>
                  <MultiTrigger>
                     <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="false"/>
                        <Condition Property="IsMouseOver" Value="true"/>
                     </MultiTrigger.Conditions>
                     <Setter Property="Background" TargetName="Bd" Value="LightGray"/>
                     <Setter Property="BorderBrush" TargetName="Bd" Value="LightGray"/>
                  </MultiTrigger>
                  <MultiTrigger>
                     <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="true"/>
                        <Condition Property="Selector.IsSelectionActive" Value="false"/>
                     </MultiTrigger.Conditions>
                     <Setter Property="Background" TargetName="Bd" Value="LightGray"/>
                     <Setter Property="BorderBrush" TargetName="Bd" Value="White"/>
                  </MultiTrigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--TextBlock-->

   <Style x:Key="OmagCut_UpperCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
   </Style>

   <Style x:Key="OmagCut_ToolsDBTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="Margin" Value="10,0,0,0"/>
   </Style>

   <Style x:Key="OmagCut_LowerBarTitleTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarTitle}"/>
      <Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Margin" Value="5,0,0,0"/>
   </Style>

   <Style x:Key="OmagCut_LowerBarValueTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerBarValue}"/>
      <Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="HorizontalAlignment" Value="Right"/>
      <Setter Property="Margin" Value="0,0,5,2"/>
   </Style>

   <Style x:Key="OmagCut_LowerBarOverrideTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarOverride}"/>
      <Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="HorizontalAlignment" Value="Right"/>
      <Setter Property="Margin" Value="0,0,5,0"/>
   </Style>

   <Style x:Key="OmagCut_UnitOfMeasureTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UnitOfMeasure}"/>
   </Style>

   <Style x:Key="OmagCut_SingleUpperCaseCharacterTextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="FontSize" Value="{StaticResource FontSize_LowerBarTitle}"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="HorizontalAlignment" Value="Center"/>
   </Style>

   <Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="HorizontalAlignment" Value="Center"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--TextBox-->

   <Style x:Key="OmagCut_TextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Foreground" Value="Black"/>
      <Setter Property="Background" Value="Transparent"/>
      <Setter Property="BorderBrush" Value="Black"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Setter Property="TextAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
   </Style>

   <Style x:Key="OmagCut_KeyboardTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
      <Setter Property="Keyboard" Value="Alphanumeric"/>
      <Setter Property="KeyboardDimension" Value="600"/>
   </Style>

   <Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
      <Setter Property="Keyboard" Value="Calculator"/>
      <Setter Property="KeyboardDimension" Value="300"/>
   </Style>

    <Style x:Key="OmagCut_CalculatorParamWjTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
        <Setter Property="Width" Value="80"/>
        <Setter Property="Keyboard" Value="Calculator"/>
        <Setter Property="KeyboardDimension" Value="300"/>
        <Setter Property="IsHitTestVisible" Value="False" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, 
                                                                                      AncestorType={x:Type ListBoxItem}, AncestorLevel=1}}"
                         Value="True">
                <Setter Property="IsHitTestVisible" Value="True" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource MachToolLeftTextBoxNoBorder_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_CalculatorTextBoxInGroupBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource TextBoxInGroupBox_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_RightCalculatorTextBoxInBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource RightTextBoxInBorder_Margin}"/>
   </Style>
   <Style x:Key="OmagCut_MachRightCalculatorTextBoxInBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource MachRightTextBoxInBorder_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_LeftCalculatorTextBoxInBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource LeftTextBoxInBorder_Margin}"/>
   </Style>
   <Style x:Key="OmagCut_MachLeftCalculatorTextBoxInBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource MachLeftTextBoxInBorder_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_LeftCalculatorTextBoxNoBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
      <Setter Property="Margin" Value="{DynamicResource LeftTextBoxNoBorder_Margin}"/>
   </Style>

   <Style x:Key="OmagCut_LeftKeyboardTextBoxNoBorder" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_KeyboardTextBox}">
      <Setter Property="Margin" Value="{DynamicResource LeftTextBoxNoBorder_Margin}"/>
   </Style>

    <Style x:Key="OmagCut_MDIKeyboardTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_KeyboardTextBox}"/>

    <Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
        <Setter Property="Background" Value="White"/>
      <Setter Property="IsReadOnly" Value="True"/>
      <Setter Property="IsEnabled" Value="False"/>
      <Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--ToggleButton-->

   <Style x:Key="OmagCut_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="ControlExtensions:ToggleButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
      <Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
      <Setter Property="Padding" Value="5"/>
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
      <Style.Triggers>
         <Trigger Property="IsEnabled" Value="False">
            <Setter Property="ToggleButton.Background" Value="#FFF4F4F4"/>
            <Setter Property="ToggleButton.BorderBrush" Value="#FFADB2B5"/>
            <Setter Property="ToggleButton.Foreground" Value="#FF838383"/>
         </Trigger>
         <Trigger Property="IsPressed" Value="True">
             <Setter Property="Background" Value="#FFC4E5F6"/>
             <Setter Property="BorderBrush" Value="#FF2C628B"/>
         </Trigger>
        </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_ToggleButton_Wrap" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
      <Setter Property="ContentTemplate" Value="{StaticResource ToggleButton_DataTemplate_Wrap}" />
   </Style>

   <Style x:Key="OmagCut_BlueToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton_Wrap}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Yellow}" />
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_BlueIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Yellow}" />
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_BlueIconTransparentToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
      <Setter Property="Background" Value="Transparent"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Yellow}" />
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_YellowToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton_Wrap}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_RightGrayYellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_RightGrayYellowTextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton_Wrap}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="OmagCut_GradientYellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
      <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
      </Style.Triggers>
   </Style>

    <Style x:Key="OmagCut_ModifiedGradientYellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource  OmagCut_ToggleButton}">
        <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
        <Setter Property="Background" Value="{StaticResource OmagCut_GradientYellow}"/>
        <Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
                <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="OmagCut_DisabledYellowToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
      <Setter Property="ControlExtensions:ToggleButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
      <Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
      <Setter Property="Padding" Value="5"/>
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
      <Setter Property="ContentTemplate" Value="{StaticResource ToggleButton_DataTemplate_Wrap}" />
      <Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
      <Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
      <Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
            <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_Blue}" />
            <Setter Property="ToggleButton.Foreground" Value="{StaticResource OmagCut_Yellow}"/>
         </Trigger>
         <MultiTrigger>
            <MultiTrigger.Conditions>
               <Condition Property="IsChecked" Value="True" />
               <Condition Property="IsEnabled" Value="False" />
            </MultiTrigger.Conditions>
            <MultiTrigger.Setters>
               <Setter Property="ToggleButton.Background" Value="{StaticResource OmagCut_LightGray}"/>
               <Setter Property="ToggleButton.Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            </MultiTrigger.Setters>
         </MultiTrigger>
         <MultiTrigger>
            <MultiTrigger.Conditions>
               <Condition Property="IsChecked" Value="False" />
               <Condition Property="IsEnabled" Value="False" />
            </MultiTrigger.Conditions>
            <MultiTrigger.Setters>
               <Setter Property="ToggleButton.Background" Value="#FFF4F4F4"/>
               <Setter Property="ToggleButton.BorderBrush" Value="#FFADB2B5"/>
               <Setter Property="ToggleButton.Foreground" Value="#FF838383"/>
            </MultiTrigger.Setters>
         </MultiTrigger>
      </Style.Triggers>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->

   <!--TreeView-->

   <!--Style dei nodi CathegoryItem che non li evidenzia quando clicckati-->
   <Style x:Key="OmagCut_ItemContainerStyle" TargetType="{x:Type TreeViewItem}">
      <Setter Property="IsSelected" Value="{Binding IsSelected}" />
      <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type TreeViewItem}">
               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition MinWidth="19" Width="Auto"/>
                     <ColumnDefinition Width="Auto"/>
                     <ColumnDefinition Width="*"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="Auto"/>
                     <RowDefinition/>
                  </Grid.RowDefinitions>
                  <Border x:Name="ExpanderBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                     <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
                  </Border>
                  <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                     <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                  </Border>
                  <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
               </Grid>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsExpanded" Value="false">
                     <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                  </Trigger>
                  <Trigger Property="HasItems" Value="false">
                     <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                  </Trigger>
                  <Trigger Property="IsSelected" Value="true">
                     <Setter Property="Background" TargetName="Bd" Value="Transparent"/>
                     <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                     <Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
                     <Setter Property="Background" TargetName="ExpanderBorder" Value="Transparent"/>
                     <Setter Property="BorderBrush" TargetName="ExpanderBorder" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                     <Setter Property="BorderThickness" TargetName="ExpanderBorder" Value="1,1,0,1"/>
                  </Trigger>
                  <MultiTrigger>
                     <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="true"/>
                        <Condition Property="IsSelectionActive" Value="false"/>
                     </MultiTrigger.Conditions>
                     <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                     <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                  </MultiTrigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________ -->



   <!-- ______________________________________________________________________________________________________________________ -->
   <!-- ______________________________________________________________________________________________________________________ -->
   <!-- ______________________________________________________________________________________________________________________ -->
   <!-- ______________________________________________________________________________________________________________________ -->
   <!-- ______________________________________________________________________________________________________________________ -->


   <!-- ** 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>-->

   <!-- *************************************************************************** -->

    <!-- ** 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>
