Skip to content
Merged
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
4 changes: 4 additions & 0 deletions MahApps.Metro/MahApps.Metro.NET45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Styles\Clean\CleanStatusBar.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Styles\Clean\CleanWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
4 changes: 4 additions & 0 deletions MahApps.Metro/MahApps.Metro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Clean\CleanStatusBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Clean\CleanWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
2 changes: 2 additions & 0 deletions MahApps.Metro/Styles/Clean/Clean.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Clean/CleanWindow.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Clean/CleanWindowButtonCommands.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Clean/CleanWindowCommands.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Clean/CleanStatusBar.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource CleanGroupBoxStyleKey}" />
<Style TargetType="{x:Type Controls:MetroWindow}" BasedOn="{StaticResource CleanWindowStyleKey}" />
<Style TargetType="{x:Type Controls:WindowButtonCommands}" BasedOn="{StaticResource CleanWindowButtonCommandsStyleKey}" />
<Style TargetType="{x:Type Controls:WindowCommands}" BasedOn="{StaticResource CleanWindowCommandsStyleKey}" />
<Style TargetType="{x:Type StatusBar}" BasedOn="{StaticResource CleanMetroStatusBarKey}" />

</ResourceDictionary>
22 changes: 22 additions & 0 deletions MahApps.Metro/Styles/Clean/CleanStatusBar.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.StatusBar.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="CleanMetroStatusBarKey"
BasedOn="{StaticResource MetroStatusBar}"
TargetType="{x:Type StatusBar}">
<Setter Property="Foreground"
Value="{DynamicResource BlackBrush}" />
</Style>

<Style x:Key="CleanMetroStatusBarSeparator"
BasedOn="{StaticResource MetroStatusBarSeparator}"
TargetType="{x:Type Separator}">
<Setter Property="Background"
Value="{DynamicResource BlackBrush}" />
</Style>

</ResourceDictionary>
10 changes: 8 additions & 2 deletions MahApps.Metro/Styles/Controls.StatusBar.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls">

<Style x:Key="MetroStatusBarItem"
TargetType="{x:Type StatusBarItem}">
Expand Down Expand Up @@ -58,7 +59,7 @@
<Style x:Key="MetroStatusBar"
TargetType="{x:Type StatusBar}">
<Setter Property="Background"
Value="{DynamicResource AccentColorBrush}" />
Value="{Binding Path=WindowTitleBrush, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}}" />
<Setter Property="Foreground"
Value="{DynamicResource IdealForegroundColorBrush}" />
<Setter Property="FontFamily"
Expand Down Expand Up @@ -87,6 +88,11 @@
Property="BorderBrush"
Value="{DynamicResource GrayBrush9}" />
</Trigger>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=IsActive}"
Value="False">
<Setter Property="Background"
Value="{Binding Path=NonActiveWindowTitleBrush, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}}" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/1.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ This is a bug fix and feature release of MahApps.Metro v1.2.0.
+ Mark ButtonHelper `PreserveTextCase` attached property as obsolete
+ Use `ContentCharacterCasing` for `MetroDataGridColumnHeader` and `MetroGridViewColumnHeader` too
- Dynamic theme for window commands #2152 (@crumbl3d)
- `StatusBar`'s background color now matches the title bar #2173 #2174 (@thoemmi)

# Bugfixes

Expand Down
7 changes: 7 additions & 0 deletions samples/MetroDemo/ExampleWindows/CleanWindowDemo.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Grid Grid.Row="0">
Expand Down Expand Up @@ -157,6 +158,12 @@
</StackPanel>
</GroupBox>
</Grid>

<StatusBar Grid.Row="2">
<StatusBarItem>MahApps.Metro Clean Window</StatusBarItem>
<Separator Style="{StaticResource CleanMetroStatusBarSeparator}" />
<StatusBarItem>Some stuff</StatusBarItem>
</StatusBar>
</Grid>

</Controls:MetroWindow>