Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/MahApps.Metro/Controls/Helper/ControlsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

/// <summary>
/// Gets the brush used to draw the disabled border brush.
/// </summary>
[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);
}

/// <summary>
/// Sets the brush used to draw the disabled border brush.
/// </summary>
[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);
}

/// <summary>
/// DependencyProperty for <see cref="CornerRadius" /> property.
/// </summary>
Expand Down
Loading
Loading