终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

BeveledRadioButtonStyle.xaml 4.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls">
  5. <!--#region 右斜边按钮-->
  6. <Style x:Key="BeveledRadioButtonStyle" TargetType="{x:Type RadioButton}">
  7. <Setter Property="FontFamily" Value="楷体" />
  8. <Setter Property="Width" Value="100" />
  9. <Setter Property="Height" Value="30" />
  10. <Setter Property="IsChecked" Value="False" />
  11. <Setter Property="FontSize" Value="13" />
  12. <Setter Property="Foreground" Value="#ddd" />
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="{x:Type RadioButton}">
  16. <Grid x:Name="gr" SnapsToDevicePixels="True">
  17. <pry:BeveledButton
  18. x:Name="bb"
  19. FillColor="#4B8EC4"
  20. IsParallelogram="False"
  21. StrokeThickness="1" />
  22. <ContentPresenter
  23. x:Name="contentPresenter"
  24. Margin="0,0,10,0"
  25. HorizontalAlignment="Center"
  26. VerticalAlignment="Center"
  27. Content="{TemplateBinding Content}"
  28. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  29. ContentTemplate="{TemplateBinding ContentTemplate}"
  30. Focusable="False"
  31. RecognizesAccessKey="True"
  32. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  33. </Grid>
  34. <ControlTemplate.Triggers>
  35. <Trigger Property="IsChecked" Value="False">
  36. <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
  37. </Trigger>
  38. </ControlTemplate.Triggers>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. <!--#endregion-->
  44. <!--#region 平行四边形按钮-->
  45. <Style x:Key="ParallelogramRadioButtonStyle" TargetType="{x:Type RadioButton}">
  46. <Setter Property="FontFamily" Value="楷体" />
  47. <Setter Property="Width" Value="100" />
  48. <Setter Property="IsChecked" Value="False" />
  49. <Setter Property="FontSize" Value="13" />
  50. <Setter Property="Foreground" Value="#ddd" />
  51. <Setter Property="Template">
  52. <Setter.Value>
  53. <ControlTemplate TargetType="{x:Type RadioButton}">
  54. <Grid SnapsToDevicePixels="True">
  55. <pry:BeveledButton
  56. x:Name="bb"
  57. FillColor="#4B8EC4"
  58. IsParallelogram="True"
  59. StrokeThickness="1" />
  60. <ContentPresenter
  61. x:Name="contentPresenter"
  62. Margin="0,0,10,0"
  63. HorizontalAlignment="Center"
  64. VerticalAlignment="Center"
  65. Content="{TemplateBinding Content}"
  66. ContentStringFormat="{TemplateBinding ContentStringFormat}"
  67. ContentTemplate="{TemplateBinding ContentTemplate}"
  68. Focusable="False"
  69. RecognizesAccessKey="True"
  70. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  71. </Grid>
  72. <ControlTemplate.Triggers>
  73. <Trigger Property="IsChecked" Value="False">
  74. <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
  75. </Trigger>
  76. </ControlTemplate.Triggers>
  77. </ControlTemplate>
  78. </Setter.Value>
  79. </Setter>
  80. </Style>
  81. <!--#endregion-->
  82. </ResourceDictionary>