Closed timunie closed 5 years ago
I made a workaround until this issue is closed. You have to copy the following code into into your Resources
Section (e.g. in App.xaml
if the workaround should be Application wide applied)
<!-- /!\ THIS SECTION IS A WORKAROUND FOR THE RENAMED RESOURCES IN MAHAPPS.METRO V2.0.0.ALPHA (ISSUE #92) /!\ -->
<!-- For more details see: https://github.com/punker76/MahApps.Metro.SimpleChildWindow/issues/92 -->
<!-- You can savely remove this section after issue #92 is fixed -->
<SolidColorBrush x:Key="BlackBrush" Color="{DynamicResource MahApps.Colors.Black}" />
<SolidColorBrush x:Key="WhiteBrush" Color="{DynamicResource MahApps.Colors.White}" />
<SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource MahApps.Colors.Accent}" />
<SolidColorBrush x:Key="AccentBaseColorBrush" Color="{DynamicResource MahApps.Colors.AccentBase}" />
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource MahApps.Colors.IdealForeground}" />
<SolidColorBrush x:Key="GrayBrush3" Color="{DynamicResource MahApps.Colors.Gray3}" />
<SolidColorBrush x:Key="WindowTitleColorBrush" Color="{DynamicResource MahApps.Colors.Accent}" />
<SolidColorBrush x:Key="NonActiveWindowTitleColorBrush" Color="#808080" />
<SolidColorBrush x:Key="NonActiveBorderColorBrush" Color="#808080" />
<DynamicResource x:Key="BlackColor" ResourceKey="MahApps.Colors.Black" />
<Style x:Key="LightMetroWindowButtonStyle" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.MetroWindow.Light}" />
<Style TargetType="{x:Type SimpleChildWindow:ChildWindow}">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.White}" />
<Setter Property="CloseButtonStyle" Value="{DynamicResource MahApps.Styles.Button.MetroWindow.Light}" />
<Setter Property="NonActiveBorderBrush" Value="{DynamicResource MahApps.Brushes.Border.NonActive}" />
<Setter Property="NonActiveGlowBrush" Value="{DynamicResource MahApps.Brushes.Border.NonActive}" />
<Setter Property="OverlayBrush" Value="{DynamicResource MahApps.Brushes.Gray3}" />
<Setter Property="TitleBarBackground" Value="{DynamicResource MahApps.Brushes.WindowTitle}" />
<Setter Property="TitleBarNonActiveBackground" Value="{DynamicResource MahApps.Brushes.WindowTitle.NonActive}" />
<Setter Property="TitleFontFamily" Value="{DynamicResource MahApps.Fonts.Header}" />
<Setter Property="TitleFontSize" Value="{DynamicResource MahApps.Sizes.Font.WindowTitle}" />
<Setter Property="TitleForeground" Value="{DynamicResource MahApps.Brushes.IdealForeground}" />
</Style>
<!-- /!\ E N D S E C T I O N T O R E M O V E /!\ -->
This workaround should also work for Issue #94 //cc @Symbai
Without the woraround
With the workaround
Happy coding Tim
We should update the Styles resources here also.
for example
AccentColorBrush --> MahApps.Brushes.Accent
Happy coding Tim