-
Notifications
You must be signed in to change notification settings - Fork 710
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
ContentDialog doesn't use WinUI Styling in runtime but does in the designer #3486
Comments
Wasn't this a glitch that the Shell team needed to fix? I remember seeing something like this before? |
@WashingtonARamos are you seeing this issue with latest pre-release bits ? |
No, this is the |
Yes. That was the request. Thanks |
@ranjeshj updating Microsoft.UI.XAML to version |
I've come around this problem again in another project and instead of settings manually button styles to // Rounded style
var warn = new ContentDialog()
{
Title = "Warning",
Content = "My message",
PrimaryButtonText = "OK",
};
await warn.ShowAsync(); But if I create a class that extends // Square style
var warn = new MyWarningDialogThatExtendsContentDialog();
await warn.ShowAsync(); TL;DR: |
ContentDialog, if I recall correctly, is handled by the Shell team and not WinUI. |
Could you clarify for me, please? Did I post this in the wrong place? There are so many UI-things right now related to Microsoft (MAUI, WinUI, ProjectReunion, "Shell team"?) that I genuinely don't know. |
I forgot I actually replied to this issue before. |
From my understanding #1405 fixes the style to be applied not having rounded corners, while my problem is the style not being applied at all, forcing me to manually set it to |
Does the team have any plan to fix this ? |
This problem is still there in latest WinUI 2.8.1 this.Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style; I think extending |
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. |
Describe the bug
When designing a ContentDialog it shows rounded corners but in runtime it shows square corners. Some child controls receive rounded corners but others remain with square corners.
Steps to reproduce the bug
Have Microsoft.UI.XAML v2.4.3 installed, create a new ContentDialog and show in application.
Expected behavior
ContentDialog and child controls receive WinUI styling, specially rounded corners.
Screenshots





Designer shows rounded corners for ContentDialog and it's child controls (A PasswordBox and a Button)
In runtime only the PasswordBox receives rounded corners, both ContentDialog and Button remain with square corners
For some reason settings the PrimaryButton's style to AccentButtonStyle gives it rounded corners:
And the same thing happens if I manually set SecondaryButton's style to DefaultButtonStyle: it receives rounded corners:
The issue can also be observed in the "XAML Controls Gallery" app, where the ContentDialog and some buttons (with exception of the one that receives AccentButtonStyle as style) have square corners:
Version Info
v2.4.3
NuGet package version:
Additional context
None.
The text was updated successfully, but these errors were encountered: