❔ How to close window in WinUI 3
I have an app that consists of 2 parts. 1st part is Login form, where user needs to enter login and password. If they are correct, it start "Editor" window where user can work.
For now in order to launch second window I use:
The problem is that Login window is still there, and while it is not critical, I still want to close it after Login is done.
First time I tried to add Window.Close() after opening the 2nd window in the .cs file of 1st Window, so
Which resulted
Attempted to read or write protected memory
eror.
I tried to do it in the 2nd Window .cs file like this:
Which resulted the same error
So how can I do this properly?1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.