星火微课系统客户端
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

StyleZRoundButton.xaml 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:view="clr-namespace:XHWK.WKTool.View">
  5. <Style x:Key="ZRoundButtonStyle" TargetType="{x:Type view:ZRoundButton}">
  6. <Setter Property="OverridesDefaultStyle" Value="True" />
  7. <Setter Property="Cursor" Value="Hand" />
  8. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  9. <Setter Property="HorizontalContentAlignment" Value="Center" />
  10. <Setter Property="VerticalContentAlignment" Value="Center" />
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="Button">
  14. <Grid Background="Transparent">
  15. <Border
  16. Name="border"
  17. Padding="{TemplateBinding Padding}"
  18. HorizontalAlignment="Stretch"
  19. VerticalAlignment="Stretch"
  20. Background="{TemplateBinding Background}"
  21. BorderBrush="{TemplateBinding BorderBrush}"
  22. BorderThickness="{TemplateBinding BorderThickness}"
  23. CornerRadius="{Binding Path=BorderRadius, RelativeSource={RelativeSource TemplatedParent}}"
  24. IsHitTestVisible="True">
  25. <ContentPresenter
  26. Margin="{TemplateBinding Padding}"
  27. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  28. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  29. </Border>
  30. </Grid>
  31. <ControlTemplate.Triggers>
  32. <Trigger Property="IsMouseOver" Value="True">
  33. <Setter Property="Opacity" Value="0.8" />
  34. </Trigger>
  35. </ControlTemplate.Triggers>
  36. </ControlTemplate>
  37. </Setter.Value>
  38. </Setter>
  39. </Style>
  40. </ResourceDictionary>