init
This commit is contained in:
101
Common/DTS.CommonCore/Controls/checkbox.xaml
Normal file
101
Common/DTS.CommonCore/Controls/checkbox.xaml
Normal file
@@ -0,0 +1,101 @@
|
||||
<ResourceDictionary
|
||||
x:Class="DTS.Common.Controls.checkbox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
|
||||
|
||||
<!-- SimpleStyles: CheckBox -->
|
||||
<Style x:Key="FlatCheckBoxStyle" TargetType="CheckBox">
|
||||
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="Margin" Value="0,0,5,0" />
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="Width" Value="20" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="Border"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
CornerRadius="0"
|
||||
Background="{StaticResource Brush_FlatControlWindowBackground}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<!--<Rectangle x:Name="CheckMark" Height="14" Width="14" Fill="{StaticResource GlyphBrush}" />-->
|
||||
<!--<Path
|
||||
Width="15" Height="15"
|
||||
x:Name="CheckMark"
|
||||
SnapsToDevicePixels="False"
|
||||
Stroke="{StaticResource GlyphBrush}"
|
||||
StrokeThickness="2"
|
||||
Data="M 0 0 L 15 15 M 0 15 L 15 0" />-->
|
||||
<Path
|
||||
Width="15" Height="15"
|
||||
x:Name="CheckMark"
|
||||
SnapsToDevicePixels="False"
|
||||
Stroke="{StaticResource GlyphBrush}"
|
||||
StrokeThickness="2"
|
||||
Data="M 3 8 L 8 15 M 7 15 L 14 1" />
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="false">
|
||||
<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter TargetName="CheckMark" Property="Opacity" Value="0"/>
|
||||
<Setter TargetName="CheckMark" Property="Visibility" Value="Hidden" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlMouseOverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlWindowBackground}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter TargetName="CheckMark" Property="Opacity" Value="0.3"/>
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource Brush_FlatControlDisabledBackground}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource Brush_FlatControlBorder}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Brush_FlatControlDisabledForeground}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="ToolTipService.ToolTip" Value="" />
|
||||
<EventSetter Event="ToolTipOpening" Handler="ToolTipEventHandler" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="{x:Type CheckBox}" TargetType="CheckBox" BasedOn="{StaticResource FlatCheckBoxStyle}" />
|
||||
|
||||
<Style x:Key="PageContentCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource FlatCheckBoxStyle}">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Margin" Value="5,2,5,2" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="ToolTipService.ToolTip" Value="" />
|
||||
<EventSetter Event="ToolTipOpening" Handler="ToolTipEventHandler" />
|
||||
</Style>
|
||||
<Style x:Key="PageContentCheckBoxErrorStyle" TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}">
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user