Skip to content

Commit 1e05b41

Browse files
committed
feat: #3209 #3328 add win10 and fluent TextBox styles
- Add new attached property ControlsHelper.DisabledBorderBrush - Add new TextBox style values - TextControlBorderThemeThickness - TextControlThemePadding - TextControlBorderThemeThicknessFocused - TextControlPlaceholderMargin - Add new Win10 style: MahApps.Styles.TextBox.Win10 - Add new Fluent style: MahApps.Styles.TextBox.Fluent - Add new brushes: - MahApps.Brushes.TextControl.Background - MahApps.Brushes.TextControl.BackgroundPointerOver - MahApps.Brushes.TextControl.BackgroundFocused - MahApps.Brushes.TextControl.BackgroundDisabled - MahApps.Brushes.TextControl.BorderBrush - MahApps.Brushes.TextControl.BorderBrushPointerOver - MahApps.Brushes.TextControl.BorderBrushFocused - MahApps.Brushes.TextControl.BorderBrushDisabled - MahApps.Brushes.TextControl.Foreground - MahApps.Brushes.TextControl.ForegroundPointerOver - MahApps.Brushes.TextControl.ForegroundFocused - MahApps.Brushes.TextControl.ForegroundDisabled - MahApps.Brushes.TextControl.PlaceholderForeground - MahApps.Brushes.TextControl.PlaceholderForegroundPointerOver - MahApps.Brushes.TextControl.PlaceholderForegroundFocused - MahApps.Brushes.TextControl.PlaceholderForegroundDisabled - MahApps.Brushes.TextControl.HeaderForeground - MahApps.Brushes.TextControl.HeaderForegroundDisabled - MahApps.Brushes.TextControl.SelectionHighlightColor - MahApps.Brushes.TextControl.ButtonBackground - MahApps.Brushes.TextControl.ButtonBackgroundPointerOver - MahApps.Brushes.TextControl.ButtonBackgroundPressed - MahApps.Brushes.TextControl.ButtonBorderBrush - MahApps.Brushes.TextControl.ButtonBorderBrushPointerOver - MahApps.Brushes.TextControl.ButtonBorderBrushPressed - MahApps.Brushes.TextControl.ButtonForeground - MahApps.Brushes.TextControl.ButtonForegroundPointerOver - MahApps.Brushes.TextControl.ButtonForegroundPressed BREAKING CHANGE: change background for dark theme Change the dark theme background from #FF252525 to #FF141414.
1 parent 231774e commit 1e05b41

File tree

4 files changed

+370
-15
lines changed

4 files changed

+370
-15
lines changed

Diff for: src/MahApps.Metro/Controls/Helper/ControlsHelper.cs

+37
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,43 @@ public static void SetMouseOverBorderBrush(DependencyObject obj, Brush value)
223223
obj.SetValue(MouseOverBorderBrushProperty, value);
224224
}
225225

226+
public static readonly DependencyProperty DisabledBorderBrushProperty
227+
= DependencyProperty.RegisterAttached(
228+
"DisabledBorderBrush",
229+
typeof(Brush),
230+
typeof(ControlsHelper),
231+
new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits));
232+
233+
/// <summary>
234+
/// Gets the brush used to draw the disabled border brush.
235+
/// </summary>
236+
[Category(AppName.MahApps)]
237+
[AttachedPropertyBrowsableForType(typeof(TextBox))]
238+
[AttachedPropertyBrowsableForType(typeof(CheckBox))]
239+
[AttachedPropertyBrowsableForType(typeof(RadioButton))]
240+
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
241+
[AttachedPropertyBrowsableForType(typeof(ComboBox))]
242+
[AttachedPropertyBrowsableForType(typeof(Tile))]
243+
public static Brush GetDisabledBorderBrush(DependencyObject obj)
244+
{
245+
return (Brush)obj.GetValue(DisabledBorderBrushProperty);
246+
}
247+
248+
/// <summary>
249+
/// Sets the brush used to draw the disabled border brush.
250+
/// </summary>
251+
[Category(AppName.MahApps)]
252+
[AttachedPropertyBrowsableForType(typeof(TextBox))]
253+
[AttachedPropertyBrowsableForType(typeof(CheckBox))]
254+
[AttachedPropertyBrowsableForType(typeof(RadioButton))]
255+
[AttachedPropertyBrowsableForType(typeof(DatePicker))]
256+
[AttachedPropertyBrowsableForType(typeof(ComboBox))]
257+
[AttachedPropertyBrowsableForType(typeof(Tile))]
258+
public static void SetDisabledBorderBrush(DependencyObject obj, Brush value)
259+
{
260+
obj.SetValue(DisabledBorderBrushProperty, value);
261+
}
262+
226263
/// <summary>
227264
/// DependencyProperty for <see cref="CornerRadius" /> property.
228265
/// </summary>

0 commit comments

Comments
 (0)