Skip to content
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

Add the ability to control button font size in dialogs via MetroDialogSettings #3625

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

MeikTranel
Copy link
Contributor

@MeikTranel MeikTranel commented Oct 3, 2019

Describe the changes you have made to improve this project

Added the DialogButtonFontSize Property to MetroDialogSettings and integrated them in sync with the existing implementations of DialogTitleFontSize and DialogMessageFontSize.

Additional Context
In a second commit (without issue reference) i also added an entry to the demo app sampling the usage of the new property. I didn't know whether this is appreciated or not.

Defaulting to 12pt:
image

Using override 30pt:
aZKhog0rfX

Closed Issues
Closes #3618

@@ -103,12 +103,13 @@ public double DialogMessageFontSize
}

/// <summary>Identifies the <see cref="DialogButtonFontSize"/> dependency property.</summary>
public static readonly DependencyProperty DialogButtonFontSizeProperty = DependencyProperty.Register(nameof(DialogButtonFontSize), typeof(double), typeof(BaseMetroDialog), new PropertyMetadata(12D));
public static readonly DependencyProperty DialogButtonFontSizeProperty = DependencyProperty.Register(nameof(DialogButtonFontSize), typeof(double), typeof(BaseMetroDialog), new PropertyMetadata(SystemFonts.MessageFontSize));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. Didn't know this existed :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP, I copied it from the default of the Button control.


/// <summary>
/// Gets or sets the font size of any dialog buttons.
/// </summary>
public double DialogButtonFontSize {
public double DialogButtonFontSize
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth checking in some editorconfigs and StyleCop configs. This kind of work must be adding up with this much traffic on this repo 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I should add it to the existing editorconfig.

@punker76 punker76 merged commit 94fee34 into MahApps:develop Oct 3, 2019
@punker76
Copy link
Member

punker76 commented Oct 3, 2019

@MeikTranel your #Hacktoberfest changes have been merged, thanks for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add a property to set the font size of dialog buttons
2 participants