-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
@@ -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)); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 | ||
{ |
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
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.
@MeikTranel your #Hacktoberfest changes have been merged, thanks for your contribution 👍 |
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:

Using override 30pt:

Closed Issues
Closes #3618