Fix intermediate layout and size changes when a sub menu gets filled with data

This commit is contained in:
Peter Kirmeier 2023-08-31 19:23:22 +02:00
parent a7ff101027
commit 4a645290f7

View file

@ -355,8 +355,12 @@ namespace SystemTrayMenu.Business
if (menuData.DirectoryState != MenuDataDirectoryState.Undefined)
{
// Sub Menu (completed)
// There will be some layout, size and position changes.
// Just hide the inner controls for a moment until all changes have been applied.
menu.windowFrame.Visibility = Visibility.Hidden;
menu.AddItemsToMenu(menuData.RowDatas, menuData.DirectoryState);
AdjustMenusSizeAndLocation(menu.Level);
menu.windowFrame.Visibility = Visibility.Visible;
}
else
{