Program creates infinite new instances of NavView

Leo Leinmüller 1 Reputation point
2021-03-21T13:59:43.27+00:00

Hello there,

I am rather new to UWP programming and have an issue with the navigation. I followed the coding example of https://learn.microsoft.com/de-de/windows/uwp/design/controls-and-patterns/navigationview and it does create it all fine - theoretically. Whenever I launch the program, I get this:
79904-image.png
I found the following thread that describes my problem too and suggests an answer.
https://social.msdn.microsoft.com/Forums/en-US/cdc0f2a2-ce7a-4a91-b107-dbf3b63cf426/uwpc-navigationview-code-example-infinite-loop?forum=wpdevelop
When I impement a flag for ifFirst, the loop stops, but the navigation won't change pages anymore. Does anyone know a fix for that?

Universal Windows Platform (UWP)
{count} votes