Skip to content

Commit

Permalink
Merge pull request #3246 from MahApps/develop
Browse files Browse the repository at this point in the history
Merging changes for v1.6.3
  • Loading branch information
punker76 authored May 11, 2018
2 parents 17c935c + 4f00119 commit 8943feb
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 72 deletions.
88 changes: 84 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
</a>
</div>

<h2>Want to say thanks?</h2>

This framework is free and can be used for free, open source and commercial applications. It's tested and contributed by many people... So mainly hit the :star: button, that's all... thx :squirrel: (:dollar:, :euro:, :beer: or some other gifts are also being accepted...).

<h2>Let's get started</h2>

- [Documentation](https://github.com/MahApps/MahApps.Metro/wiki/Documentation)
Expand Down Expand Up @@ -90,6 +86,90 @@ We use these awesome tools to build and develop MahApps.Metro.
</a>
</div>

<h2>Sponsorship</h2>

This framework is free and can be used for free, open source and commercial applications. It's tested and contributed by many people... So mainly hit the :star: button... thx :squirrel: (:dollar:, :euro:, :beer: or some other gifts are also being accepted :-D ).

The core team members, MahApps.Metro contributors and contributors in the ecosystem do this open source work in their free time. If you use MahApps.Metro a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity/usabilty too.

This is how we use the donations:

* Allow the core team to work on MahApps.Metro
* Thank contributors if they invested a large amount of time in contributing
* Support projects in the ecosystem that are of great value for users
* Infrastructure cost
* Fees for money handling

<h2>Backers</h2>

[Become a backer](https://opencollective.com/mahappsmetro#backer) and get your image on our README on Github with a link to your site.

<a href="https://opencollective.com/mahappsmetro/backer/0/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/1/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/2/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/3/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/4/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/5/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/6/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/7/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/8/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/9/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/10/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/11/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/12/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/13/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/14/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/15/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/16/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/17/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/18/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/19/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/20/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/21/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/22/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/23/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/24/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/25/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/26/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/27/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/28/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/backer/29/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/backer/29/avatar.svg"></a>

<h2>Sponsors</h2>

[Become a sponsor](https://opencollective.com/mahappsmetro#sponsor) and get your logo on our README on Github with a link to your site.

<a href="https://opencollective.com/mahappsmetro/sponsor/0/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/1/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/2/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/3/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/4/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/5/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/6/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/7/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/8/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/9/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/10/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/11/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/12/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/13/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/14/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/15/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/16/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/17/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/18/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/19/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/20/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/21/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/22/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/23/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/24/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/25/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/26/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/27/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/28/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/mahappsmetro/sponsor/29/website" target="_blank"><img src="https://opencollective.com/mahappsmetro/sponsor/29/avatar.svg"></a>

<h2>Screenshots</h2>

<div align="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
<Window.Resources>
<ResourceDictionary>

<x:Array x:Key="WindowCommandsOverlayBehaviorArray" Type="Controls:WindowCommandsOverlayBehavior">
<Controls:WindowCommandsOverlayBehavior>Always</Controls:WindowCommandsOverlayBehavior>
<Controls:WindowCommandsOverlayBehavior>Flyouts</Controls:WindowCommandsOverlayBehavior>
<Controls:WindowCommandsOverlayBehavior>HiddenTitleBar</Controls:WindowCommandsOverlayBehavior>
<Controls:WindowCommandsOverlayBehavior>Never</Controls:WindowCommandsOverlayBehavior>
</x:Array>
<ObjectDataProvider x:Key="WindowCommandsOverlayBehaviorValues"
MethodName="GetValues"
ObjectType="{x:Type Controls:WindowCommandsOverlayBehavior}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="Controls:WindowCommandsOverlayBehavior" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>

</ResourceDictionary>
</Window.Resources>
Expand Down Expand Up @@ -445,7 +446,7 @@
Width="100"
Margin="2"
VerticalAlignment="Center"
ItemsSource="{StaticResource WindowCommandsOverlayBehaviorArray}"
ItemsSource="{Binding Source={StaticResource WindowCommandsOverlayBehaviorValues}}"
SelectedValue="{Binding ElementName=flyoutsDemo, Path=LeftWindowCommandsOverlayBehavior}" />
</Grid>

Expand All @@ -462,7 +463,7 @@
Width="100"
Margin="2"
VerticalAlignment="Center"
ItemsSource="{StaticResource WindowCommandsOverlayBehaviorArray}"
ItemsSource="{Binding Source={StaticResource WindowCommandsOverlayBehaviorValues}}"
SelectedValue="{Binding ElementName=flyoutsDemo, Path=RightWindowCommandsOverlayBehavior}" />
</Grid>

Expand All @@ -479,7 +480,7 @@
Width="100"
Margin="2"
VerticalAlignment="Center"
ItemsSource="{StaticResource WindowCommandsOverlayBehaviorArray}"
ItemsSource="{Binding Source={StaticResource WindowCommandsOverlayBehaviorValues}}"
SelectedValue="{Binding ElementName=flyoutsDemo, Path=WindowButtonCommandsOverlayBehavior}" />
</Grid>

Expand All @@ -496,10 +497,12 @@
Width="100"
Margin="2"
VerticalAlignment="Center"
ItemsSource="{StaticResource WindowCommandsOverlayBehaviorArray}"
ItemsSource="{Binding Source={StaticResource WindowCommandsOverlayBehaviorValues}}"
SelectedValue="{Binding ElementName=flyoutsDemo, Path=IconOverlayBehavior}" />
</Grid>

<CheckBox Content="ShowTitleBar" IsChecked="{Binding ElementName=flyoutsDemo, Path=ShowTitleBar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

<Button Margin="2 10 2 2"
Click="ShowLeft"
Content="Show Left" />
Expand Down
20 changes: 10 additions & 10 deletions src/MahApps.Metro/Controls/MetroWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ public class MetroWindow : Window
public static readonly DependencyProperty RightWindowCommandsProperty = DependencyProperty.Register("RightWindowCommands", typeof(WindowCommands), typeof(MetroWindow), new PropertyMetadata(null, UpdateLogicalChilds));
public static readonly DependencyProperty WindowButtonCommandsProperty = DependencyProperty.Register("WindowButtonCommands", typeof(WindowButtonCommands), typeof(MetroWindow), new PropertyMetadata(null, UpdateLogicalChilds));

public static readonly DependencyProperty LeftWindowCommandsOverlayBehaviorProperty = DependencyProperty.Register("LeftWindowCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Flyouts));
public static readonly DependencyProperty RightWindowCommandsOverlayBehaviorProperty = DependencyProperty.Register("RightWindowCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Flyouts));
public static readonly DependencyProperty WindowButtonCommandsOverlayBehaviorProperty = DependencyProperty.Register("WindowButtonCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Always));
public static readonly DependencyProperty IconOverlayBehaviorProperty = DependencyProperty.Register("IconOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Never));
public static readonly DependencyProperty LeftWindowCommandsOverlayBehaviorProperty = DependencyProperty.Register("LeftWindowCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Flyouts, OnShowTitleBarPropertyChangedCallback));
public static readonly DependencyProperty RightWindowCommandsOverlayBehaviorProperty = DependencyProperty.Register("RightWindowCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Flyouts, OnShowTitleBarPropertyChangedCallback));
public static readonly DependencyProperty WindowButtonCommandsOverlayBehaviorProperty = DependencyProperty.Register("WindowButtonCommandsOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Always, OnShowTitleBarPropertyChangedCallback));
public static readonly DependencyProperty IconOverlayBehaviorProperty = DependencyProperty.Register("IconOverlayBehavior", typeof(WindowCommandsOverlayBehavior), typeof(MetroWindow), new PropertyMetadata(WindowCommandsOverlayBehavior.Never, OnShowTitleBarPropertyChangedCallback));

[Obsolete(@"This property will be deleted in the next release. You should use LightMinButtonStyle or DarkMinButtonStyle in WindowButtonCommands to override the style.")]
public static readonly DependencyProperty WindowMinButtonStyleProperty = DependencyProperty.Register("WindowMinButtonStyle", typeof(Style), typeof(MetroWindow), new PropertyMetadata(null, OnWindowButtonStyleChanged));
Expand Down Expand Up @@ -621,14 +621,14 @@ private void SetVisibiltyForAllTitleElements()
this.titleBar?.SetCurrentValue(VisibilityProperty, newVisibility);
this.titleBarBackground?.SetCurrentValue(VisibilityProperty, newVisibility);

newVisibility = this.LeftWindowCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) && !this.UseNoneWindowStyle ? Visibility.Visible : newVisibility;
this.LeftWindowCommandsPresenter?.SetCurrentValue(VisibilityProperty, newVisibility);
var leftWindowCommandsVisibility = this.LeftWindowCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) && !this.UseNoneWindowStyle ? Visibility.Visible : newVisibility;
this.LeftWindowCommandsPresenter?.SetCurrentValue(VisibilityProperty, leftWindowCommandsVisibility);

newVisibility = this.RightWindowCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) && !this.UseNoneWindowStyle ? Visibility.Visible : newVisibility;
this.RightWindowCommandsPresenter?.SetCurrentValue(VisibilityProperty, newVisibility);
var rightWindowCommandsVisibility = this.RightWindowCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) && !this.UseNoneWindowStyle ? Visibility.Visible : newVisibility;
this.RightWindowCommandsPresenter?.SetCurrentValue(VisibilityProperty, rightWindowCommandsVisibility);

newVisibility = this.WindowButtonCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) ? Visibility.Visible : newVisibility;
this.WindowButtonCommandsPresenter?.SetCurrentValue(VisibilityProperty, newVisibility);
var windowButtonCommandsVisibility = this.WindowButtonCommandsOverlayBehavior.HasFlag(WindowCommandsOverlayBehavior.HiddenTitleBar) ? Visibility.Visible : newVisibility;
this.WindowButtonCommandsPresenter?.SetCurrentValue(VisibilityProperty, windowButtonCommandsVisibility);

this.SetWindowEvents();
}
Expand Down
Loading

0 comments on commit 8943feb

Please sign in to comment.