Kinnara / ModernWpf

Modern styles and controls for your WPF applications
MIT License
4.51k stars 450 forks source link

NavigationView becomes deadlocked #319

Open alexx-grand opened 3 years ago

alexx-grand commented 3 years ago

Hi there,

I've faced with a problem when NavigationView becomes deadlocked.

How to reproduce:

  1. Set PaneHeader
  2. Count of NavigationViewItem has to overflow available space/width for the pane content
  3. Set PaneFooter

Demo https://1drv.ms/u/s!Am9Q7tHidF2hkk5fAAJqfeZkTyzR?e=7Qmtb9

alexx-grand commented 3 years ago

111 seems like this my case.

alexx-grand commented 3 years ago
    public class NavigationView : ModernWpf.Controls.NavigationView
    {
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (GetTemplateChild("TopNavMenuItemsHost") is ItemsRepeater topNavMenuItemsHost)
            {
                // temporary fix
                topNavMenuItemsHost.Width = 768;
            }
        }
    }

I've figured out a workaround