Skip to content

Commit cc16572

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 8f28aba commit cc16572

File tree

4 files changed

+370
-15
lines changed

4 files changed

+370
-15
lines changed

src/MahApps.Metro/Controls/Helper/ControlsHelper.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,43 @@ public static void SetMouseOverBorderBrush(DependencyObject obj, Brush value)
221221
obj.SetValue(MouseOverBorderBrushProperty, value);
222222
}
223223

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

0 commit comments

Comments
 (0)