Window.Current
is null
in Custom Protocol Activation OnLaunch()
#9000
Unanswered
BertrandDeSaintBezier
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Per the document, Window.Current should not be used in WinUI 3. It will always be null. WinUI 3 support multiple root windows anyway. One way to figure out your Root Window is to keep a list of all your active windows. And loop through them and see if your element's XamlRoot == window.Content.XamlRoot |
Beta Was this translation helpful? Give feedback.
1 reply
-
@BertrandDeSaintBezier
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Duplicate of issue in the Uno Platform repo : unoplatform/uno#14005 (comment)
Essentially, I noticed that some things have changed in the
OnLaunch()
. It appears that Window.Current is always set tonull
when launched using custom protocol activation.Is this normal ?
Beta Was this translation helpful? Give feedback.
All reactions