<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:customControl="clr-namespace:PDF_Master.CustomControl"> <SolidColorBrush x:Key="Common.Border" Color="#FF273C62" /> <SolidColorBrush x:Key="Common.ForGround.Blue" Color="#FF273C62" /> <SolidColorBrush x:Key="Common.ForGround.Black" Color="#FF000000" /> <SolidColorBrush x:Key="Button.Static.Background" Color="#273C62" /> <SolidColorBrush x:Key="Button.Static.Border" Color="#FF273C62" /> <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#1A477EDE" /> <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#273C62" /> <SolidColorBrush x:Key="Button.Pressed.Background" Color="#29477EDE" /> <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B" /> <SolidColorBrush x:Key="Button.Disabled.Background" Color="#273C62" /> <SolidColorBrush x:Key="Button.Disabled.Border" Color="#273C62" /> <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#26FFFFFF" /> <SolidColorBrush x:Key="CloseButton.MouseOver.Foreground" Color="Red" /> <SolidColorBrush x:Key="Disabled.ForeGround" Color="#FFE2E3E6" /> <SolidColorBrush x:Key="BlueBtn.Mouseover.Background" Color="#31538D" /> <SolidColorBrush x:Key="BlueBtn.Pressed.Background" Color="#1B2944" /> <SolidColorBrush x:Key="Redact.Background" Color="#477EDE" /> <Style x:Key="ToggleBtnScreenAnnotationStyle" TargetType="customControl:CustomIconToggleBtn"> <Setter Property="Background" Value="{StaticResource Button.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Margin" Value="4" /> <Setter Property="Height" Value="40" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="customControl:CustomIconToggleBtn"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="Transparent" CornerRadius="4" SnapsToDevicePixels="true"> <Grid Width="40" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center"> <ContentPresenter x:Name="contentPresenter" Margin="0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="border" Property="Background" Value="#e2e3e5" /> <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" /> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="border" Property="Background" Value="#e2e3e5" /> <Setter TargetName="border" Property="BorderBrush" Value="#CED0D4" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Background" Value="#e2e3e5" /> <Setter Property="BorderBrush" Value="#CED0D4" /> </Trigger> <Trigger Property="IsChecked" Value="False"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter Property="Background" Value="Transparent" /> </Trigger> </Style.Triggers> </Style> <Style x:Key="ToggleBtnAnnotationStyle" TargetType="customControl:CustomIconToggleBtn"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Top" /> <Setter Property="Height" Value="25" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="customControl:CustomIconToggleBtn"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true"> <Grid> <Grid Width="25" Height="25" HorizontalAlignment="Left" VerticalAlignment="Top"> <Image x:Name="ImageIcon" Width="25" Height="25" Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed" /> </Grid> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ToggleBtnViewModeStyle" TargetType="customControl:CustomIconToggleBtn"> <Setter Property="Background" Value="{StaticResource Button.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Height" Value="40" /> <Setter Property="Margin" Value="4,0,4,0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="customControl:CustomIconToggleBtn"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true"> <Grid> <Grid Width="40" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center"> <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed" /> </Grid> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" /> </Trigger> <!--<Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" /> <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" /> <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" /> </Trigger>--> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Background" Value="{StaticResource Button.Pressed.Background}" /> </Trigger> <Trigger Property="IsChecked" Value="False"> <Setter Property="Background" Value="Transparent" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter Property="Background" Value="Transparent" /> </Trigger> </Style.Triggers> </Style> <SolidColorBrush x:Key="Button.Select.Background" Opacity="0.1" Color="#1770F4" /> <SolidColorBrush x:Key="Button.SelectForeground.Background" Color="#1770F4" /> <Style x:Key="ToggleBtnSelectStyle" TargetType="customControl:CustomIconToggleBtn"> <Setter Property="Background" Value="{StaticResource Button.Static.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}" /> <Setter Property="Foreground" Value="#8F96A7" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Height" Value="40" /> <Setter Property="Margin" Value="4,0,4,0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="customControl:CustomIconToggleBtn"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" SnapsToDevicePixels="true"> <Grid> <Grid Width="40" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center"> <Image x:Name="ImageIcon" Width="20" Height="20" Source="{Binding Icon, RelativeSource={RelativeSource Mode=TemplatedParent}}" Visibility="Collapsed" /> </Grid> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.MouseOver.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.MouseOver.Border}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Pressed.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Pressed.Border}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="{StaticResource Button.Disabled.Background}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" /> <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="{StaticResource Button.Disabled.Foreground}" /> <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Background" Value="{StaticResource Button.Select.Background}" /> <Setter Property="Foreground" Value="{StaticResource Button.SelectForeground.Background}" /> </Trigger> <Trigger Property="IsChecked" Value="False"> <Setter Property="Background" Value="Transparent" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter Property="Background" Value="Transparent" /> </Trigger> </Style.Triggers> </Style> <Style x:Key="BlueBtnStyle" TargetType="{x:Type Button}"> <Setter Property="Background" Value="#1460F3" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" SnapsToDevicePixels="true"> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Mouseover.Background}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource BlueBtn.Pressed.Background}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="#33000000" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource Button.Disabled.Border}" /> <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" /> <Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="Margin" Value="4,0,4,0" /> <Setter Property="Width" Value="auto" /> <Setter Property="Height" Value="28" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,0" CornerRadius="4" SnapsToDevicePixels="true"> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="CompressBtn" TargetType="Button"> <Setter Property="Background" Value="White" /> <Setter Property="BorderBrush" Value="White" /> <Setter Property="Width" Value="528" /> <Setter Property="Height" Value="64" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="7,7,7,7" SnapsToDevicePixels="true"> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="#1A000000" /> <Setter TargetName="border" Property="BorderBrush" Value="gray" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="#26000000" /> <Setter TargetName="border" Property="BorderBrush" Value="gray" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="Transparent" /> <Setter TargetName="border" Property="BorderBrush" Value="#33000000" /> <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" /> <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <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="RadioButton.Static.Background" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="RadioButton.Static.Border" Color="#FF707070" /> <!-- 自定义形状的单选按钮 --> <Style x:Key="RectangleRadionButton" 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="radioButtonBorder" Property="Background" Value="Red" /> <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="RectangleRadionButtonWithCorner" 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}" CornerRadius="4"> <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> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" /> </Trigger> <Trigger Property="IsChecked" Value="True"> <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" /> <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" /> </Trigger> </Style.Triggers> </Style> <!-- 带有蓝色边框的单选按钮 --> <Style x:Key="BlueBorderRadionButtonWithCorner" TargetType="{x:Type RadioButton}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <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}" CornerRadius="4"> <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="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="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" /> </Trigger> <Trigger Property="IsChecked" Value="true"> <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="blue" /> </Trigger> <Trigger Property="IsChecked" Value="{x:Null}"> <Setter TargetName="optionMark" Property="Opacity" Value="0.56" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Design Token SubToolbar lv2 radionbutton --> <Style x:Key="SubToolbarRdb" BasedOn="{StaticResource RectangleRadionButtonWithCorner}" TargetType="{x:Type RadioButton}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="FontSize" Value="12" /> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" /> <Setter Property="BorderThickness" Value="0" /> <!--<Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsChecked" Value="True"> <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" /> </Trigger> </Style.Triggers>--> </Style> <Style x:Key="HomePageCompressBtn" TargetType="Button"> <Setter Property="Background" Value="White" /> <Setter Property="BorderBrush" Value="White" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="White" BorderThickness="1,1,1,1" SnapsToDevicePixels="true"> <ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="False" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="border" Property="Background" Value="#1A000000" /> <Setter TargetName="border" Property="BorderBrush" Value="AntiqueWhite" /> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter TargetName="border" Property="Background" Value="#26000000" /> <Setter TargetName="border" Property="BorderBrush" Value="WhiteSmoke" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter TargetName="border" Property="Background" Value="White" /> <Setter TargetName="border" Property="BorderBrush" Value="White" /> <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="Black" /> <Setter TargetName="contentPresenter" Property="Opacity" Value="1" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>