123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <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:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
- mc:Ignorable="d">
-
- <SolidColorBrush x:Key="RadioButton_BG" Color="#FF3d8d73"/>
- <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>
- <SolidColorBrush x:Key="RadioButton_BD" Color="#FF107268"/>
- <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="#FF9D9D9D"/>
- <SolidColorBrush x:Key="RadioButton_BG_Checked" Color="#FFb8fff8"/>
- <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">
- <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource TopFrame_BG}"/>
- <Setter Property="BorderBrush" Value="Black"/>
- <Setter Property="BorderThickness" Value="2,2,0,0"/>
- <Setter Property="Foreground" Value="{DynamicResource FG_Black}"/>
- <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="Border.CornerRadius" Value="4"/>
- <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>
- </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 TopFrame_BG}"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter TargetName="BG" Property="BorderBrush" Value="{StaticResource RadioButton_BD}"/>
- <Setter TargetName="Inner_BD" Property="BorderBrush" Value="{StaticResource RadioButton_BD_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 Property="TextBlock.Foreground" TargetName="contentpresenter" Value="WhiteSmoke"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="RadioButton" BasedOn="{StaticResource NormalRadioButtonStyle}"/>
- <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="SnapsToDevicePixels" Value="True"/>
- <Setter Property="Border.CornerRadius" Value="4"/>
- <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>
- </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>
|