123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <ResourceDictionary
- 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" 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"/>
- <SolidColorBrush x:Key="RadioButton_BG_MouseOver" Color="#FF4FCBFF"/>
- <SolidColorBrush x:Key="RadioButton_BG_Press" Color="#FF5A89D4"/>
- <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 -->
- <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"/>
- <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}"/>
- <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="{StaticResource RadioButton_BG_Unable}"/>
- <Setter Property="FontSize" Value="13"/>
- <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}}"/>
- </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>
- <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}"/>
- <Setter Property="BorderThickness" Value="1,1,0,0"/>
- <Setter Property="FontFamily" Value="Arial"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>
- <Setter Property="HorizontalContentAlignment" Value="Left"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="Padding" Value="6,3"/>
- <Setter Property="MinWidth" Value="40"/>
- <Setter Property="MinHeight" Value="20"/>
- <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="Stylus.IsTouchFeedbackEnabled" Value="False"/>
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <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"
- 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>
- <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="{StaticResource RadioButton_BG_Checked}"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Checked}"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Shadow_Checked}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="BG" Property="Background" Value="{StaticResource RadioButton_BG_Color}"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD_Shadow_Checked}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|