diff --git a/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs b/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs index 6ef7d93ca6..0eb25e7df0 100644 --- a/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs +++ b/src/MahApps.Metro/Controls/Helper/ControlsHelper.cs @@ -221,6 +221,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 9e32884da8..8cf2565c4c 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +