终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

60 linhas
3.0 KiB

  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <!--#region 编辑开关 ToggleButton 样式-->
  3. <Style x:Key="EditToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  4. <Setter Property="Template">
  5. <Setter.Value>
  6. <ControlTemplate TargetType="{x:Type ToggleButton}">
  7. <Grid>
  8. <Border
  9. x:Name="border2"
  10. Width="{TemplateBinding Width}"
  11. Height="{TemplateBinding Height}"
  12. Margin="{TemplateBinding Padding}"
  13. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  14. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  15. Background="Transparent">
  16. <ContentPresenter
  17. Margin="{TemplateBinding Padding}"
  18. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  19. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  20. RecognizesAccessKey="True"
  21. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  22. </Border>
  23. </Grid>
  24. <ControlTemplate.Triggers>
  25. <!--<Trigger Property="IsPressed" Value="true">
  26. <Setter Property="Background" Value="#FFd2e7f4" />
  27. </Trigger>-->
  28. <!-- 控件选中 -->
  29. <Trigger Property="IsChecked" Value="true">
  30. <Setter Property="Foreground" Value="#ff1002E9" />
  31. </Trigger>
  32. <!-- 控件未选中 -->
  33. <Trigger Property="IsChecked" Value="false">
  34. <Setter Property="Foreground" Value="#ff2AB2E7" />
  35. </Trigger>
  36. <!-- 鼠标进入 -->
  37. <Trigger Property="IsMouseOver" Value="True">
  38. <Setter TargetName="border2" Property="Background" Value="#332AB2E7" />
  39. </Trigger>
  40. <!-- 控件禁用 -->
  41. <Trigger Property="IsEnabled" Value="false">
  42. <Setter Property="Foreground" Value="#662AB2E7" />
  43. </Trigger>
  44. <!-- 控件启用 -->
  45. <Trigger Property="IsEnabled" Value="True">
  46. <Setter Property="Foreground" Value="#ff2AB2E7" />
  47. </Trigger>
  48. </ControlTemplate.Triggers>
  49. </ControlTemplate>
  50. </Setter.Value>
  51. </Setter>
  52. </Style>
  53. <!--#endregion-->
  54. </ResourceDictionary>