<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="OptionMarkFocusVisual"> <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="FocusVisual"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeDashArray="1 2" StrokeThickness="1" /> </ControlTemplate> </Setter.Value> </Setter> </Style> <SolidColorBrush x:Key="RadioButton.Static.Background" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" /> <SolidColorBrush x:Key="RadioButton.MouseOver.Background" Color="#1A000000" /> <SolidColorBrush x:Key="RadioButton.MouseOver.Border" Color="#FF5593FF" /> <SolidColorBrush x:Key="RadioButton.MouseOver.Glyph" Color="#FFF3F9FF" /> <SolidColorBrush x:Key="RadioButton.Disabled.Background" Color="#00000000" /> <SolidColorBrush x:Key="RadioButton.Disabled.Border" Color="#FFBCBCBC" /> <SolidColorBrush x:Key="RadioButton.Disabled.Glyph" Color="#FF707070" /> <SolidColorBrush x:Key="RadioButton.Pressed.Background" Color="#26000000" /> <SolidColorBrush x:Key="RadioButton.Pressed.Border" Color="#FF3C77DD" /> <SolidColorBrush x:Key="RadioButton.Pressed.Glyph" Color="#1A477EDE" /> <SolidColorBrush x:Key="RadioButton.Static.Glyph" Color="#FF212121" /> <!-- 填充颜色 --> <SolidColorBrush x:Key="Separator.fill" Color="#1A000000" /> <SolidColorBrush x:Key="MenuIco.fill" Color="#000000" /> <Style x:Key="PageViewRadioBtn" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" /> <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Width" Value="68" /> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True"> <Border x:Name="radioButtonBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4"> <Rectangle x:Name="optionMark" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Opacity="0" /> </Border> <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="SplitModeViewRadioBtn" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" /> <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Width" Value="76" /> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True"> <Border x:Name="radioButtonBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Rectangle x:Name="optionMark" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Opacity="0" /> </Border> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ViewModeViewRadioBtn" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Width" Value="72" /> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True"> <Border x:Name="radioButtonBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Rectangle x:Name="optionMark" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Opacity="0" /> </Border> <!--<ContentControl x:Name="content" Visibility="Collapsed" Foreground="{TemplateBinding Foreground}" />--> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> <!--<Setter TargetName="content" Property="Foreground" Value="Red" />--> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> <!--<Setter TargetName="content" Property="Foreground" Value="Red" />--> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- 最近列表列表模式单选按钮 --> <Style x:Key="ListModeRadioBtnStyle" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" /> <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" /> <Setter Property="Padding" Value="0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="root" Background="Transparent" CornerRadius="4"> <Grid x:Name="templateRoot" HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Border x:Name="radioButtonBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="100" Visibility="Collapsed"> <Grid x:Name="markGrid" Margin="2" Visibility="Collapsed"> <Ellipse x:Name="optionMark" MinWidth="6" MinHeight="6" Fill="{StaticResource RadioButton.Static.Glyph}" Opacity="0" /> </Grid> </Border> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" /> <Setter TargetName="root" Property="Border.Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Offset="0.0" Color="White" /> <GradientStop Offset="0.5" Color="#CFCFCF" /> <GradientStop Offset="0.0" Color="White" /> </LinearGradientBrush> </Setter.Value> </Setter> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="root" Property="Border.Background" Value="{StaticResource color.sys.layout.anti}" /> <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.sel}" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="LocationRadioBtnStyle" TargetType="{x:Type RadioButton}"> <Setter Property="Background" Value="{StaticResource RadioButton.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Width" Value="72" /> <Setter Property="Height" Value="80" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True"> <Border x:Name="radioButtonBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Rectangle x:Name="optionMark" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Opacity="0" /> </Border> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="optionMark" Property="Fill" Value="Black" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- 右键菜单,单选按钮 --> <Style x:Key="MenuRadioBtnStyle" TargetType="{x:Type RadioButton}"> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="Margin" Value="-3" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="templateRoot" CornerRadius="7" Background="Transparent" Height="32" SnapsToDevicePixels="True"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="20" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Path HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="pathIcon" Data="M11.1144 1.57308L5.71438 9.28737C5.58464 9.47271 5.37817 9.58958 5.15248 9.60543C4.9268 9.62128 4.70603 9.5344 4.55166 9.36901L0.95166 5.51187L2.04824 4.48839L5.01649 7.66866L9.88553 0.712891L11.1144 1.57308Z" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" Visibility="Collapsed" /> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true" /> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" /> </Trigger> <Trigger Property="IsPressed" Value="true" /> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="pathIcon" Property="Visibility" Value="Visible" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- 悬浮灰色背景单选按钮 --> <Style x:Key="GreyBgRadioBtnStyle" TargetType="{x:Type RadioButton}"> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="#252629" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="templateRoot" Background="{TemplateBinding Background}" CornerRadius="4" SnapsToDevicePixels="True"> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" /> <Setter Property="Padding" Value="4,-1,0,0" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.hov.bg}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="templateRoot" Property="Opacity" Value="0.5" /> </Trigger> <Trigger Property="IsPressed" Value="true" /> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" /> <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" /> <Setter Property="Foreground" Value="#616469" /> <Setter TargetName="templateRoot" Property="BorderThickness" Value="1" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="GreyBgRadioBtnStyle2" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="#616469" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="templateRoot" Background="{TemplateBinding Background}" CornerRadius="4" SnapsToDevicePixels="True"> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="HasContent" Value="true"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <!--<Setter Property="Padding" Value="6,6,0,0" />--> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.hov.bg}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="templateRoot" Property="Opacity" Value="0.5" /> </Trigger> <Trigger Property="IsPressed" Value="true" /> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" /> <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" /> <Setter Property="Foreground" Value="#252629" /> <Setter TargetName="templateRoot" Property="BorderThickness" Value="1" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="BatchButton" TargetType="{x:Type RadioButton}"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="Background" Value="#F7F8FA" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Cursor" Value="Hand" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <ControlTemplate.Resources> <Storyboard x:Key="Storyboard1"> <ColorAnimationUsingKeyFrames Storyboard.TargetName="bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"> <EasingColorKeyFrame KeyTime="0" Value="White" /> <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FFAFAFAF" /> </ColorAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="Storyboard2"> <ColorAnimationUsingKeyFrames Storyboard.TargetName="bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)"> <EasingColorKeyFrame KeyTime="0" Value="#FFAFAFAF" /> <EasingColorKeyFrame KeyTime="0:0:0.5" Value="#D3D3D3" /> </ColorAnimationUsingKeyFrames> </Storyboard> </ControlTemplate.Resources> <BulletDecorator Background="Transparent"> <Border x:Name="bd" HorizontalAlignment="Center" Background="White" CornerRadius="5"> <Border.OpacityMask> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Offset="0" Color="Black" /> <GradientStop Offset="1" Color="White" /> </LinearGradientBrush> </Border.OpacityMask> <ContentPresenter Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" /> </Border> </BulletDecorator> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="bd" Property="Background" Value="gray" /> </Trigger> <Trigger Property="IsChecked" Value="false"> <Setter TargetName="bd" Property="Background" Value="{x:Null}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Trigger.EnterActions> <BeginStoryboard x:Name="Storyboard2_BeginStoryboard" Storyboard="{StaticResource Storyboard2}" /> </Trigger.EnterActions> <Setter TargetName="bd" Property="Background" Value="#FF606060" /> </Trigger> <MultiTrigger> <MultiTrigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource Storyboard1}" /> </MultiTrigger.EnterActions> <MultiTrigger.Conditions> <Condition Property="IsMouseOver" Value="True" /> <Condition Property="IsChecked" Value="False" /> </MultiTrigger.Conditions> <Setter TargetName="bd" Property="Background" Value="Red" /> </MultiTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- 底部工具栏的RadionButton StateBar Design Token --> <Style x:Key="StateBarRbt" TargetType="{x:Type RadioButton}"> <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="FontSize" Value="18" /> <Setter Property="Cursor" Value="Hand" /> <Setter Property="Margin" Value="0,0,10,10" /> <Setter Property="Height" Value="32" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Border x:Name="fore" Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="{StaticResource border-radius.4}"> <ContentPresenter x:Name="content" HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="fore" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.sel}" /> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="fore" Property="Background" Value="{StaticResource color.item-state.hov.bg}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="RadioButtonStyleText" TargetType="{x:Type RadioButton}"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="{StaticResource color.icon.checkbox-radio.norm.bg}" /> <Setter Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.norm.border}" /> <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="8,0,0,0" /> <Setter Property="FontSize" Value="14" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Border x:Name="radioButtonBorder" Width="14" Height="14" HorizontalAlignment="Center" VerticalAlignment="Center" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="100"> <Grid x:Name="markGrid" Margin="1.8"> <Ellipse x:Name="optionMark" MinWidth="6" MinHeight="6" Fill="{StaticResource color.icon.checkbox-radio.sel.bg}" Opacity="0" /> </Grid> </Border> <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.dis.bg}" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.dis.border}" /> <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource color.icon.checkbox-radio.dis.fill}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="optionMark" Property="Opacity" Value="1" /> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>