diff --git a/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs b/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs index 40b87aa38..82a4e1a5c 100644 --- a/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs +++ b/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs @@ -223,6 +223,43 @@ public static void SetMouseOverBorderBrush(DependencyObject obj, Brush value) obj.SetValue(MouseOverBorderBrushProperty, value); } + public static readonly DependencyProperty DisabledBorderBrushProperty + = DependencyProperty.RegisterAttached( + "DisabledBorderBrush", + typeof(Brush), + typeof(ControlsHelper), + new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits)); + + /// + /// Gets the brush used to draw the disabled border brush. + /// + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(TextBox))] + [AttachedPropertyBrowsableForType(typeof(CheckBox))] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + [AttachedPropertyBrowsableForType(typeof(DatePicker))] + [AttachedPropertyBrowsableForType(typeof(ComboBox))] + [AttachedPropertyBrowsableForType(typeof(Tile))] + public static Brush GetDisabledBorderBrush(DependencyObject obj) + { + return (Brush)obj.GetValue(DisabledBorderBrushProperty); + } + + /// + /// Sets the brush used to draw the disabled border brush. + /// + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(TextBox))] + [AttachedPropertyBrowsableForType(typeof(CheckBox))] + [AttachedPropertyBrowsableForType(typeof(RadioButton))] + [AttachedPropertyBrowsableForType(typeof(DatePicker))] + [AttachedPropertyBrowsableForType(typeof(ComboBox))] + [AttachedPropertyBrowsableForType(typeof(Tile))] + public static void SetDisabledBorderBrush(DependencyObject obj, Brush value) + { + obj.SetValue(DisabledBorderBrushProperty, value); + } + /// /// DependencyProperty for property. /// diff --git a/src/MahApps.Metro/Styles/Controls.TextBox.xaml b/src/MahApps.Metro/Styles/Controls.TextBox.xaml index 9e32884da..8cf2565c4 100644 --- a/src/MahApps.Metro/Styles/Controls.TextBox.xaml +++ b/src/MahApps.Metro/Styles/Controls.TextBox.xaml @@ -1,4 +1,4 @@ - @@ -7,18 +7,23 @@ + 1,1,1,1 + 4,4,4,4 + 1,1,1,1 + 4,0,4,0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +