-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error & crash when showing ContentDialog without XamlRoot #3678
Comments
X-Ref #1679 which discusses other |
I believe you're forgetting to set the XamlRoot |
Yes, this was the issue. Will update the OP to reflect the need not to crash and provide a more descriptive error message. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
At the very least this needs a more helpful error message. This gives no clue as to the cause and so doesn't help solve the cause of the crash.
|
Let's bump the priority on this issue - it's seriously nuts that developers have to set xamlroot on a dialog. |
Describe the bug
ArgumentException
is thrown when attempting to open aContentDialog
in a WinUI3 Desktop app when theXamlRoot
is not set.X-Ref docs
Steps to reproduce the bug
myButton_Click
inMainPage.xaml.cs
to be:Expected behavior
The dialog will not be be shown because there is no
XamlRoot
but:and/or
Screenshots
Version Info
NuGet package version:
Microsoft.WinUI 3.0.0-preview3.201113.0
Windows app type:
Additional context
This works without issue in a UWP app (WinUI2 and 3)
The text was updated successfully, but these errors were encountered: