Skip to content

Commit

Permalink
perf: Avoid unnecessary ToDisplayString
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Feb 26, 2023
1 parent 772427d commit 9d8abb9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5318,11 +5318,11 @@ private string BuildFontWeight(string memberValue)

if (fontWeights.GetProperties().Any(p => p.Name.Equals(memberValue, StringComparison.OrdinalIgnoreCase)))
{
return $"global::{fontWeights.ToDisplayString()}." + memberValue;
return $"global::{XamlConstants.Types.FontWeights}." + memberValue;
}
else
{
return $"global::{fontWeights.ToDisplayString()}.Normal /* Warning {memberValue} is not supported on this platform */";
return $"global::{XamlConstants.Types.FontWeights}.Normal /* Warning {memberValue} is not supported on this platform */";
}
}

Expand Down

0 comments on commit 9d8abb9

Please sign in to comment.