Visual Studio ContentDialog template creates dialog with old uwp styles (non WinUI 2.6)
See original GitHub issueDescribe the bug If you create custom ContentDialog with VS template then you can see old UWP styles instead of new WinUI 2.6 styles.
Steps to reproduce the bug
- Open Project
- Create ContentDialog with VS template in separated file
- Call ShowAsync:
new SomeContentDialogClass().ShowAsync();
- See old ContentDialog styles.
Expected behavior ContentDialog must show new WinUI 2.6 styles
Screenshots
Custom ContentDialog
ContentDialog created with this code:
new ContentDialog().ShowAsync();
Version Info WinUI 2.6
NuGet package version: [Microsoft.UI.Xaml 2.6.0]
Windows app type:
UWP | Win32 |
---|---|
Yes |
Windows 10 version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
October 2020 Update (19042) | Yes |
May 2020 Update (19041) | |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
ContentDialog Class (Windows.UI.Xaml.Controls)
Represents a dialog box that can be customized to contain checkboxes, hyperlinks, buttons and any other XAML content.
Read more >ContentDialog won't use any default style in UWP #5119
Open XAML Controls Gallery. Search for ContentDialog and click on Show dialog . Notice the dialog using UWP style rather than WinUI style....
Read more >win universal app - customizing ContentDialog in UWP
You can create a custom Style for the ContentDialog , the default template is here: ...
Read more >Showing a Dialog in Uno Platform and WinUI - YouTube
In this short video we will show a dialog prompt in Uno Platform / WinUI with C# and .NET. If you have suggestions...
Read more >uwp dialog size - Developer Community
Hi , i use a custom content dialog very simple in uwp and since i try to put a bit of margin it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @StephenLPeters ,
More context: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.contentdialog?view=winrt-20348#derived-controls-with-winui-styles
VisualStudio templates for create ContentDialog, creates a derived control without WinUI styles
Yesterday I had to add this to all of my dialogs that were created with VS templates
Regards
Sure, @anawishnoff FYI