using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace Venus_Themes.CustomControls { public class AduRadioButtonIcon : RadioButton { public AduRadioButtonIcon() { } static AduRadioButtonIcon() { DefaultStyleKeyProperty.OverrideMetadata(typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(typeof(AduRadioButtonIcon))); } public static readonly DependencyProperty SelectColorProperty = DependencyProperty.Register("SelectColor" , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromRgb(0,255,255)))); /// /// 选中时颜色 /// public Brush SelectColor { get { return (Brush)GetValue(SelectColorProperty); } set { SetValue(SelectColorProperty, value); } } public static readonly DependencyProperty SelectBackgroundProperty = DependencyProperty.Register("SelectBackground" , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)))); /// /// 选中时背景色颜色 /// public Brush SelectBackground { get { return (Brush)GetValue(SelectBackgroundProperty); } set { SetValue(SelectBackgroundProperty, value); } } } }