WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
Please check the type of change your PR introduces:
[ ] Update
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
What is the current behavior?
When using a FontIcon, its FontSize will first take the FontSize of its VisualParent if it has one, then be set to DefaultIconFontSize if it's still at the default WPF FontSize.
Both of those actions override whatever FontSize you would set in the FontIcon control itself.
An easy example of this is if I want to have a HyperlinkButton with a custom Icon Font Size:
The VisualParent FontSize override now only happens if the FontIcon was using the default WPF FontSize. (as in, no custom sizes were applied)
Other information
There's arguably still a problem with this fix if you want a FontIcon whose size coincidentally matches SystemFonts.MessageFontSize within say, a HyperLinkButton with a FontSize of 20. But that'd require deeper architectural changes to handle properly...
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
When using a
FontIcon
, itsFontSize
will first take the FontSize of itsVisualParent
if it has one, then be set toDefaultIconFontSize
if it's still at the default WPF FontSize.Both of those actions override whatever FontSize you would set in the FontIcon control itself.
An easy example of this is if I want to have a
HyperlinkButton
with a custom Icon Font Size:Issue Number: N/A
What is the new behavior?
The VisualParent FontSize override now only happens if the FontIcon was using the default WPF FontSize. (as in, no custom sizes were applied)
Other information
There's arguably still a problem with this fix if you want a FontIcon whose size coincidentally matches
SystemFonts.MessageFontSize
within say, a HyperLinkButton with a FontSize of 20. But that'd require deeper architectural changes to handle properly...