question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I set the default MetroDialogSettings.ColorScheme to all dialog ?

See original GitHub issue

I want to set a default value to MetroDialogSettings.ColorScheme = MetroDialogColorScheme.Accented.

So I don’t have to add a new MetroDialogSettings { ColorScheme = MetroDialogColorScheme.Accented } every call for DialogCoordinator.ShowMessageAsync.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
punker76commented, May 13, 2019

@GreatFireWall You can override the default dialog settings at the MetroWindow:

<Controls:MetroWindow ...>

    <Controls:MetroWindow.MetroDialogOptions>
        <Dialog:MetroDialogSettings ColorScheme="Accented" />
    </Controls:MetroWindow.MetroDialogOptions>

</Controls:MetroWindow>
0reactions
timuniecommented, May 14, 2019

@GreatFireWall Sorry, but I cannot share my application with you.

The Helper class is just a file that is public for the whole project. If i need to show a dialog i call it like this, e.g. from the code behind:

var result = await this.ShowMessageAsync(
                             "Title", 
                             "Message",
                             MessageDialogStyle.AffirmativeAndNegative, 
                             MetroDialogHelper.YesNoStyle); // This line does the trick

Best regards and happy coding 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

API - MetroDialogSettings.ColorScheme Property
Gets or sets whether the metro dialog should use the default black/white appearance (theme) or try to use the current accent. Namespace: MahApps.Metro....
Read more >
How to change MahApps.Metro dialog style? - wpf
I want different styles for some dialogues. How can I change the style of a single dialog? I tried to do it with...
Read more >
PowerShell and WPF: Customize MahApps Dialog
By default MahApps Dialogs are displayed with default text like OK ... You can change the dialog theme using the ColorScheme property that ......
Read more >
FormDesigner/MahApps.Metro.xml 4.8.2
Controls.Dialogs.MetroDialogSettings.ColorScheme"> <summary> Gets or sets whether the metro dialog should use the default black/white appearance (theme) or ...
Read more >
C# (CSharp) DialogCoordinator Examples
C# (CSharp) DialogCoordinator - 41 examples found. ... Affirmative, new MetroDialogSettings() { AffirmativeButtonText = "OK", ColorScheme ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found