更新整理
This commit is contained in:
@@ -66,7 +66,7 @@ public class FontIcon : IconElement
|
||||
private static void OnFontFamilyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var self = (FontIcon)d;
|
||||
if(self.TextBlock is null)
|
||||
if (self.TextBlock is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class FontIcon : IconElement
|
||||
private static void OnFontSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var self = (FontIcon)d;
|
||||
if(self.TextBlock is null)
|
||||
if (self.TextBlock is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class FontIcon : IconElement
|
||||
private static void OnFontStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var self = (FontIcon)d;
|
||||
if(self.TextBlock is null)
|
||||
if (self.TextBlock is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class FontIcon : IconElement
|
||||
private static void OnFontWeightChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var self = (FontIcon)d;
|
||||
if(self.TextBlock is null)
|
||||
if (self.TextBlock is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class FontIcon : IconElement
|
||||
private static void OnGlyphChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var self = (FontIcon)d;
|
||||
if(self.TextBlock is null)
|
||||
if (self.TextBlock is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -120,12 +120,12 @@ public class FontIcon : IconElement
|
||||
|
||||
protected override UIElement InitializeChildren()
|
||||
{
|
||||
if(FontSize.Equals(SystemFonts.MessageFontSize))
|
||||
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)
|
||||
if (VisualParent is not null && TextElement.GetFontSize(VisualParent) != SystemFonts.MessageFontSize)
|
||||
{
|
||||
SetCurrentValue(FontSizeProperty, TextElement.GetFontSize(VisualParent));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user