diff --git a/src/Wpf.Ui/Controls/IconElement/FontIcon.cs b/src/Wpf.Ui/Controls/IconElement/FontIcon.cs index 6bc9a6168..e24acdc38 100644 --- a/src/Wpf.Ui/Controls/IconElement/FontIcon.cs +++ b/src/Wpf.Ui/Controls/IconElement/FontIcon.cs @@ -110,22 +110,13 @@ public string Glyph protected TextBlock? TextBlock { get; set; } - protected override UIElement InitializeChildren() + public FontIcon() { - 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)); - } - } + SetCurrentValue(FontSizeProperty, UiApplication.Current.Resources["DefaultIconFontSize"]); + } + protected override UIElement InitializeChildren() + { TextBlock = new TextBlock { Style = null,