星火微课系统客户端
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.

StyleButton.xaml 1.2KB

3 jaren geleden
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>