File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
src/Wpf.Ui/Controls/IconElement Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -110,22 +110,13 @@ public string Glyph
110110
111111 protected TextBlock ? TextBlock { get ; set ; }
112112
113- protected override UIElement InitializeChildren ( )
113+ public FontIcon ( )
114114 {
115- if ( FontSize . Equals ( SystemFonts . MessageFontSize ) )
116- {
117- SetResourceReference ( FontSizeProperty , "DefaultIconFontSize" ) ;
118-
119- // If the FontSize is the default, set it to the parent's FontSize.
120- if (
121- VisualParent is not null
122- && TextElement . GetFontSize ( VisualParent ) != SystemFonts . MessageFontSize
123- )
124- {
125- SetCurrentValue ( FontSizeProperty , TextElement . GetFontSize ( VisualParent ) ) ;
126- }
127- }
115+ SetCurrentValue ( FontSizeProperty , UiApplication . Current . Resources [ "DefaultIconFontSize" ] ) ;
116+ }
128117
118+ protected override UIElement InitializeChildren ( )
119+ {
129120 TextBlock = new TextBlock
130121 {
131122 Style = null ,
You can’t perform that action at this time.
0 commit comments