AduRadioButton.xaml 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:customControl="clr-namespace:Venus_Themes.CustomControls"
  4. xmlns:Attach="clr-namespace:Venus_UI.Themes.Attach"
  5. >
  6. <ResourceDictionary.MergedDictionaries>
  7. <ResourceDictionary Source="/Venus_Themes;component/Themes/Generic.xaml"/>
  8. </ResourceDictionary.MergedDictionaries>
  9. <Style TargetType="{x:Type customControl:AduRadioButtonIcon}">
  10. <!--<Setter Property="Height" Value="30" />-->
  11. <Setter Property="Cursor" Value="Hand" />
  12. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  13. <Setter Property="Background" Value="White" />
  14. <Setter Property="BorderBrush" Value="Silver" />
  15. <Setter Property="FontSize" Value="16" />
  16. <Setter Property="FontFamily" Value="Arial" />
  17. <Setter Property="FontWeight" Value="DemiBold" />
  18. <Setter Property="Foreground" Value="Black" />
  19. <Setter Property="Attach:IconElement.Margin" Value="15,0"/>
  20. <Setter Property="Attach:IconElement.Width" Value="16"/>
  21. <!--<Setter Property="Margin" Value="0,0,0,0"/>-->
  22. <Setter Property="Padding" Value="0" />
  23. <Setter Property="BorderThickness" Value="1,0,0,0"></Setter>
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="{x:Type customControl:AduRadioButtonIcon}">
  27. <Border
  28. x:Name="templateRoot"
  29. Background="{Binding DefaultBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}"
  30. Margin="{TemplateBinding Margin}"
  31. Padding="{TemplateBinding Padding}"
  32. BorderBrush="{TemplateBinding BorderBrush}"
  33. BorderThickness="{TemplateBinding BorderThickness}"
  34. CornerRadius="0">
  35. <StackPanel
  36. VerticalAlignment="Center"
  37. HorizontalAlignment="Center"
  38. Orientation="Horizontal"
  39. Margin="0"
  40. SnapsToDevicePixels="True">
  41. <!--<Border>
  42. <Path x:Name="Icon" VerticalAlignment="Center" Width="{TemplateBinding Attach:IconElement.Width}" Margin="0,0,10,0" Fill="{TemplateBinding Foreground}" Stretch="Uniform" Data="{TemplateBinding Attach:IconElement.PathData}" />
  43. </Border>-->
  44. <TextBlock
  45. x:Name="contentPresenter"
  46. Grid.Column="1"
  47. FontSize="22"
  48. Foreground="{TemplateBinding Foreground}"
  49. Margin="0,0,3,0"
  50. HorizontalAlignment="Left"
  51. VerticalAlignment="Center"
  52. Text="{TemplateBinding Content}"
  53. Padding="0,0,0,0"
  54. Focusable="False"
  55. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  56. </StackPanel>
  57. </Border>
  58. <ControlTemplate.Triggers>
  59. <!--<Trigger Property="IsMouseOver" Value="True" >
  60. <Setter TargetName="templateRoot" Property="Opacity" Value=".8" />
  61. </Trigger>-->
  62. <Trigger Property="IsEnabled" Value="False" />
  63. <Trigger Property="IsPressed" Value="True" />
  64. <Trigger Property="IsChecked" Value="True">
  65. <Setter TargetName="templateRoot" Property="Background" Value="{Binding SelectBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
  66. <!--<Setter Property="Opacity" Value="1" />-->
  67. <Setter Property="IsEnabled" Value="False" />
  68. <Setter TargetName="templateRoot" Property="BorderThickness" Value="0" />
  69. <!--<Setter TargetName="Icon" Property="Fill" Value="{Binding SelectColor, RelativeSource={RelativeSource Mode=TemplatedParent}}" />-->
  70. <Setter TargetName="templateRoot" Property="BorderBrush" Value="{Binding SelectColor, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
  71. <Setter TargetName="contentPresenter" Property="Foreground" Value="{Binding SelectColor, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
  72. <!--<Setter Property="customControl:AduRadioButtonIcon.Effect">
  73. <Setter.Value>
  74. <DropShadowEffect Color="Black"></DropShadowEffect>
  75. </Setter.Value>
  76. </Setter>-->
  77. <!--<Setter Property="customControl:AduRadioButtonIcon.FontSize" Value="26"/>-->
  78. </Trigger>
  79. </ControlTemplate.Triggers>
  80. </ControlTemplate>
  81. </Setter.Value>
  82. </Setter>
  83. </Style>
  84. </ResourceDictionary>