Files
OmagCUT/OmagCUTDictionary.xaml
T
Emmanuele Sassi c529c9dd59 OmagCUT :
- aggiungo file mancanti.
2015-08-23 09:50:47 +00:00

286 lines
14 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
x:Class="OmagCUTDictionary">
<!-- ** COLORI ** -->
<!-- ** TAB CONTROL ** -->
<!-- ** Tab Item ** -->
<SolidColorBrush x:Key="TabItemBorderColor_Unselected" Color="Gray" />
<SolidColorBrush x:Key="TabItemBackground_Unselected" Color="Gray" />
<SolidColorBrush x:Key="TabItemTextColor_Unselected" Color="White" />
<SolidColorBrush x:Key="TabItemBorderColor_Selected" Color="DarkGray" />
<SolidColorBrush x:Key="TabItemBackground_Selected" Color="LightGray" />
<SolidColorBrush x:Key="TabItemTextColor_Selected" Color="Black" />
<!-- ** Tab Page ** -->
<SolidColorBrush x:Key="TabControlBackgroundColor" Color="Gray" />
<SolidColorBrush x:Key="TabPageBorderColor" Color="DarkGray" />
<SolidColorBrush x:Key="TabPageBorderColor_Shadow" Color="LightGray" />
<SolidColorBrush x:Key="TabPageColor" Color="#FFE5E5E5" />
<!-- ** BUTTON ** -->
<SolidColorBrush x:Key="ButtonBorderColor_Unselected" Color="DarkGray" />
<SolidColorBrush x:Key="ButtonBackGroundColor_Unselected" Color="LightGray" />
<SolidColorBrush x:Key="ButtonTextColor_Unselected" Color="Black" />
<SolidColorBrush x:Key="ButtonBorderColor_Selected" Color="LightGray" />
<SolidColorBrush x:Key="ButtonBackGroundColor_Selected" Color="LightGray" />
<SolidColorBrush x:Key="ButtonTextColor_Selected" Color="White" />
<!-- *************************************************************************** -->
<!-- ** 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>
<!-- *************************************************************************** -->
<!-- ** 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">
<EventSetter Event="PreviewMouseDown" Handler="PreviewMouseDown"/>
</Style>
</ResourceDictionary>