using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace Muchinfo.WPF.Controls.Button { public class MuchinfoRadioButton : RadioButton { static MuchinfoRadioButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(MuchinfoRadioButton), new FrameworkPropertyMetadata(typeof(MuchinfoRadioButton))); } #region Dependency Properties Define public static readonly DependencyProperty BorderFillNormalBrushProperty = DependencyProperty.Register("BorderFillNormalBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty BorderStrokeNormalBrushProperty = DependencyProperty.Register("BorderStrokeNormalBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty BorderFillMouserOverBrushProperty = DependencyProperty.Register("BorderFillMouserOverBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty BorderFillPressedBrushProperty = DependencyProperty.Register("BorderFillPressedBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty BorderFillDisabledBrushProperty = DependencyProperty.Register("BorderFillDisabledBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty BorderStrokeDisabledBrushProperty = DependencyProperty.Register("BorderStrokeDisabledBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty CheckMarkFillBrushProperty = DependencyProperty.Register("CheckMarkFillBrush", typeof(Brush), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty RadioSizeProperty = DependencyProperty.Register("RadioSize", typeof(double), typeof(MuchinfoRadioButton), new PropertyMetadata()); public static readonly DependencyProperty CheckMarkSizeProperty = DependencyProperty.Register("CheckMarkSize", typeof(double), typeof(MuchinfoRadioButton), new PropertyMetadata()); #endregion #region Dependency Properties public Brush BorderFillNormalBrush { get { return (Brush)GetValue(BorderFillNormalBrushProperty); } set { SetValue(BorderFillNormalBrushProperty, value); } } public Brush BorderStrokeNormalBrush { get { return (Brush)GetValue(BorderStrokeNormalBrushProperty); } set { SetValue(BorderStrokeNormalBrushProperty, value); } } public Brush BorderFillMouserOverBrush { get { return (Brush)GetValue(BorderFillMouserOverBrushProperty); } set { SetValue(BorderFillMouserOverBrushProperty, value); } } public Brush BorderFillPressedBrush { get { return (Brush)GetValue(BorderFillPressedBrushProperty); } set { SetValue(BorderFillPressedBrushProperty, value); } } public Brush BorderFillDisabledBrush { get { return (Brush)GetValue(BorderFillDisabledBrushProperty); } set { SetValue(BorderFillDisabledBrushProperty, value); } } public Brush BorderStrokeDisabledBrush { get { return (Brush)GetValue(BorderStrokeDisabledBrushProperty); } set { SetValue(BorderStrokeDisabledBrushProperty, value); } } public Brush CheckMarkFillBrush { get { return (Brush)GetValue(CheckMarkFillBrushProperty); } set { SetValue(CheckMarkFillBrushProperty, value); } } public double CheckMarkSize { get { return (double)GetValue(CheckMarkSizeProperty); } set { SetValue(CheckMarkSizeProperty, value); } } public double RadioSize { get { return (double)GetValue(RadioSizeProperty); } set { SetValue(RadioSizeProperty, value); } } #endregion } }