using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace CyberX8_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)))); , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Colors.Lime))); /// /// 选中时颜色 /// 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); } } public static readonly DependencyProperty DefaultBackgroundProperty = DependencyProperty.Register("DefaultBackground" , typeof(Brush), typeof(AduRadioButtonIcon), new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)))); /// /// 选中时背景色颜色 /// public Brush DefaultBackground { get { return (Brush)GetValue(DefaultBackgroundProperty); } set { SetValue(DefaultBackgroundProperty, value); } } } }