You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WinUI3迁移UWP FirstRunDialog Service时遇XamlRoot参数错误的解决咨询

WinUI3迁移UWP FirstRunDialog Service时遇XamlRoot参数错误的解决咨询

我最近碰到个WinUI3迁移相关的问题,想请教下大家:我用WinUI3做了主项目,还有一个用UWP Template Studio创建的项目,现在想把UWP项目里的FirstRunDialog Service迁移到WinUI3项目中,结果运行时触发了这个错误:

System.ArgumentException: 'The parameter is incorrect.
This element does not have a XamlRoot. Either set the XamlRoot property or add the element to a tree.'

我自己试着用App.MainWindow.Content.XamlRoot来设置XamlRoot属性,这个Content对应的是ShellPage,但问题好像还是没搞定...

备注:内容来源于stack exchange,提问作者bondarukid

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 16:38:13