<ResourceDictionary
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Supervisor"
   xmlns:EgtBEAMWALLCore="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
   xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
   xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">

   <!-- 
   Assign a Key to every Panel ViewModel to use 
   it in xaml file(ProjectView.xaml).
   -->
   <EgtBEAMWALL:MDIPageVM x:Key="MDIPageVM"/>
   <EgtBEAMWALL:MachineLogPageVM x:Key="MachineLogPageVM"/>
   <EgtBEAMWALL:MainWindowVM x:Key="MainWindowVM"/>
   <EgtBEAMWALL:MySceneHostVM x:Key="MySceneHostVM"/>
   <!--<EgtBEAMWALL:ProjManagerVM x:Key="ProjManagerVM"/>-->
   <EgtBEAMWALL:SupervisorManagerVM x:Key="SupervisorManagerVM"/>
   <!--<EgtBEAMWALL:MainMenuVM x:Key="MainMenuVM"/>
   <EgtBEAMWALL:MyStatusBarVM x:Key="StatusBarVM"/>-->
   <EgtBEAMWALL:ProjectVM x:Key="ProjectVM"/>
   <EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
   <!--<EgtBEAMWALL:ShowBeamPanelVM x:Key="ShowBeamPanelVM"/>-->
   <EgtBEAMWALLCore:ViewPanelVM x:Key="ViewPanelVM"/>
   <!--<EgtBEAMWALL:MyInstrumentPanelVM x:Key="InstrumentPanelVM"/>-->
   <EgtBEAMWALL:MachinePanelVM x:Key="MachinePanelVM"/>
   <!--<EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/>-->
   <EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/>
   <EgtBEAMWALL:MachCommandMessagePanelVM x:Key="MachCommandMessagePanelVM"/>
   <EgtBEAMWALL:AxesPanelVM x:Key="AxesPanelVM"/>
   <EgtBEAMWALL:VariablesListVM x:Key="VariablesListVM"/>
   <EgtBEAMWALL:MainMenuVM x:Key="MainMenuVM"/>
   <EgtBEAMWALL:MyStatusBarVM x:Key="StatusBarVM"/>
   <!--<EgtBEAMWALL:BottomPanelVM x:Key="BottomPanelVM"/>-->
   <EgtBEAMWALL:ConfigurationPageVM x:Key="ConfigurationPageVM"/>
   <EgtBEAMWALL:InputsPageVM x:Key="InputsPageVM"/>
   <EgtBEAMWALL:OutputsPageVM x:Key="OutputsPageVM"/>
   <EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
   <!--<EgtBEAMWALL:TopPanelVM x:Key="TopPanelVM"/>
   <EgtBEAMWALL:RawPartListVM x:Key="RawPartListVM"/>
   <EgtBEAMWALL:OptimizePanelVM x:Key="OptimizePanelVM"/>-->
   <!--<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
   <OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
   <OmagOFFICE:RawPartTabVM x:Key="RawPartTabVM"/>
   <OmagOFFICE:NestingTabVM x:Key="NestingTabVM"/>
   <OmagOFFICE:MachiningTabVM x:Key="MachiningTabVM"/>
   <OmagOFFICE:SimulTabVM x:Key="SimulTabVM"/>-->
   <!--<EgtBEAMWALL:MyMachGroupPanelVM x:Key="MachGroupPanelVM"/>-->
   <EgtBEAMWALL:RawPartListVM x:Key="RawPartListVM"/>
   <EgtBEAMWALL:PartInRawPartListVM x:Key="PartInRawPartListVM"/>
   <EgtBEAMWALL:FeatureInPartInRawPartListVM x:Key="FeatureInPartInRawPartListVM"/>

   <!--Colori predefiniti-->
   <SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
   <SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
   <SolidColorBrush x:Key="Omag_Red" Color="Red" />
   <SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
   <SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
   <SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
   <SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
   <SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
   <SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
   <SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />

   <!--Colori per EgtWPFLib5-->
   <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
   <!--Colori per TabHeader-->
   <LinearGradientBrush x:Key="TabItem.Static.Background" EndPoint="0,1" StartPoint="0,0">
      <GradientStop Color="#F0F0F0" Offset="0.0"/>
      <GradientStop Color="#E5E5E5" Offset="1.0"/>
   </LinearGradientBrush>

   <!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
   <!--o viene eseguito un lua che non aggiorna l'interfaccia-->
   <PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- FocusVisual standard-->
   <Style x:Key="FocusVisual">
      <Setter Property="Control.Template">
         <Setter.Value>
            <ControlTemplate>
               <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- Button Style -->

   <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
   <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
   <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
   <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
   <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
   <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
   <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
   <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
   <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
   <Style TargetType="{x:Type Button}">
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
      <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
      <Setter Property="Margin" Value="1"/>
      <Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
               <Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                  <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsDefaulted" Value="true">
                     <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                  </Trigger>
                  <Trigger Property="IsMouseOver" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                  </Trigger>
                  <Trigger Property="IsPressed" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                  </Trigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                     <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                     <Setter Property="OpacityMask" Value="#54707070"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!--Template che permette di andare a capo-->
   <DataTemplate x:Key="WrapButton_DataTemplate">
      <TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
   </DataTemplate>

   <Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="30"/>
   </Style>
   <Style x:Key="ToolBar_SmallButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="20"/>
      <Setter Property="Width" Value="20"/>
   </Style>
   <Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="80"/>
   </Style>
   <Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="60"/>
      <Setter Property="Width" Value="60"/>
   </Style>
   <Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="30"/>
   </Style>
   <Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
      <Setter Property="Height" Value="45"/>
   </Style>
   <Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="60"/>
      <Setter Property="Width" Value="60"/>
   </Style>
   <Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="40"/>
   </Style>
   <Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="60"/>
   </Style>

   <Style x:Key="LeftPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="30"/>
   </Style>

   <Style x:Key="LeftPanel_SmallButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Height" Value="20"/>
      <Setter Property="Width" Value="20"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- ToggleButton Style -->

   <Style TargetType="{x:Type ToggleButton}">
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
      <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
      <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
      <Setter Property="Margin" Value="1"/>
      <Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ToggleButton}">
               <Border x:Name="border" CornerRadius="3" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                  <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="Button.IsDefaulted" Value="true">
                     <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                  </Trigger>
                  <Trigger Property="IsMouseOver" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                  </Trigger>
                  <Trigger Property="IsPressed" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                  </Trigger>
                  <Trigger Property="IsChecked" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Omag_Yellow}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                  </Trigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                     <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                     <Setter Property="OpacityMask" Value="#54707070"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="30"/>
   </Style>

   <Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="70"/>
   </Style>

   <Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Height" Value="30"/>
   </Style>

   <Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Height" Value="60"/>
      <Setter Property="Width" Value="60"/>
   </Style>

   <Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Height" Value="40"/>
   </Style>

   <Style x:Key="MainMenu_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Background" Value="{StaticResource Omag_White}"/>
      <Setter Property="Foreground" Value="{StaticResource Omag_DarkGray}"/>
      <Setter Property="TextBlock.FontWeight" Value="Normal"/>
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="90"/>
      <Style.Triggers>
         <Trigger Property="IsChecked" Value="true">
            <Setter Property="TextBlock.FontWeight" Value="ExtraBold"/>
         </Trigger>
      </Style.Triggers>
   </Style>

   <Style x:Key="MainMenu_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <Setter Property="Background" Value="{StaticResource Omag_White}"/>
      <Setter Property="Foreground" Value="{StaticResource Omag_DarkGray}"/>
      <Setter Property="TextBlock.FontWeight" Value="Normal"/>
      <Setter Property="Height" Value="30"/>
      <Setter Property="Width" Value="90"/>
   </Style>

   <Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
      <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>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- TextBlock -->

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

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

   <Style x:Key="MachiningsToolTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="Margin" Value="10,5,0,0"/>
   </Style>

   <Style x:Key="ValidationErrorTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="FontStyle" Value="Italic"/>
      <Setter Property="TextWrapping" Value="Wrap"/>
      <Setter Property="Foreground" Value="Red"/>
      <Setter Property="HorizontalAlignment" Value="Right"/>
      <Setter Property="Margin" Value="0,1"/>
   </Style>

   <Style x:Key="OptionTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Margin" Value="10,0,10,0"/>
   </Style>

   <Style x:Key="PartParam_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Margin" Value="10,0,10,0"/>
   </Style>
   
   <Style x:Key="Log_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Margin" Value="5,0,5,0"/>
   </Style>

   <Style x:Key="Filter_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="Margin" Value="2.5,0,2.5,0"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- TextBox -->

   <Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Height" Value="22"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="HorizontalContentAlignment" Value="Right"/>
      <Setter Property="ExplicitUpdateSource" Value="EnterKeyPress"/>
   </Style>

   <Style x:Key="ToolsTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Margin" Value="0,0,5,0"/>
   </Style>

   <Style x:Key="MachiningsTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Margin" Value="0,0,0,10"/>
   </Style>

   <Style x:Key="MachiningsToolTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Margin" Value="0,0,5,0"/>
   </Style>

   <Style x:Key="OptionTextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Margin" Value="0,0,5,0"/>
   </Style>

   <Style x:Key="PartParam_TextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
      <Setter Property="Width" Value="150"/>
      <Setter Property="Margin" Value="5"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- MachGroup -->

   <SolidColorBrush x:Key="ScrollBar.Static.Background" Color="#F0F0F0"/>
   <SolidColorBrush x:Key="ScrollBar.Static.Border" Color="#F0F0F0"/>
   <SolidColorBrush x:Key="ScrollBar.Pressed.Glyph" Color="#FFFFFF"/>
   <SolidColorBrush x:Key="ScrollBar.MouseOver.Glyph" Color="#000000"/>
   <SolidColorBrush x:Key="ScrollBar.Disabled.Glyph" Color="#BFBFBF"/>
   <SolidColorBrush x:Key="ScrollBar.Static.Glyph" Color="#606060"/>
   <SolidColorBrush x:Key="ScrollBar.MouseOver.Background" Color="#DADADA"/>
   <SolidColorBrush x:Key="ScrollBar.MouseOver.Border" Color="#DADADA"/>
   <SolidColorBrush x:Key="ScrollBar.Pressed.Background" Color="#606060"/>
   <SolidColorBrush x:Key="ScrollBar.Pressed.Border" Color="#606060"/>
   <SolidColorBrush x:Key="ScrollBar.Disabled.Background" Color="#F0F0F0"/>
   <SolidColorBrush x:Key="ScrollBar.Disabled.Border" Color="#F0F0F0"/>
   <Style x:Key="CustomScrollBarButton" TargetType="{x:Type RepeatButton}">
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
      <Setter Property="Focusable" Value="false"/>
      <Setter Property="IsTabStop" Value="false"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type RepeatButton}">
               <Border x:Name="border" CornerRadius="3" BorderBrush="{StaticResource ScrollBar.Static.Border}" BorderThickness="1" Background="{StaticResource ScrollBar.Static.Background}" SnapsToDevicePixels="true">
                  <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
               </Border>
               <ControlTemplate.Triggers>
                  <Trigger Property="IsMouseOver" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.MouseOver.Border}"/>
                  </Trigger>
                  <Trigger Property="IsPressed" Value="true">
                     <Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Pressed.Border}"/>
                  </Trigger>
                  <Trigger Property="IsEnabled" Value="false">
                     <Setter Property="Opacity" TargetName="contentPresenter" Value="0.56"/>
                     <Setter Property="Background" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Background}"/>
                     <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource ScrollBar.Disabled.Border}"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- Border -->

   <Style x:Key="DefaultBorder" TargetType="{x:Type Border}">
      <Setter Property="BorderBrush" Value="#D5DFE5"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="CornerRadius" Value="3"/>
      <Setter Property="Padding" Value="3"/>
      <Setter Property="Margin" Value="1"/>
   </Style>

   <Style x:Key="Border" TargetType="{x:Type Border}">
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
      <Setter Property="CornerRadius" Value="3"/>
      <Setter Property="Padding" Value="3"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- EgtCustomWindow -->

   <Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
      <Setter Property="TitleBarHeight" Value="32"/>
      <Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
      <Setter Property="TitleBarForeground" Value="{StaticResource Omag_Black}"/>
      <Setter Property="ShowInTaskbar" Value="False"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- EgtFloatingPanel -->

   <Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
      <Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
   </Style>

   <Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
      <Setter Property="IsToolBar" Value="False"/>
      <Setter Property="TitleBarOrientation" Value="Vertical"/>
      <Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- CsvTreeViewItem DA CAMBIARE!! -->

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

   <Style x:Key="CsvPartItemStyle" 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"/>
                     <!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
                  </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>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- ComboBox -->

   <Style x:Key="MachiningsComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Margin" Value="0,0,0,10"/>
   </Style>

   <Style x:Key="MachiningsToolComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Margin" Value="0,0,5,0"/>
   </Style>

   <Style x:Key="FeatureComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="22"/>
      <Setter Property="Width" Value="55"/>
   </Style>

   <Style x:Key="PartParam_ComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="22"/>
      <Setter Property="Width" Value="150"/>
   </Style>

   <Style x:Key="BtlData_ComboBox" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Type ComboBox}}">
      <Setter Property="Height" Value="22"/>
      <Setter Property="Width" Value="150"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- CheckBox -->

   <Style x:Key="OptionCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="HorizontalAlignment" Value="Right"/>
      <Setter Property="Margin" Value="10,0,0,0"/>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

   <!-- GroupBox -->
   
   <Style x:Key="GroupBoxStyle_NoHeader" TargetType="{x:Type GroupBox}">
      <Setter Property="Margin" Value="1.5,3,3,0"/>
      <Setter Property="Padding" Value="5,5,0,0"/>
      <Setter Property="BorderBrush" Value="#FFD5DFE5"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type GroupBox}">
               <Grid SnapsToDevicePixels="True">
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="6"/>
                     <ColumnDefinition Width="Auto"/>
                     <ColumnDefinition Width="*"/>
                     <ColumnDefinition Width="6"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="Auto"/>
                     <RowDefinition Height="Auto"/>
                     <RowDefinition Height="*"/>
                     <RowDefinition Height="6"/>
                  </Grid.RowDefinitions>
                  <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="4" Grid.Column="0" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3"/>
                  <Border BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3">
                     <!--<Border.OpacityMask>
                                    <MultiBinding ConverterParameter="7" UpdateSourceTrigger="Default">
                                        <MultiBinding.Converter>
                                            <BorderGapMaskConverter/>
                                        </MultiBinding.Converter>
                                        <Binding ElementName="Header" Path="ActualWidth"/>
                                        <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
                                        <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}"/>
                                    </MultiBinding>
                                </Border.OpacityMask>-->
                     <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
                        <Border BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/>
                     </Border>
                  </Border>
                  <Border x:Name="Header" Grid.Column="1" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2">
                     <ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                  </Border>
                  <ContentPresenter Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="{TemplateBinding Padding}" Grid.Row="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->


   <!-- Custom SelectedItem colors for DataGrid -->

   <Style x:Key="RowDataGrid_CustomHighLight" TargetType="{x:Type DataGridRow}">
      <Setter Property="BorderBrush" Value="LightGray" />
      <Style.Triggers>
         <Trigger Property="IsSelected" Value="True">
            <Setter Property="BorderThickness" Value="2,2,2,2" />
            <Setter Property="BorderBrush" Value="Cyan" />
            <Setter Property="Padding" Value="0,0,0,0" />
            <Setter Property="Margin" Value="-2,0,-2,0" />
            <Setter Property="FontWeight" Value="Bold" />
         </Trigger>
      </Style.Triggers>
      <Style.Resources>
         <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
         <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
         <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
         <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
      </Style.Resources>
   </Style>

   <Style x:Key="DataGrid_CustomHighLight" TargetType="{x:Type DataGrid}">
      <Style.Resources>
         <Style TargetType="{x:Type DataGridCell}">
            <Style.Triggers>
               <Trigger Property="DataGridCell.IsSelected" Value="True">
                  <Setter Property="BorderBrush" Value="Cyan" />
                  <Setter Property="Foreground" Value="Blue" />
               </Trigger>
               <Trigger Property="IsKeyboardFocusWithin" Value="True">
                  <Setter Property="BorderBrush" Value="DodgerBlue" />
                  <Setter Property="Foreground" Value="Blue" />
               </Trigger>
               <Trigger Property="IsEditing" Value="True">
                  <Setter Property="BorderBrush" Value="DodgerBlue" />
                  <Setter Property="TextElement.Foreground" Value="Blue" />
               </Trigger>
            </Style.Triggers>
         </Style>
         <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource RowDataGrid_CustomHighLight}"/>
      </Style.Resources>
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->


   <!-- DatePicker -->

   <Style x:Key="Log_DatePicker" TargetType="{x:Type DatePicker}">
      <Setter Property="Height" Value="22" />
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->
  
   <!-- DatePicker -->

   <Style x:Key="Filter_DatePicker" TargetType="{x:Type DatePicker}">
      <Setter Property="Height" Value="22" />
      <Setter Property="Width" Value="100" />
   </Style>

   <!-- ______________________________________________________________________________________________________________________________________________ -->

</ResourceDictionary>
