dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
615 stars 40 forks source link

Pass theme to the ShowMessageDialogAsync? #99

Closed nodew closed 1 year ago

nodew commented 1 year ago

Currently, to set the theme of ContentDialog, we need to manually set the theme by

var dialog = new ContentDialog() { XamlRoot = Content.XamlRoot };
...
dialog.RequestedTheme = Light/Dark/Default;
...

So, we need an extra overload of the method ShowMessageDialogAsync method, with an optional parameter theme, the default value of which is ElementTheme.Default.