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

  Copyright (c) 2010 CubeSoft, Inc.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published
  by the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

*************************************************************************** -->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!-- **********************************************************************
      Common styles for dialogs
    *********************************************************************** -->
    <Style TargetType="{x:Type TextBlock}">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="TextTrimming" Value="WordEllipsis" />
    </Style>

    <Style TargetType="{x:Type TextBox}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="2" />
    </Style>

    <Style TargetType="{x:Type PasswordBox}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="2" />
    </Style>

    <Style TargetType="{x:Type ComboBox}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style TargetType="{x:Type CheckBox}">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style TargetType="{x:Type RadioButton}">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="3,0,9,0" />
    </Style>

    <Style TargetType="{x:Type GroupBox}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Padding" Value="8,4" />
        <Setter Property="BorderBrush" Value="{StaticResource LightBorderBrush}" />
    </Style>

    <!-- **********************************************************************
      Margin
    *********************************************************************** -->
    <Thickness x:Key="VerticalDefault" Left="12" Top="6"  Right="12" Bottom="6"  />
    <Thickness x:Key="VerticalFirst"   Left="12" Top="12" Right="12" Bottom="6"  />
    <Thickness x:Key="VerticalLast"    Left="12" Top="6"  Right="12" Bottom="12" />

    <!-- **********************************************************************
      Footer
    *********************************************************************** -->
    <Style x:Key="DialogFooterStyle" TargetType="{x:Type StackPanel}">
        <Setter Property="Background" Value="{StaticResource LightBackgroundBrush}" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="FlowDirection" Value="RightToLeft" />
    </Style>

    <!-- **********************************************************************
      Button
    *********************************************************************** -->
    <Style x:Key="DialogButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Width" Value="120" />
        <Setter Property="Height" Value="30" />
        <Setter Property="Margin" Value="3" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Background" Value="{StaticResource LightButtonBackgroundBrush}" />
        <Setter Property="Foreground" Value="{StaticResource LightButtonForegroundBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource LightButtonBorderBrush}" />
    </Style>

    <!-- **********************************************************************
      CencelButton
    *********************************************************************** -->
    <Style x:Key="CancelButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource DialogButtonStyle}">
        <Setter Property="Width" Value="100" />
        <Setter Property="Margin" Value="12,3,3,3" />
        <Setter Property="IsCancel" Value="True" />
    </Style>
</ResourceDictionary>