You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!--#region 编辑开关 ToggleButton 样式-->
- <Style x:Key="EditToggleButtonStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Grid>
- <Border
- x:Name="border2"
- Width="{TemplateBinding Width}"
- Height="{TemplateBinding Height}"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="Transparent">
- <ContentPresenter
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
-
- <ControlTemplate.Triggers>
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" Value="#FFd2e7f4" />
- </Trigger>-->
-
- <!-- 控件选中 -->
- <Trigger Property="IsChecked" Value="true">
- <Setter Property="Foreground" Value="#ff1002E9" />
- </Trigger>
-
- <!-- 控件未选中 -->
- <Trigger Property="IsChecked" Value="false">
- <Setter Property="Foreground" Value="#ff2AB2E7" />
- </Trigger>
-
- <!-- 鼠标进入 -->
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="border2" Property="Background" Value="#332AB2E7" />
- </Trigger>
-
- <!-- 控件禁用 -->
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="#662AB2E7" />
- </Trigger>
-
- <!-- 控件启用 -->
- <Trigger Property="IsEnabled" Value="True">
- <Setter Property="Foreground" Value="#ff2AB2E7" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- </ResourceDictionary>
|