Open TheCamel opened 1 month ago
please attach a minimal sample. Also the StackTrace seems to be incomplete, please post the entire error message printed.
I can't it's prod application too complex...and the trace is from the designer windows of visual... I will investiguate to see if i can find out more
@TheCamel Which version of VS do you use?
@punker76 Microsoft Visual Studio Professional 2022 (64 bits) - Current Version 17.9.6
I tried to debug visual with another visual, but can't get any "catch". May be I have to include the mahapps project in my solution. I used the trick from here https://docs.devexpress.com/GeneralInformation/403685/support-services/obtain-exception-call-stack#get-exception-call-stack-of-design-time-errors-in-visual-studio
@punker76
I avoid the crash by testing the design property
private void HamburgerMenuControl_ItemInvoked(object sender, HamburgerMenuItemInvokedEventArgs args) { if (args.IsItemOptions || System.ComponentModel.DesignerProperties.GetIsInDesignMode(this) ) { return; }
In fact in handler i have the commented line below at the end that cause the exception in the main window, but not in the user control itself. I will try to write it more secure=> nothing change, same crash Danke. btw i would prefer an update on the other HamburgerMenu issue....tchu$$
private void HamburgerMenuControl_ItemInvoked(object sender, HamburgerMenuItemInvokedEventArgs args)
{
if (args.IsItemOptions)
{
return;
}
HamburgerMenuControl.Content = args.InvokedItem;
// close the menu if a item was selected
if (HamburgerMenuControl.IsPaneOpen)
{
HamburgerMenuControl.IsPaneOpen = false;
}
**//((HomeViewModel)DataContext).CurrentView = (ObservableRecipient)((UserControl)((HamburgerMenuIconItem)args.InvokedItem).Tag).DataContext;**
}
Describe the bug
I have a hamburgerMeun in a user control...designer display well
but this user control is included into a MetroWindow and and it crash the designer like below
even if i remove the handler :-(
Environment
MahApps.Metro version: alpha 0492 Target Framework: .Net Core 8