window.current.content在winui3中变得无效

发布于 2025-02-02 02:31:27 字数 88 浏览 3 评论 0 原文

window.current.content在winui3中变得无效 获取异常对象参考未设置为实例 我正在实施iShitestvisissible 有什么建议吗?

Window.Current.Content is getting null in winui3
Gettting exception object reference not set to an instance
I am implementing Ishitestvisible
Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉睡月亮 2025-02-09 02:31:27

根据 window.current 文档:

对于UWP应用程序,获取当前线程的窗口。 桌面应用程序始终返回null

As per the Window.Current documentation:

For UWP apps, gets the window of the current thread. Desktop apps always return null.

https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.window.current

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文