Window.Current.Content is getting null in winui3 Gettting exception object reference not set to an instance I am implementing Ishitestvisible Any suggestions?
Asked
Active
Viewed 29 times
-1
-
1Does this answer your question? [What is a NullReferenceException, and how do I fix it?](https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Progman May 28 '22 at 08:35
1 Answers
0
As per the Window.Current documentation:
For UWP apps, gets the window of the current thread. Desktop apps always return null.
https://docs.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.window.current
Kevin Gallahan
- 1,515
- 9
- 9