|
@@ -1,17 +1,16 @@
|
|
|
<ResourceDictionary
|
|
|
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
|
|
|
+ xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
mc:Ignorable="d">
|
|
|
-
|
|
|
<SolidColorBrush x:Key="RadioButton_BG" Color="#FF6398CC"/>
|
|
|
- <LinearGradientBrush x:Key="RadioButton_BG_Color" EndPoint="0,0" StartPoint="0,1">
|
|
|
- <GradientStop Color="White" Offset="0"/>
|
|
|
- <GradientStop Color="White" Offset="0.9"/>
|
|
|
- <GradientStop Color="#FFD0D0D0" Offset="1"/>
|
|
|
+ <LinearGradientBrush x:Key="RadioButton_BG_Color" StartPoint="0,1" EndPoint="0,0">
|
|
|
+ <GradientStop Offset="0" Color="White"/>
|
|
|
+ <GradientStop Offset="0.9" Color="White"/>
|
|
|
+ <GradientStop Offset="1" Color="#FFD0D0D0"/>
|
|
|
</LinearGradientBrush>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD" Color="#FFC6D8EC"/>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD_Shadow" Color="#FF284775"/>
|
|
@@ -20,14 +19,91 @@
|
|
|
<SolidColorBrush x:Key="RadioButton_BG_Unable" Color="#FFD2D2D2"/>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD_Unable" Color="#FFF3F3F3"/>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD_Shadow_Unable" Color="Blue"/>
|
|
|
- <!--//#FF9D9D9D-->
|
|
|
+ <!-- //#FF9D9D9D -->
|
|
|
<SolidColorBrush x:Key="RadioButton_BG_Checked" Color="#FF376091"/>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD_Checked" Color="#FFF3F3F3"/>
|
|
|
<SolidColorBrush x:Key="RadioButton_BD_Shadow_Checked" Color="#FF9D9D9D"/>
|
|
|
<SolidColorBrush x:Key="TopFrame_BG" Color="#FFD1E3CF"/>
|
|
|
-
|
|
|
- <!-- Normal Button style -->
|
|
|
- <Style TargetType="{x:Type RadioButton}" x:Key="NormalRadioButtonStyle">
|
|
|
+ <Style x:Key="RadioButtonHightStyle" TargetType="{x:Type RadioButton}">
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
|
|
|
+ <Setter Property="Background" Value="{StaticResource RadioButton_BG}"/>
|
|
|
+ <Setter Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
|
|
|
+ <Setter Property="BorderThickness" Value="1,1,0,0"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource FG_White}"/>
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
+ <Setter Property="Padding" Value="6,3"/>
|
|
|
+ <Setter Property="MinWidth" Value="40"/>
|
|
|
+ <Setter Property="MinHeight" Value="20"/>
|
|
|
+ <Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
|
+ <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
|
|
|
+ <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
|
|
+ <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>
|
|
|
+ <Setter Property="Border.CornerRadius" Value="4"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
+ <Border
|
|
|
+ x:Name="BG"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
|
+ Cursor="Hand"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
|
+ <Border
|
|
|
+ x:Name="Inner_BD"
|
|
|
+ Margin="0,0,-2,-2"
|
|
|
+ Padding="5,1"
|
|
|
+ BorderBrush="WhiteSmoke"
|
|
|
+ BorderThickness="0,0,2,2"
|
|
|
+ CornerRadius="3">
|
|
|
+ <ContentPresenter
|
|
|
+ x:Name="contentpresenter"
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
+ Cursor="Hand"
|
|
|
+ RecognizesAccessKey="True"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
|
+ </Border>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <!--<Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter TargetName="BG" Property="Background" Value="{StaticResource RadioButton_BG_MouseOver}"/>
|
|
|
+ </Trigger>-->
|
|
|
+ <Trigger Property="IsPressed" Value="True">
|
|
|
+ <Setter TargetName="BG" Property="Background" Value="{StaticResource RadioButton_BG_Press}"/>
|
|
|
+ <Setter TargetName="BG" Property="Margin" Value="1"/>
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsEnabled" Value="False">
|
|
|
+ <Setter TargetName="BG" Property="Background" Value="{StaticResource RadioButton_BG_Unable}"/>
|
|
|
+ <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Unable}"/>
|
|
|
+ <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Shadow_Unable}"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter TargetName="BG" Property="Background" Value="#FF49BD9A"/>
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
+ <Setter Property="FontWeight" Value="Bold"/>
|
|
|
+ <!--<Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Unable}"/>-->
|
|
|
+ <Setter Property="Foreground" Value="White"/>
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="False">
|
|
|
+ <Setter TargetName="BG" Property="BorderBrush" Value="White"/>
|
|
|
+ <Setter Property="FontSize" Value="13"/>
|
|
|
+ <Setter Property="FontWeight" Value="Normal"/>
|
|
|
+ <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
|
|
|
+ <Setter TargetName="contentpresenter" Property="TextBlock.Foreground" Value="{DynamicResource FG_Black}"/>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <!-- Normal Button style -->
|
|
|
+ <Style x:Key="NormalRadioButtonStyle" TargetType="{x:Type RadioButton}">
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
|
|
|
<Setter Property="Background" Value="{StaticResource RadioButton_BG}"/>
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
|
|
@@ -46,20 +122,29 @@
|
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
- <Border x:Name="BG" BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
- CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
|
- BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
- Background="{TemplateBinding Background}" Cursor="Hand">
|
|
|
- <Border x:Name="Inner_BD"
|
|
|
- BorderBrush="WhiteSmoke"
|
|
|
- BorderThickness="0,0,2,2" Margin="0,0,-2,-2" CornerRadius="3" Padding="5,1">
|
|
|
- <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
- Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"
|
|
|
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
-
|
|
|
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
|
|
|
- </ContentPresenter>
|
|
|
+ <Border
|
|
|
+ x:Name="BG"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
|
+ Cursor="Hand"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
|
+ <Border
|
|
|
+ x:Name="Inner_BD"
|
|
|
+ Margin="0,0,-2,-2"
|
|
|
+ Padding="5,1"
|
|
|
+ BorderBrush="WhiteSmoke"
|
|
|
+ BorderThickness="0,0,2,2"
|
|
|
+ CornerRadius="3">
|
|
|
+ <ContentPresenter
|
|
|
+ x:Name="contentpresenter"
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
+ Cursor="Hand"
|
|
|
+ RecognizesAccessKey="True"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
|
</Border>
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
@@ -83,26 +168,23 @@
|
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
|
<!--<Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Unable}"/>-->
|
|
|
<Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Shadow_Unable}"/>
|
|
|
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
|
</Trigger>
|
|
|
<Trigger Property="IsChecked" Value="False">
|
|
|
<Setter TargetName="BG" Property="BorderBrush" Value="White"/>
|
|
|
<Setter Property="FontSize" Value="13"/>
|
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
|
<Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
|
|
|
- <Setter Property="TextBlock.Foreground" TargetName="contentpresenter" Value="{DynamicResource FG_Black}"/>
|
|
|
+ <Setter TargetName="contentpresenter" Property="TextBlock.Foreground" Value="{DynamicResource FG_Black}"/>
|
|
|
</Trigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Style>
|
|
|
- <Style TargetType="RadioButton" BasedOn="{StaticResource NormalRadioButtonStyle}"/>
|
|
|
-
|
|
|
-
|
|
|
- <Style TargetType="RadioButton" x:Key="NormalRadioButton"/>
|
|
|
-
|
|
|
- <Style x:Key="DemoStyle" TargetType="{x:Type RadioButton}">
|
|
|
+ <Style BasedOn="{StaticResource NormalRadioButtonStyle}" TargetType="RadioButton"/>
|
|
|
+ <Style x:Key="NormalRadioButton" TargetType="RadioButton"/>
|
|
|
+ <Style x:Key="DemoStyle" TargetType="{x:Type RadioButton}">
|
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
|
|
|
<Setter Property="Background" Value="{StaticResource RadioButton_BG_Color}"/>
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
|
|
@@ -123,10 +205,28 @@
|
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
- <Border x:Name="BG" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" CornerRadius="{TemplateBinding Border.CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Cursor="Hand">
|
|
|
- <Border x:Name="Inner_BD" BorderBrush="{StaticResource RadioButton_BD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="3" Padding="5,1">
|
|
|
- <ContentPresenter x:Name="contentpresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Cursor="Hand">
|
|
|
- </ContentPresenter>
|
|
|
+ <Border
|
|
|
+ x:Name="BG"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
+ CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
|
+ Cursor="Hand"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
|
+ <Border
|
|
|
+ x:Name="Inner_BD"
|
|
|
+ Padding="5,1"
|
|
|
+ BorderBrush="{StaticResource RadioButton_BD_Shadow}"
|
|
|
+ BorderThickness="0,0,1,1"
|
|
|
+ CornerRadius="3">
|
|
|
+ <ContentPresenter
|
|
|
+ x:Name="contentpresenter"
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
+ Cursor="Hand"
|
|
|
+ RecognizesAccessKey="True"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
|
</Border>
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
@@ -161,5 +261,4 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Style>
|
|
|
-
|
|
|
</ResourceDictionary>
|