<ResourceDictionary x:Class="Dictionary"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Effector.Plugin.StoneCut"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">

   <!--<ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="pack://application:,,,/Effector.Plugin.Lib;component/Themes/Generic.xaml" />
   </ResourceDictionary.MergedDictionaries>-->

   <!-- 
   Assign a Key to every Panel ViewModel to use 
   it in xaml file(ProjectView.xaml).
   -->
   <local:FiveLakesUIVM x:Key="FiveLakesUIVM"/>
   <local:MainMenuVM x:Key="MainMenuVM"/>
   <local:DoorListPageVM x:Key="DoorListVM"/>
   <local:MachinePageVM x:Key="MachinePageVM"/>
   <local:StatisticsPageVM x:Key="StatisticsPageVM"/>

   <!--Colori predefiniti-->

   <!--#e8eef5-->
   <Color x:Key="Effector_LightBlue_Color" R="232" G="238" B="245" A="255"/>
   <SolidColorBrush x:Key="Effector_LightBlue" Color="{StaticResource Effector_LightBlue_Color}" />
   <!--#afc5d6-->
   <Color x:Key="Effector_Blue_Color" R="175" G="197" B="214" A="255"/>
   <SolidColorBrush x:Key="Effector_Blue" Color="{StaticResource Effector_Blue_Color}" />
   <!--#749fc4-->
   <Color x:Key="Effector_DarkBlue_Color" R="116" G="159" B="196" A="255"/>
   <SolidColorBrush x:Key="Effector_DarkBlue" Color="{StaticResource Effector_DarkBlue_Color}" />


   <!--#92bde3-->
   <Color x:Key="Effector_LightBlue_Status_Color" R="146" G="189" B="227" A="255"/>
   <SolidColorBrush x:Key="Effector_LightBlue_Status" Color="{StaticResource Effector_LightBlue_Status_Color}" />
   <!--#5682a6-->
   <Color x:Key="Effector_Blue_Status_Color" R="86" G="130" B="166" A="255"/>
   <SolidColorBrush x:Key="Effector_Blue_Status" Color="{StaticResource Effector_Blue_Status_Color}" />
   <!--#cd5c5c-->
   <Color x:Key="Effector_Red_Status_Color" R="205" G="92" B="92" A="255"/>
   <SolidColorBrush x:Key="Effector_Red_Status" Color="{StaticResource Effector_Red_Status_Color}" />
   <!--#b1cbaa-->
   <Color x:Key="Effector_Green_Status_Color" R="177" G="203" B="170" A="255"/>
   <SolidColorBrush x:Key="Effector_Green_Status" Color="{StaticResource Effector_Green_Status_Color}" />
   <!--#9c9c9c-->
   <Color x:Key="Effector_Gray_Status_Color" R="156" G="156" B="156" A="255"/>
   <SolidColorBrush x:Key="Effector_Gray_Status" Color="{StaticResource Effector_Gray_Status_Color}" />
   <!--#ffd932-->
   <Color x:Key="Effector_Yellow_Status_Color" R="255" G="217" B="50" A="255"/>
   <SolidColorBrush x:Key="Effector_Yellow_Status" Color="{StaticResource Effector_Yellow_Status_Color}" />

   <!--#6398c7-->
   <Color x:Key="Effector_LightBlue_SelStatus_Color" R="99" G="152" B="199" A="255"/>
   <SolidColorBrush x:Key="Effector_LightBlue_SelStatus" Color="{StaticResource Effector_LightBlue_SelStatus_Color}" />
   <!--#4b677e-->
   <Color x:Key="Effector_Blue_SelStatus_Color" R="75" G="103" B="126" A="255"/>
   <SolidColorBrush x:Key="Effector_Blue_SelStatus" Color="{StaticResource Effector_Blue_SelStatus_Color}" />
   <!--#a94444-->
   <Color x:Key="Effector_Red_SelStatus_Color" R="169" G="68" B="68" A="255"/>
   <SolidColorBrush x:Key="Effector_Red_SelStatus" Color="{StaticResource Effector_Red_SelStatus_Color}" />
   <!--#89aa81-->
   <Color x:Key="Effector_Green_SelStatus_Color" R="137" G="170" B="129" A="255"/>
   <SolidColorBrush x:Key="Effector_Green_SelStatus" Color="{StaticResource Effector_Green_SelStatus_Color}" />
   <!--#7d7d7d-->
   <Color x:Key="Effector_Gray_SelStatus_Color" R="125" G="125" B="125" A="255"/>
   <SolidColorBrush x:Key="Effector_Gray_SelStatus" Color="{StaticResource Effector_Gray_SelStatus_Color}" />
   <!--#dcb718-->
   <Color x:Key="Effector_Yellow_SelStatus_Color" R="220" G="183" B="24" A="255"/>
   <SolidColorBrush x:Key="Effector_Yellow_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
   <!--#e5ebf1-->
   <Color x:Key="Effector_White_SelStatus_Color" R="229" G="235" B="241" A="255"/>
   <SolidColorBrush x:Key="Effector_White_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />


   <!--#1C1D22-->
   <Color x:Key="Omag_Black_Color" R="28" G="29" B="34" A="255"/>
   <SolidColorBrush x:Key="Omag_Black" Color="{StaticResource Omag_Black_Color}" />
   <!--#484D55-->
   <Color x:Key="Omag_DarkGray_Color" R="72" G="77" B="85" A="255"/>
   <SolidColorBrush x:Key="Omag_DarkGray" Color="{StaticResource Omag_DarkGray_Color}" />
   <!--#636974-->
   <Color x:Key="Omag_LightGray_Color" R="99" G="105" B="116" A="255"/>
   <SolidColorBrush x:Key="Omag_LightGray" Color="{StaticResource Omag_LightGray_Color}" />

   <Style x:Key="Table_Button" TargetType="{x:Type Button}">
      <Setter Property="Background" Value="{StaticResource Omag_Black}"/>
   </Style>

   <!--#BC373E--><!--
   <Color x:Key="Effector_Orange_Color" R="188" G="55" B="62" A="255"/>
   <SolidColorBrush x:Key="Effector_Orange" Color="{StaticResource Effector_Orange_Color}" />-->
   <!--#A74C77--><!--
   <Color x:Key="Effector_Purple_Color" R="167" G="76" B="119" A="255"/>
   <SolidColorBrush x:Key="Effector_Purple" Color="{StaticResource Effector_Purple_Color}" />-->

   <!--Colori default dei controlli-->
   <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 x:Key="FocusVisual">
      <Setter Property="Control.Template">
         <Setter.Value>
            <ControlTemplate>
               <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>


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

   <!--convertert per visibilita' stringa di testo con misure in StatusBar--><!--
   <PrintApp:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>-->

   <GridLength x:Key="TitleBarHeight">30</GridLength>
   <Thickness x:Key="WindowBorder_Thickness">2</Thickness>
   <sys:Double x:Key="WindowBorder_Height">2</sys:Double>

   <!--Button-->

   <!--<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="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
               <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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}"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>-->

   <!--<Style x:Key="DoorList_Button" TargetType="{x:Type Button}">
      <Setter Property="Height" Value="30"/>
      <Setter Property="Padding" Value="10,0,10,0"/>
   </Style>-->
   
   <!--ToggleButton-->

   <Style TargetType="{x:Type ToggleButton}">
      <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
      <Setter Property="Background" Value="{StaticResource Effector_Blue}"/>
      <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
      <Setter Property="Foreground" Value="White"/>
      <Setter Property="BorderThickness" Value="0"/>
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
      <Setter Property="Padding" Value="1"/>
      <Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
      <Setter Property="FontWeight" Value="Medium"/>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="{x:Type ToggleButton}">
               <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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 Effector_DarkBlue}"/>
                     <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="White"/>
                  </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}"/>
                  </Trigger>
               </ControlTemplate.Triggers>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <Style x:Key="MainMenu_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
      <Setter Property="Padding" Value="25,0,25,0"/>
   </Style>

   <!--Border-->

   <Style x:Key="Parameter_MachinePage_Border" TargetType="{x:Type GroupBox}">
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="BorderBrush" Value="DarkGray"/>
      <Setter Property="HorizontalAlignment" Value="Center"/>
   </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="Foreground" Value="Blue" />
         </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>-->

   <!--Styles for DataGrid columns-->

   <Style x:Key="DataGridTextColumn_TextBlock" TargetType="{x:Type TextBlock}">
      <Setter Property="TextAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
   </Style>

   <Style x:Key="DataGridTextColumn_TextBox" TargetType="{x:Type TextBox}">
      <Setter Property="TextAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
   </Style>
   <Style x:Key="DataGridTemplateColumn_ComboBox" TargetType="{x:Type ComboBox}">
      <Setter Property="HorizontalContentAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
   </Style>

   <!--Style for page tabcontrol-->

   <Style x:Key="MainPage_Tabcontrol" TargetType="{x:Type TabControl}">
      <Setter Property="BorderThickness" Value="0"/>
      <Setter Property="Margin" Value="0"/>
      <Setter Property="Padding" Value="0"/>
   </Style>

   <!--Stili per disegno macchina con porte-->
   
   <Style x:Key="Table" TargetType="Border">
      <Setter Property="BorderBrush" Value="Gray"/>
      <Setter Property="BorderThickness" Value="2"/>
   </Style>
   <Style x:Key="Door" TargetType="Border">
      <Setter Property="BorderBrush" Value="SaddleBrown"/>
      <Setter Property="BorderThickness" Value="5"/>
      <Setter Property="Background" Value="SandyBrown"/>
   </Style>
   <Style x:Key="Advancement_Button" TargetType="Button">
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
      <Setter Property="TextBlock.TextAlignment" Value="Center"/>
   </Style>
   <Style x:Key="Sensor" TargetType="Ellipse">
      <Setter Property="Height" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"/>
   </Style>
   <Style x:Key="MachDrawVar_TextBlock" TargetType="TextBlock">
      <Setter Property="HorizontalAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
   </Style>
   <Style x:Key="MachDrawVar_CheckBox" TargetType="CheckBox">
      <Setter Property="IsHitTestVisible" Value="False"/>
      <Setter Property="Focusable" Value="False"/>
      <Setter Property="BorderThickness" Value="0"/>
   </Style>

   <Style x:Key="TextBlock.DataGridTextColumn.DoorList" TargetType="{x:Type TextBlock}">
      <Setter Property="TextAlignment" Value="Center"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
   </Style>

   <Style x:Key="TextBox.DataGridTextColumn.DoorList" TargetType="{x:Type TextBox}">
      <Setter Property="TextAlignment" Value="Center"/>
      <Setter Property="VerticalContentAlignment" Value="Center"/>
   </Style>

</ResourceDictionary>
