diff --git a/src/MahApps.Metro/Controls/Helper/RadioButtonHelper.cs b/src/MahApps.Metro/Controls/Helper/RadioButtonHelper.cs index 5eddfd0aa0..e48879c7b8 100644 --- a/src/MahApps.Metro/Controls/Helper/RadioButtonHelper.cs +++ b/src/MahApps.Metro/Controls/Helper/RadioButtonHelper.cs @@ -1,36 +1,946 @@ using System.ComponentModel; using System.Windows; using System.Windows.Controls; +using System.Windows.Media; namespace MahApps.Metro.Controls { public static class RadioButtonHelper { + public static readonly DependencyProperty RadioSizeProperty + = DependencyProperty.RegisterAttached("RadioSize", + typeof(double), + typeof(RadioButtonHelper), + new FrameworkPropertyMetadata(18.0)); + + /// Helper for getting from . + /// to read from. + /// RadioSize property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static double GetRadioSize(UIElement element) + { + return (double)element.GetValue(RadioSizeProperty); + } + + /// Helper for setting on . + /// to set on. + /// RadioSize property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetRadioSize(UIElement element, double value) + { + element.SetValue(RadioSizeProperty, value); + } + + public static readonly DependencyProperty RadioCheckSizeProperty + = DependencyProperty.RegisterAttached("RadioCheckSize", + typeof(double), + typeof(RadioButtonHelper), + new FrameworkPropertyMetadata(10.0)); + + /// Helper for getting from . + /// to read from. + /// RadioCheckSize property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static double GetRadioCheckSize(UIElement element) + { + return (double)element.GetValue(RadioCheckSizeProperty); + } + + /// Helper for setting on . + /// to set on. + /// RadioCheckSize property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetRadioCheckSize(UIElement element, double value) + { + element.SetValue(RadioCheckSizeProperty, value); + } + public static readonly DependencyProperty RadioStrokeThicknessProperty - = DependencyProperty.RegisterAttached( - "RadioStrokeThickness", - typeof(double), - typeof(RadioButtonHelper), - new FrameworkPropertyMetadata(1.0)); + = DependencyProperty.RegisterAttached("RadioStrokeThickness", + typeof(double), + typeof(RadioButtonHelper), + new FrameworkPropertyMetadata(1.0)); + + /// Helper for getting from . + /// to read from. + /// RadioStrokeThickness property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static double GetRadioStrokeThickness(UIElement element) + { + return (double)element.GetValue(RadioStrokeThicknessProperty); + } + + /// Helper for setting on . + /// to set on. + /// RadioStrokeThickness property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetRadioStrokeThickness(UIElement element, double value) + { + element.SetValue(RadioStrokeThicknessProperty, value); + } + + public static readonly DependencyProperty ForegroundPointerOverProperty + = DependencyProperty.RegisterAttached("ForegroundPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// ForegroundPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetForegroundPointerOver(UIElement element) + { + return (Brush)element.GetValue(ForegroundPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// ForegroundPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetForegroundPointerOver(UIElement element, Brush value) + { + element.SetValue(ForegroundPointerOverProperty, value); + } + + public static readonly DependencyProperty ForegroundPressedProperty + = DependencyProperty.RegisterAttached("ForegroundPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// ForegroundPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetForegroundPressed(UIElement element) + { + return (Brush)element.GetValue(ForegroundPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// ForegroundPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetForegroundPressed(UIElement element, Brush value) + { + element.SetValue(ForegroundPressedProperty, value); + } + + public static readonly DependencyProperty ForegroundDisabledProperty + = DependencyProperty.RegisterAttached("ForegroundDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// ForegroundDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetForegroundDisabled(UIElement element) + { + return (Brush)element.GetValue(ForegroundDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// ForegroundDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetForegroundDisabled(UIElement element, Brush value) + { + element.SetValue(ForegroundDisabledProperty, value); + } + + public static readonly DependencyProperty BackgroundPointerOverProperty + = DependencyProperty.RegisterAttached("BackgroundPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BackgroundPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBackgroundPointerOver(UIElement element) + { + return (Brush)element.GetValue(BackgroundPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// BackgroundPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBackgroundPointerOver(UIElement element, Brush value) + { + element.SetValue(BackgroundPointerOverProperty, value); + } + + public static readonly DependencyProperty BackgroundPressedProperty + = DependencyProperty.RegisterAttached("BackgroundPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BackgroundPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBackgroundPressed(UIElement element) + { + return (Brush)element.GetValue(BackgroundPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// BackgroundPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBackgroundPressed(UIElement element, Brush value) + { + element.SetValue(BackgroundPressedProperty, value); + } + + public static readonly DependencyProperty BackgroundDisabledProperty + = DependencyProperty.RegisterAttached("BackgroundDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BackgroundDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBackgroundDisabled(UIElement element) + { + return (Brush)element.GetValue(BackgroundDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// BackgroundDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBackgroundDisabled(UIElement element, Brush value) + { + element.SetValue(BackgroundDisabledProperty, value); + } + + public static readonly DependencyProperty BorderBrushPointerOverProperty + = DependencyProperty.RegisterAttached("BorderBrushPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BorderBrushPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBorderBrushPointerOver(UIElement element) + { + return (Brush)element.GetValue(BorderBrushPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// BorderBrushPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBorderBrushPointerOver(UIElement element, Brush value) + { + element.SetValue(BorderBrushPointerOverProperty, value); + } + + public static readonly DependencyProperty BorderBrushPressedProperty + = DependencyProperty.RegisterAttached("BorderBrushPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BorderBrushPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBorderBrushPressed(UIElement element) + { + return (Brush)element.GetValue(BorderBrushPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// BorderBrushPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBorderBrushPressed(UIElement element, Brush value) + { + element.SetValue(BorderBrushPressedProperty, value); + } + + public static readonly DependencyProperty BorderBrushDisabledProperty + = DependencyProperty.RegisterAttached("BorderBrushDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// BorderBrushDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetBorderBrushDisabled(UIElement element) + { + return (Brush)element.GetValue(BorderBrushDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// BorderBrushDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetBorderBrushDisabled(UIElement element, Brush value) + { + element.SetValue(BorderBrushDisabledProperty, value); + } + + public static readonly DependencyProperty OuterEllipseFillProperty + = DependencyProperty.RegisterAttached("OuterEllipseFill", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseFill(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseFillProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseFill(UIElement element, Brush value) + { + element.SetValue(OuterEllipseFillProperty, value); + } + + public static readonly DependencyProperty OuterEllipseFillPointerOverProperty + = DependencyProperty.RegisterAttached("OuterEllipseFillPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseFillPointerOver(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseFillPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseFillPointerOver(UIElement element, Brush value) + { + element.SetValue(OuterEllipseFillPointerOverProperty, value); + } + + public static readonly DependencyProperty OuterEllipseFillPressedProperty + = DependencyProperty.RegisterAttached("OuterEllipseFillPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseFillPressed(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseFillPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseFillPressed(UIElement element, Brush value) + { + element.SetValue(OuterEllipseFillPressedProperty, value); + } + + public static readonly DependencyProperty OuterEllipseFillDisabledProperty + = DependencyProperty.RegisterAttached("OuterEllipseFillDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseFillDisabled(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseFillDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseFillDisabled(UIElement element, Brush value) + { + element.SetValue(OuterEllipseFillDisabledProperty, value); + } + + public static readonly DependencyProperty OuterEllipseStrokeProperty + = DependencyProperty.RegisterAttached("OuterEllipseStroke", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseStroke(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseStrokeProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseStroke(UIElement element, Brush value) + { + element.SetValue(OuterEllipseStrokeProperty, value); + } + + public static readonly DependencyProperty OuterEllipseStrokePointerOverProperty + = DependencyProperty.RegisterAttached("OuterEllipseStrokePointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseStrokePointerOver(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseStrokePointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseStrokePointerOver(UIElement element, Brush value) + { + element.SetValue(OuterEllipseStrokePointerOverProperty, value); + } + + public static readonly DependencyProperty OuterEllipseStrokePressedProperty + = DependencyProperty.RegisterAttached("OuterEllipseStrokePressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseStrokePressed(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseStrokePressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseStrokePressed(UIElement element, Brush value) + { + element.SetValue(OuterEllipseStrokePressedProperty, value); + } + + public static readonly DependencyProperty OuterEllipseStrokeDisabledProperty + = DependencyProperty.RegisterAttached("OuterEllipseStrokeDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseStrokeDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseStrokeDisabled(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseStrokeDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseStrokeDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseStrokeDisabled(UIElement element, Brush value) + { + element.SetValue(OuterEllipseStrokeDisabledProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedFillProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedFill", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedFill(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedFillProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedFill(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedFillProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedFillPointerOverProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedFillPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedFillPointerOver(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedFillPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedFillPointerOver(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedFillPointerOverProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedFillPressedProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedFillPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedFillPressed(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedFillPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedFillPressed(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedFillPressedProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedFillDisabledProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedFillDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedFillDisabled(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedFillDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedFillDisabled(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedFillDisabledProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedStrokeProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedStroke", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedStroke(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedStrokeProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedStroke(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedStrokeProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedStrokePointerOverProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedStrokePointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedStrokePointerOver(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedStrokePointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedStrokePointerOver(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedStrokePointerOverProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedStrokePressedProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedStrokePressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedStrokePressed(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedStrokePressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedStrokePressed(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedStrokePressedProperty, value); + } + + public static readonly DependencyProperty OuterEllipseCheckedStrokeDisabledProperty + = DependencyProperty.RegisterAttached("OuterEllipseCheckedStrokeDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// OuterEllipseCheckedStrokeDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetOuterEllipseCheckedStrokeDisabled(UIElement element) + { + return (Brush)element.GetValue(OuterEllipseCheckedStrokeDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// OuterEllipseCheckedStrokeDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetOuterEllipseCheckedStrokeDisabled(UIElement element, Brush value) + { + element.SetValue(OuterEllipseCheckedStrokeDisabledProperty, value); + } + + public static readonly DependencyProperty CheckGlyphFillProperty + = DependencyProperty.RegisterAttached("CheckGlyphFill", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphFill(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphFillProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphFill property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphFill(UIElement element, Brush value) + { + element.SetValue(CheckGlyphFillProperty, value); + } + + public static readonly DependencyProperty CheckGlyphFillPointerOverProperty + = DependencyProperty.RegisterAttached("CheckGlyphFillPointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphFillPointerOver(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphFillPointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphFillPointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphFillPointerOver(UIElement element, Brush value) + { + element.SetValue(CheckGlyphFillPointerOverProperty, value); + } + + public static readonly DependencyProperty CheckGlyphFillPressedProperty + = DependencyProperty.RegisterAttached("CheckGlyphFillPressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphFillPressed(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphFillPressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphFillPressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphFillPressed(UIElement element, Brush value) + { + element.SetValue(CheckGlyphFillPressedProperty, value); + } + + public static readonly DependencyProperty CheckGlyphFillDisabledProperty + = DependencyProperty.RegisterAttached("CheckGlyphFillDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphFillDisabled(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphFillDisabledProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphFillDisabled property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphFillDisabled(UIElement element, Brush value) + { + element.SetValue(CheckGlyphFillDisabledProperty, value); + } + + public static readonly DependencyProperty CheckGlyphStrokeProperty + = DependencyProperty.RegisterAttached("CheckGlyphStroke", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphStroke(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphStrokeProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphStroke property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphStroke(UIElement element, Brush value) + { + element.SetValue(CheckGlyphStrokeProperty, value); + } + + public static readonly DependencyProperty CheckGlyphStrokePointerOverProperty + = DependencyProperty.RegisterAttached("CheckGlyphStrokePointerOver", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphStrokePointerOver(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphStrokePointerOverProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphStrokePointerOver property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphStrokePointerOver(UIElement element, Brush value) + { + element.SetValue(CheckGlyphStrokePointerOverProperty, value); + } + + public static readonly DependencyProperty CheckGlyphStrokePressedProperty + = DependencyProperty.RegisterAttached("CheckGlyphStrokePressed", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); + + /// Helper for getting from . + /// to read from. + /// CheckGlyphStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static Brush GetCheckGlyphStrokePressed(UIElement element) + { + return (Brush)element.GetValue(CheckGlyphStrokePressedProperty); + } + + /// Helper for setting on . + /// to set on. + /// CheckGlyphStrokePressed property value. + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + public static void SetCheckGlyphStrokePressed(UIElement element, Brush value) + { + element.SetValue(CheckGlyphStrokePressedProperty, value); + } + + public static readonly DependencyProperty CheckGlyphStrokeDisabledProperty + = DependencyProperty.RegisterAttached("CheckGlyphStrokeDisabled", + typeof(Brush), + typeof(RadioButtonHelper), + new PropertyMetadata(default(Brush))); - /// - /// Gets the StrokeThickness of the RadioButton itself. - /// + /// Helper for getting from . + /// to read from. + /// CheckGlyphStrokeDisabled property value. [Category(AppName.MahApps)] [AttachedPropertyBrowsableForType(typeof(RadioButton))] - public static double GetRadioStrokeThickness(DependencyObject obj) + public static Brush GetCheckGlyphStrokeDisabled(UIElement element) { - return (double)obj.GetValue(RadioStrokeThicknessProperty); + return (Brush)element.GetValue(CheckGlyphStrokeDisabledProperty); } - /// - /// Sets the StrokeThickness of the RadioButton itself. - /// + /// Helper for setting on . + /// to set on. + /// CheckGlyphStrokeDisabled property value. [Category(AppName.MahApps)] [AttachedPropertyBrowsableForType(typeof(RadioButton))] - public static void SetRadioStrokeThickness(DependencyObject obj, double value) + public static void SetCheckGlyphStrokeDisabled(UIElement element, Brush value) { - obj.SetValue(RadioStrokeThicknessProperty, value); + element.SetValue(CheckGlyphStrokeDisabledProperty, value); } } } \ No newline at end of file diff --git a/src/MahApps.Metro/Styles/Controls.RadioButton.xaml b/src/MahApps.Metro/Styles/Controls.RadioButton.xaml index 180f019fd8..c21dd4d7db 100644 --- a/src/MahApps.Metro/Styles/Controls.RadioButton.xaml +++ b/src/MahApps.Metro/Styles/Controls.RadioButton.xaml @@ -7,6 +7,40 @@