Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Add Win10 and Fluent TextBox styles #4331

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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