Skip to content

Commit

Permalink
Merge pull request #3148 from MahApps/feature/HamburgerMenu_OnLoaded_…
Browse files Browse the repository at this point in the history
…Content_Fix

Fix loaded content at HamburgerMenu
  • Loading branch information
punker76 authored Jan 14, 2018
2 parents a6d9853 + 206fe13 commit 59d45bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public override void OnApplyTemplate()

private void HamburgerMenu_Loaded(object sender, RoutedEventArgs e)
{
if (GetValue(ContentProperty) != null)
{
return;
}

var selectedItem = _buttonsListView?.SelectedItem ?? _optionsListView?.SelectedItem;
if (selectedItem != null)
{
Expand Down
1 change: 1 addition & 0 deletions src/MahApps.Metro/MahApps.Metro/Styles/Controls.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<!-- Theme styles with keys -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/WindowButtonCommands.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/Dialogs/BaseMetroDialog.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/HamburgerMenu.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="FloatingMessageContainerStyle" TargetType="{x:Type ContentControl}">
Expand Down

0 comments on commit 59d45bf

Please sign in to comment.