星火微课系统客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

StyleButton.xaml 1.2KB

12345678910111213141516171819202122232425
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  2. <Style x:Key="MyButton" TargetType="{x:Type Button}">
  3. <Setter Property="OverridesDefaultStyle" Value="True" />
  4. <Setter Property="Cursor" Value="Hand" />
  5. <Setter Property="Template">
  6. <Setter.Value>
  7. <ControlTemplate TargetType="Button">
  8. <Border
  9. Name="border"
  10. Padding="{TemplateBinding Padding}"
  11. Background="{TemplateBinding Background}"
  12. BorderThickness="0"
  13. CornerRadius="6">
  14. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  15. </Border>
  16. <ControlTemplate.Triggers>
  17. <Trigger Property="IsMouseOver" Value="True">
  18. <Setter Property="Opacity" Value="0.6" />
  19. </Trigger>
  20. </ControlTemplate.Triggers>
  21. </ControlTemplate>
  22. </Setter.Value>
  23. </Setter>
  24. </Style>
  25. </ResourceDictionary>