| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="CheckRadioFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="14,0,0,0"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="EmptyCheckBoxFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="1"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="mtpCheckBoxStyle" TargetType="{x:Type CheckBox}">
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
- <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CheckBox}">
- <Grid>
- <Rectangle Name="OutSideBorder"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource FocusVisualBrush}"
- StrokeDashArray="1,2"
- StrokeThickness="1"
- Visibility="Collapsed" />
- <Grid Margin="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Rectangle x:Name="CheckMark"
- Width="15"
- Height="15"
- Fill="White"
- Stroke="{TemplateBinding BorderBrush}"
- StrokeThickness="1" />
- <Path x:Name="CheckMarkPath"
- Margin="1,1,1,1"
- Data="F1M1,12C1,12 4,8 4,8 4,8 8,14 8,14 8,14 15,1 15,1 15,1 18,4 18,4 18,4 8,18 8,18 8,18 1,12 1,12z"
- Fill="{DynamicResource CheckedBrush}"
- FlowDirection="LeftToRight" />
- <ContentPresenter Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="CheckMarkPath" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
- <Setter TargetName="CheckMarkPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="CheckMarkPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="OutSideBorder" Property="Visibility" Value="Visible" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="OrderCheckBoxStyle" TargetType="{x:Type CheckBox}">
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
- <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CheckBox}">
- <Grid>
- <Rectangle Name="OutSideBorder"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource FocusVisualBrush}"
- StrokeDashArray="1,2"
- StrokeThickness="1"
- Visibility="Collapsed" />
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <ContentPresenter Grid.Column="0"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- <Path x:Name="checkPath"
- Grid.Column="1"
- Margin="5,0"
- VerticalAlignment="Center"
- Data="M1,4.5L4.5,1 8,4.5"
- Stroke="{TemplateBinding Foreground}"
- Visibility="Collapsed" />
- <Path x:Name="unCheckPath"
- Grid.Column="1"
- Margin="5,0"
- VerticalAlignment="Center"
- Data="M1,1.5L4.5,5 8,1.5"
- Stroke="{TemplateBinding Foreground}" />
- </Grid>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="checkPath" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="unCheckPath" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="checkPath" Property="Visibility" Value="Visible" />
- <Setter TargetName="unCheckPath" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="checkPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" />
- <Setter TargetName="unCheckPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="OutSideBorder" Property="Visibility" Value="Visible" />
- </Trigger>
- <!--
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="CheckMarkPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- -->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="AccountInfoCheckBoxStyle" TargetType="{x:Type CheckBox}">
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
- <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="Padding" Value="2" />
- <Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type CheckBox}">
- <Grid>
- <Rectangle Name="OutSideBorder"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource FocusVisualBrush}"
- StrokeDashArray="1,2"
- StrokeThickness="1"
- Visibility="Collapsed" />
- <Border Name="BackgroudGrid"
- Margin="{Binding Padding}"
- CornerRadius="4">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <ContentPresenter Grid.Column="0"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="True">
- <Setter TargetName="OutSideBorder" Property="Visibility" Value="Visible" />
- </Trigger>
- <!--
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="CheckMark" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="CheckMarkPath" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- -->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|