diff --git a/src/MahApps.Metro/Controls/Helper/GroupBoxHelper.cs b/src/MahApps.Metro/Controls/Helper/GroupBoxHelper.cs deleted file mode 100644 index d2910bbf62..0000000000 --- a/src/MahApps.Metro/Controls/Helper/GroupBoxHelper.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace MahApps.Metro.Controls -{ - using System.ComponentModel; - - public static class GroupBoxHelper - { - public static readonly DependencyProperty HeaderForegroundProperty = - DependencyProperty.RegisterAttached("HeaderForeground", typeof(Brush), typeof(GroupBoxHelper), new UIPropertyMetadata(Brushes.White)); - - [Category(AppName.MahApps)] - [AttachedPropertyBrowsableForType(typeof(GroupBox))] - [AttachedPropertyBrowsableForType(typeof(Expander))] - public static Brush GetHeaderForeground(UIElement element) - { - return (Brush)element.GetValue(HeaderForegroundProperty); - } - - public static void SetHeaderForeground(UIElement element, Brush value) - { - element.SetValue(HeaderForegroundProperty, value); - } - } -} diff --git a/src/MahApps.Metro/Controls/Helper/HeaderedControlHelper.cs b/src/MahApps.Metro/Controls/Helper/HeaderedControlHelper.cs new file mode 100644 index 0000000000..40acdba8cd --- /dev/null +++ b/src/MahApps.Metro/Controls/Helper/HeaderedControlHelper.cs @@ -0,0 +1,44 @@ +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace MahApps.Metro.Controls +{ + using System.ComponentModel; + + public static class HeaderedControlHelper + { + public static readonly DependencyProperty HeaderForegroundProperty = + DependencyProperty.RegisterAttached("HeaderForeground", typeof(Brush), typeof(HeaderedControlHelper), new UIPropertyMetadata(Brushes.White)); + + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(GroupBox))] + [AttachedPropertyBrowsableForType(typeof(Expander))] + public static Brush GetHeaderForeground(UIElement element) + { + return (Brush)element.GetValue(HeaderForegroundProperty); + } + + public static void SetHeaderForeground(UIElement element, Brush value) + { + element.SetValue(HeaderForegroundProperty, value); + } + + + public static readonly DependencyProperty HeaderBackgroundProperty = + DependencyProperty.RegisterAttached("HeaderBackground", typeof(Brush), typeof(HeaderedControlHelper), new UIPropertyMetadata(null)); + + [Category(AppName.MahApps)] + [AttachedPropertyBrowsableForType(typeof(GroupBox))] + [AttachedPropertyBrowsableForType(typeof(Expander))] + public static Brush GetHeaderBackground(UIElement element) + { + return (Brush)element.GetValue(HeaderBackgroundProperty); + } + + public static void SetHeaderBackground(UIElement element, Brush value) + { + element.SetValue(HeaderBackgroundProperty, value); + } + } +} diff --git a/src/MahApps.Metro/Styles/Clean/CleanGroupBox.xaml b/src/MahApps.Metro/Styles/Clean/CleanGroupBox.xaml index e39364d35d..c3cf0d24ef 100644 --- a/src/MahApps.Metro/Styles/Clean/CleanGroupBox.xaml +++ b/src/MahApps.Metro/Styles/Clean/CleanGroupBox.xaml @@ -6,7 +6,8 @@ - + + @@ -16,24 +17,28 @@ - + + + + VerticalAlignment="Stretch" + Background="{TemplateBinding Background}"> @@ -53,8 +58,8 @@ BorderThickness="{TemplateBinding BorderThickness}" Style="{StaticResource InternalBorderStyle}" /> - diff --git a/src/MahApps.Metro/Styles/Controls.Expander.xaml b/src/MahApps.Metro/Styles/Controls.Expander.xaml index 6588ad3196..7b0c8c12ab 100644 --- a/src/MahApps.Metro/Styles/Controls.Expander.xaml +++ b/src/MahApps.Metro/Styles/Controls.Expander.xaml @@ -62,11 +62,11 @@ Stroke="{TemplateBinding Foreground}" StrokeThickness="2" /> - - - -