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

HamburgerMenuApp.V4 view from MenuItem will be constructed twice #16

Open
ali50m opened this issue Aug 4, 2021 · 1 comment
Open

HamburgerMenuApp.V4 view from MenuItem will be constructed twice #16

ali50m opened this issue Aug 4, 2021 · 1 comment

Comments

@ali50m
Copy link

ali50m commented Aug 4, 2021

After adding the following code to HomeView.Xaml.cs in HamburgerMenuApp.Core and make HamburgerMenuApp.V4 output debug message to console, then I found the "HomeView ctor..." message will pop up twice even I just click the Home menuItem once.
I can`t see this issue in other V1~V3 samples, seems like the menuItem views is singleton in these projects.

=================================================

public HomeView()
{
InitializeComponent();
Console.WriteLine($@"{GetType().Name} ctor...");
}

~HomeView() => Console.WriteLine($@"{GetType().Name} dtor...");

@ali50m
Copy link
Author

ali50m commented Aug 4, 2021

screen-cap

I attached the screen capture here.. as you may see, I clicked the Home menu Item 4 times , but "HomeView ctor..." was printed 6 times. Since it`s not a 100% happened, so I clicked several times for better demonstrating this issue.

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

No branches or pull requests

1 participant