Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

designer issue #4490

Open
TheCamel opened this issue May 24, 2024 · 5 comments
Open

designer issue #4490

TheCamel opened this issue May 24, 2024 · 5 comments
Labels

Comments

@TheCamel
Copy link

TheCamel commented May 24, 2024

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 :-(

<mah:HamburgerMenu x:Name="HamburgerMenuControl"
				   DisplayMode="CompactOverlay"
				   HamburgerWidth="48"
				   CanResizeOpenPane="False"
				   ItemTemplate="{StaticResource HamburgerMenuItem}"
				   OptionsItemTemplate="{StaticResource HamburgerOptionsMenuItem}"
				   **ItemInvoked="HamburgerMenuControl_ItemInvoked"**
				   SelectedIndex="0"
				   IsPaneOpen="False"
				   OptionsItemClick="HamburgerMenuControl_OptionsItemClick">

Environment

MahApps.Metro version: alpha 0492
Target Framework: .Net Core 8

   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at MahApps.Metro.Controls.HamburgerMenu.RaiseItemEvents(Object selectedItem) in C:\projects\mahapps-metro\src\MahApps.Metro\Controls\HamburgerMenu\HamburgerMenu.Events.cs:line 139
   at MahApps.Metro.Controls.HamburgerMenu.HamburgerMenu_Loaded(Object sender, RoutedEventArgs e) in C:\projects\mahapps-metro\src\MahApps.Metro\Controls\HamburgerMenu\HamburgerMenu.cs:line 91
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@TheCamel TheCamel added the Bug label May 24, 2024
@timunie
Copy link
Collaborator

timunie commented May 27, 2024

please attach a minimal sample. Also the StackTrace seems to be incomplete, please post the entire error message printed.

@TheCamel
Copy link
Author

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

@punker76
Copy link
Member

@TheCamel Which version of VS do you use?

@TheCamel
Copy link
Author

@punker76
Microsoft Visual Studio Professional 2022 (64 bits) - Current
Version 17.9.6

@TheCamel
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants