diff --git a/src/Wpf.Ui/Controls/IconElement/FontIcon.cs b/src/Wpf.Ui/Controls/IconElement/FontIcon.cs index 34678aafa..d71fddd43 100644 --- a/src/Wpf.Ui/Controls/IconElement/FontIcon.cs +++ b/src/Wpf.Ui/Controls/IconElement/FontIcon.cs @@ -112,14 +112,15 @@ public string Glyph protected override UIElement InitializeChildren() { - if (VisualParent is not null) - { - SetCurrentValue(FontSizeProperty, TextElement.GetFontSize(VisualParent)); - } - if (FontSize.Equals(SystemFonts.MessageFontSize)) { SetResourceReference(FontSizeProperty, "DefaultIconFontSize"); + + // If the FontSize is the default, set it to the parent's FontSize. + if (VisualParent is not null && TextElement.GetFontSize(VisualParent) != SystemFonts.MessageFontSize) + { + SetCurrentValue(FontSizeProperty, TextElement.GetFontSize(VisualParent)); + } } TextBlock = new TextBlock