diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs index 568249e7e156..04fbed6ff56a 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs @@ -4623,7 +4623,7 @@ private string BuildFontWeight(string memberValue) { var fontWeights = (INamedTypeSymbol)_metadataHelper.GetTypeByFullName(XamlConstants.Types.FontWeights); - if (fontWeights.GetFields().Any(m => m.Name.Equals(memberValue, StringComparison.OrdinalIgnoreCase))) + if (fontWeights.GetProperties().Any(p => p.Name.Equals(memberValue, StringComparison.OrdinalIgnoreCase))) { return "FontWeights." + memberValue; } @@ -4696,9 +4696,12 @@ private static string AppendFloatSuffix(string memberValue) private string BuildColor(string memberValue) { var colorsSymbol = (INamedTypeSymbol)_metadataHelper.GetTypeByFullName(XamlConstants.Types.Colors); - if (colorsSymbol.FindField(_colorSymbol, memberValue, StringComparison.OrdinalIgnoreCase) is IFieldSymbol field) + + if (colorsSymbol.GetProperties().FirstOrDefault(p => + SymbolEqualityComparer.Default.Equals(p.Type, _colorSymbol) && + p.Name.Equals(memberValue, StringComparison.OrdinalIgnoreCase)) is IPropertySymbol property) { - return $"{GlobalPrefix}{XamlConstants.Types.Colors}.{field.Name}"; + return $"{GlobalPrefix}{XamlConstants.Types.Colors}.{property.Name}"; } else { diff --git a/src/Uno.UI/UI/Xaml/Automation/AutomationProperties.cs b/src/Uno.UI/UI/Xaml/Automation/AutomationProperties.cs index ac64c4b9b6cb..b4da183ce46b 100644 --- a/src/Uno.UI/UI/Xaml/Automation/AutomationProperties.cs +++ b/src/Uno.UI/UI/Xaml/Automation/AutomationProperties.cs @@ -19,7 +19,7 @@ public static string GetName(DependencyObject element) return (string)element.GetValue(NameProperty); } - public static DependencyProperty NameProperty = + public static DependencyProperty NameProperty { get; } = DependencyProperty.RegisterAttached( "Name", typeof(string), diff --git a/src/Uno.UI/UI/Xaml/Controls/ContentPresenter/ContentPresenter.cs b/src/Uno.UI/UI/Xaml/Controls/ContentPresenter/ContentPresenter.cs index e843f23e337b..49015e001b57 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ContentPresenter/ContentPresenter.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ContentPresenter/ContentPresenter.cs @@ -470,7 +470,7 @@ public Thickness Padding set { SetValue(PaddingProperty, value); } } - public static DependencyProperty PaddingProperty = + public static DependencyProperty PaddingProperty { get; } = DependencyProperty.Register( "Padding", typeof(Thickness), @@ -498,7 +498,7 @@ public Thickness BorderThickness set { SetValue(BorderThicknessProperty, value); } } - public static DependencyProperty BorderThicknessProperty = + public static DependencyProperty BorderThicknessProperty { get; } = DependencyProperty.Register( "BorderThickness", typeof(Thickness), @@ -524,7 +524,7 @@ public Brush BorderBrush set { SetValue(BorderBrushProperty, value); } } - public static DependencyProperty BorderBrushProperty = + public static DependencyProperty BorderBrushProperty { get; } = DependencyProperty.Register( "BorderBrush", typeof(Brush), @@ -547,7 +547,7 @@ private void OnBorderBrushChanged(Brush oldValue, Brush newValue) private static CornerRadius GetCornerRadiusDefaultValue() => CornerRadius.None; [GeneratedDependencyProperty(ChangedCallback = true)] - public static DependencyProperty CornerRadiusProperty = CreateCornerRadiusProperty(); + public static DependencyProperty CornerRadiusProperty { get; } = CreateCornerRadiusProperty(); public CornerRadius CornerRadius { diff --git a/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs b/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs index 71d52c1fd99a..5677b4817b13 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs @@ -164,7 +164,7 @@ public ItemsPanelTemplate ItemsPanel set { SetValue(ItemsPanelProperty, value); } } - public static DependencyProperty ItemsPanelProperty = + public static DependencyProperty ItemsPanelProperty { get; } = DependencyProperty.Register( "ItemsPanel", typeof(ItemsPanelTemplate), @@ -194,7 +194,7 @@ public DataTemplate ItemTemplate set { SetValue(ItemTemplateProperty, value); } } - public static DependencyProperty ItemTemplateProperty = + public static DependencyProperty ItemTemplateProperty { get; } = DependencyProperty.Register( "ItemTemplate", typeof(DataTemplate), @@ -222,7 +222,7 @@ public DataTemplateSelector ItemTemplateSelector set { SetValue(ItemTemplateSelectorProperty, value); } } - public static DependencyProperty ItemTemplateSelectorProperty = + public static DependencyProperty ItemTemplateSelectorProperty { get; } = DependencyProperty.Register( "ItemTemplateSelector", typeof(DataTemplateSelector), diff --git a/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsPresenter.cs b/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsPresenter.cs index 4e5e54594286..46b62b48e4af 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsPresenter.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsPresenter.cs @@ -63,7 +63,7 @@ public Thickness Padding set => SetValue(PaddingProperty, value); } - public static DependencyProperty PaddingProperty = + public static DependencyProperty PaddingProperty { get; } = DependencyProperty.Register( "Padding", typeof(Thickness), diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs index 641b220cb105..2c3b88332d73 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs @@ -554,7 +554,7 @@ public double VerticalOffset private set => SetValue(VerticalOffsetProperty, value); } - public static DependencyProperty VerticalOffsetProperty = + public static DependencyProperty VerticalOffsetProperty { get; } = DependencyProperty.Register( "VerticalOffset", typeof(double), @@ -574,7 +574,7 @@ public double HorizontalOffset private set => SetValue(HorizontalOffsetProperty, value); } - public static DependencyProperty HorizontalOffsetProperty = + public static DependencyProperty HorizontalOffsetProperty { get; } = DependencyProperty.Register( "HorizontalOffset", typeof(double), diff --git a/src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs b/src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs index 245e5769929c..fe51bffe9109 100644 --- a/src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs +++ b/src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs @@ -572,7 +572,7 @@ public Thickness Padding set => SetValue(PaddingProperty, value); } - public static DependencyProperty PaddingProperty = + public static DependencyProperty PaddingProperty { get; } = DependencyProperty.Register( "Padding", typeof(Thickness), @@ -599,7 +599,7 @@ public int CharacterSpacing set => SetValue(CharacterSpacingProperty, value); } - public static DependencyProperty CharacterSpacingProperty = + public static DependencyProperty CharacterSpacingProperty { get; } = DependencyProperty.Register( "CharacterSpacing", typeof(int), @@ -629,7 +629,7 @@ public TextDecorations TextDecorations set => SetValue(TextDecorationsProperty, value); } - public static DependencyProperty TextDecorationsProperty = + public static DependencyProperty TextDecorationsProperty { get; } = DependencyProperty.Register( "TextDecorations", typeof(uint), diff --git a/src/Uno.UI/UI/Xaml/DependencyProperty.cs b/src/Uno.UI/UI/Xaml/DependencyProperty.cs index 1bcbd6183b14..34c5a3b435d8 100644 --- a/src/Uno.UI/UI/Xaml/DependencyProperty.cs +++ b/src/Uno.UI/UI/Xaml/DependencyProperty.cs @@ -187,7 +187,7 @@ internal int CachedHashCode /// Specifies a static value that is used by the dependency property system rather than null to indicate that /// the property exists, but does not have its value set by the dependency property system. /// - public static readonly object UnsetValue = Windows.UI.Xaml.UnsetValue.Instance; + public static object UnsetValue { get; } = Windows.UI.Xaml.UnsetValue.Instance; /// /// Retrieves the property metadata value for the dependency property as registered to a type. You specify the type you want info from as a type reference. diff --git a/src/Uno.UI/UI/Xaml/Documents/TextElement.cs b/src/Uno.UI/UI/Xaml/Documents/TextElement.cs index 2ac4907a9b9c..af434c28cb46 100644 --- a/src/Uno.UI/UI/Xaml/Documents/TextElement.cs +++ b/src/Uno.UI/UI/Xaml/Documents/TextElement.cs @@ -213,7 +213,7 @@ public int CharacterSpacing set => SetValue(CharacterSpacingProperty, value); } - public static DependencyProperty CharacterSpacingProperty = + public static DependencyProperty CharacterSpacingProperty { get; } = DependencyProperty.Register( "CharacterSpacing", typeof(int), @@ -242,7 +242,7 @@ public TextDecorations TextDecorations set { SetValue(TextDecorationsProperty, value); } } - public static DependencyProperty TextDecorationsProperty = + public static DependencyProperty TextDecorationsProperty { get; } = DependencyProperty.Register( "TextDecorations", typeof(uint), diff --git a/src/Uno.UWP/Storage/Streams/IRandomAccessStream.cs b/src/Uno.UWP/Storage/Streams/IRandomAccessStream.cs index 90d2499f761d..248522d87819 100644 --- a/src/Uno.UWP/Storage/Streams/IRandomAccessStream.cs +++ b/src/Uno.UWP/Storage/Streams/IRandomAccessStream.cs @@ -10,7 +10,7 @@ public partial interface IRandomAccessStream : IDisposable, IInputStream, IOutpu ulong Position { get; } - ulong Size { get; } + ulong Size { get; set; } IInputStream GetInputStreamAt( ulong position); diff --git a/src/Uno.UWP/Storage/Streams/RandomAccessStreamWithContentType.cs b/src/Uno.UWP/Storage/Streams/RandomAccessStreamWithContentType.cs index 7a1b731f8efd..736bde397b5e 100644 --- a/src/Uno.UWP/Storage/Streams/RandomAccessStreamWithContentType.cs +++ b/src/Uno.UWP/Storage/Streams/RandomAccessStreamWithContentType.cs @@ -65,7 +65,11 @@ public IAsyncOperation FlushAsync() public ulong Position => _stream.Position; /// - public ulong Size => _stream.Size; + public ulong Size + { + get => _stream.Size; + set => _stream.Size = value; + } /// public IInputStream GetInputStreamAt(ulong position) diff --git a/src/Uno.UWP/Storage/Streams/StreamedRandomAccessStream.cs b/src/Uno.UWP/Storage/Streams/StreamedRandomAccessStream.cs index 98a5fcb120e5..84dd4ae2149a 100644 --- a/src/Uno.UWP/Storage/Streams/StreamedRandomAccessStream.cs +++ b/src/Uno.UWP/Storage/Streams/StreamedRandomAccessStream.cs @@ -67,7 +67,11 @@ public StreamedRandomAccessStream( public ulong Position => (ulong)_temp.Position; /// - public ulong Size => (ulong)_temp.Length; + public ulong Size + { + get => (ulong)_temp.Length; + set => _temp.SetLength((long)value); + } /// public IAsyncOperationWithProgress ReadAsync(IBuffer buffer, uint count, InputStreamOptions options) diff --git a/src/Uno.UWP/UI/Colors.cs b/src/Uno.UWP/UI/Colors.cs index 3af67533b310..5d732fd0271f 100644 --- a/src/Uno.UWP/UI/Colors.cs +++ b/src/Uno.UWP/UI/Colors.cs @@ -46,11 +46,11 @@ public static Color Parse(string colorCode) if (!_colorMap.TryGetValue(colorCode, out color)) { - var field = typeof(Colors).GetField(colorCode); + var property = typeof(Colors).GetProperty(colorCode); - if (field != null) + if (property != null) { - _colorMap[colorCode] = color = (Color)field.GetValue(null); + _colorMap[colorCode] = color = (Color)property.GetValue(null); } else { @@ -120,146 +120,288 @@ public static Color FromARGB(string colorCode) return Color.FromArgb(a, r, g, b); } - public static readonly Color Transparent = FromInteger(0x00FFFFFF); - public static readonly Color AliceBlue = FromInteger(unchecked((int)0xFFF0F8FF)); - public static readonly Color AntiqueWhite = FromInteger(unchecked((int)0xFFFAEBD7)); - public static readonly Color Aqua = FromInteger(unchecked((int)0xFF00FFFF)); - public static readonly Color Aquamarine = FromInteger(unchecked((int)0xFF7FFFD4)); - public static readonly Color Azure = FromInteger(unchecked((int)0xFFF0FFFF)); - public static readonly Color Beige = FromInteger(unchecked((int)0xFFF5F5DC)); - public static readonly Color Bisque = FromInteger(unchecked(unchecked((int)0xFFFFE4C4))); - public static readonly Color Black = FromInteger(unchecked((int)0xFF000000)); - public static readonly Color BlanchedAlmond = FromInteger(unchecked((int)0xFFFFEBCD)); - public static readonly Color Blue = FromInteger(unchecked((int)0xFF0000FF)); - public static readonly Color BlueViolet = FromInteger(unchecked((int)0xFF8A2BE2)); - public static readonly Color Brown = FromInteger(unchecked((int)0xFFA52A2A)); - public static readonly Color BurlyWood = FromInteger(unchecked((int)0xFFDEB887)); - public static readonly Color CadetBlue = FromInteger(unchecked((int)0xFF5F9EA0)); - public static readonly Color Chartreuse = FromInteger(unchecked((int)0xFF7FFF00)); - public static readonly Color Chocolate = FromInteger(unchecked((int)0xFFD2691E)); - public static readonly Color Coral = FromInteger(unchecked((int)0xFFFF7F50)); - public static readonly Color CornflowerBlue = FromInteger(unchecked((int)0xFF6495ED)); - public static readonly Color Cornsilk = FromInteger(unchecked((int)0xFFFFF8DC)); - public static readonly Color Crimson = FromInteger(unchecked((int)0xFFDC143C)); - public static readonly Color Cyan = FromInteger(unchecked((int)0xFF00FFFF)); - public static readonly Color DarkBlue = FromInteger(unchecked((int)0xFF00008B)); - public static readonly Color DarkCyan = FromInteger(unchecked((int)0xFF008B8B)); - public static readonly Color DarkGoldenrod = FromInteger(unchecked((int)0xFFB8860B)); - public static readonly Color DarkGray = FromInteger(unchecked((int)0xFFA9A9A9)); - public static readonly Color DarkGreen = FromInteger(unchecked((int)0xFF006400)); - public static readonly Color DarkKhaki = FromInteger(unchecked((int)0xFFBDB76B)); - public static readonly Color DarkMagenta = FromInteger(unchecked((int)0xFF8B008B)); - public static readonly Color DarkOliveGreen = FromInteger(unchecked((int)0xFF556B2F)); - public static readonly Color DarkOrange = FromInteger(unchecked((int)0xFFFF8C00)); - public static readonly Color DarkOrchid = FromInteger(unchecked((int)0xFF9932CC)); - public static readonly Color DarkRed = FromInteger(unchecked((int)0xFF8B0000)); - public static readonly Color DarkSalmon = FromInteger(unchecked((int)0xFFE9967A)); - public static readonly Color DarkSeaGreen = FromInteger(unchecked((int)0xFF8FBC8B)); - public static readonly Color DarkSlateBlue = FromInteger(unchecked((int)0xFF483D8B)); - public static readonly Color DarkSlateGray = FromInteger(unchecked((int)0xFF2F4F4F)); - public static readonly Color DarkTurquoise = FromInteger(unchecked((int)0xFF00CED1)); - public static readonly Color DarkViolet = FromInteger(unchecked((int)0xFF9400D3)); - public static readonly Color DeepPink = FromInteger(unchecked((int)0xFFFF1493)); - public static readonly Color DeepSkyBlue = FromInteger(unchecked((int)0xFF00BFFF)); - public static readonly Color DimGray = FromInteger(unchecked((int)0xFF696969)); - public static readonly Color DodgerBlue = FromInteger(unchecked((int)0xFF1E90FF)); - public static readonly Color Firebrick = FromInteger(unchecked((int)0xFFB22222)); - public static readonly Color FloralWhite = FromInteger(unchecked((int)0xFFFFFAF0)); - public static readonly Color ForestGreen = FromInteger(unchecked((int)0xFF228B22)); - public static readonly Color Fuchsia = FromInteger(unchecked((int)0xFFFF00FF)); - public static readonly Color Gainsboro = FromInteger(unchecked((int)0xFFDCDCDC)); - public static readonly Color GhostWhite = FromInteger(unchecked((int)0xFFF8F8FF)); - public static readonly Color Gold = FromInteger(unchecked((int)0xFFFFD700)); - public static readonly Color Goldenrod = FromInteger(unchecked((int)0xFFDAA520)); - public static readonly Color Gray = FromInteger(unchecked((int)0xFF808080)); - public static readonly Color Green = FromInteger(unchecked((int)0xFF008000)); - public static readonly Color GreenYellow = FromInteger(unchecked((int)0xFFADFF2F)); - public static readonly Color Honeydew = FromInteger(unchecked((int)0xFFF0FFF0)); - public static readonly Color HotPink = FromInteger(unchecked((int)0xFFFF69B4)); - public static readonly Color IndianRed = FromInteger(unchecked((int)0xFFCD5C5C)); - public static readonly Color Indigo = FromInteger(unchecked((int)0xFF4B0082)); - public static readonly Color Ivory = FromInteger(unchecked((int)0xFFFFFFF0)); - public static readonly Color Khaki = FromInteger(unchecked((int)0xFFF0E68C)); - public static readonly Color Lavender = FromInteger(unchecked((int)0xFFE6E6FA)); - public static readonly Color LavenderBlush = FromInteger(unchecked((int)0xFFFFF0F5)); - public static readonly Color LawnGreen = FromInteger(unchecked((int)0xFF7CFC00)); - public static readonly Color LemonChiffon = FromInteger(unchecked((int)0xFFFFFACD)); - public static readonly Color LightBlue = FromInteger(unchecked((int)0xFFADD8E6)); - public static readonly Color LightCoral = FromInteger(unchecked((int)0xFFF08080)); - public static readonly Color LightCyan = FromInteger(unchecked((int)0xFFE0FFFF)); - public static readonly Color LightGoldenrodYellow = FromInteger(unchecked((int)0xFFFAFAD2)); - public static readonly Color LightGray = FromInteger(unchecked((int)0xFFD3D3D3)); - public static readonly Color LightGreen = FromInteger(unchecked((int)0xFF90EE90)); - public static readonly Color LightPink = FromInteger(unchecked((int)0xFFFFB6C1)); - public static readonly Color LightSalmon = FromInteger(unchecked((int)0xFFFFA07A)); - public static readonly Color LightSeaGreen = FromInteger(unchecked((int)0xFF20B2AA)); - public static readonly Color LightSkyBlue = FromInteger(unchecked((int)0xFF87CEFA)); - public static readonly Color LightSlateGray = FromInteger(unchecked((int)0xFF778899)); - public static readonly Color LightSteelBlue = FromInteger(unchecked((int)0xFFB0C4DE)); - public static readonly Color LightYellow = FromInteger(unchecked((int)0xFFFFFFE0)); - public static readonly Color Lime = FromInteger(unchecked((int)0xFF00FF00)); - public static readonly Color LimeGreen = FromInteger(unchecked((int)0xFF32CD32)); - public static readonly Color Linen = FromInteger(unchecked((int)0xFFFAF0E6)); - public static readonly Color Magenta = FromInteger(unchecked((int)0xFFFF00FF)); - public static readonly Color Maroon = FromInteger(unchecked((int)0xFF800000)); - public static readonly Color MediumAquamarine = FromInteger(unchecked((int)0xFF66CDAA)); - public static readonly Color MediumBlue = FromInteger(unchecked((int)0xFF0000CD)); - public static readonly Color MediumOrchid = FromInteger(unchecked((int)0xFFBA55D3)); - public static readonly Color MediumPurple = FromInteger(unchecked((int)0xFF9370DB)); - public static readonly Color MediumSeaGreen = FromInteger(unchecked((int)0xFF3CB371)); - public static readonly Color MediumSlateBlue = FromInteger(unchecked((int)0xFF7B68EE)); - public static readonly Color MediumSpringGreen = FromInteger(unchecked((int)0xFF00FA9A)); - public static readonly Color MediumTurquoise = FromInteger(unchecked((int)0xFF48D1CC)); - public static readonly Color MediumVioletRed = FromInteger(unchecked((int)0xFFC71585)); - public static readonly Color MidnightBlue = FromInteger(unchecked((int)0xFF191970)); - public static readonly Color MintCream = FromInteger(unchecked((int)0xFFF5FFFA)); - public static readonly Color MistyRose = FromInteger(unchecked((int)0xFFFFE4E1)); - public static readonly Color Moccasin = FromInteger(unchecked((int)0xFFFFE4B5)); - public static readonly Color NavajoWhite = FromInteger(unchecked((int)0xFFFFDEAD)); - public static readonly Color Navy = FromInteger(unchecked((int)0xFF000080)); - public static readonly Color OldLace = FromInteger(unchecked((int)0xFFFDF5E6)); - public static readonly Color Olive = FromInteger(unchecked((int)0xFF808000)); - public static readonly Color OliveDrab = FromInteger(unchecked((int)0xFF6B8E23)); - public static readonly Color Orange = FromInteger(unchecked((int)0xFFFFA500)); - public static readonly Color OrangeRed = FromInteger(unchecked((int)0xFFFF4500)); - public static readonly Color Orchid = FromInteger(unchecked((int)0xFFDA70D6)); - public static readonly Color PaleGoldenrod = FromInteger(unchecked((int)0xFFEEE8AA)); - public static readonly Color PaleGreen = FromInteger(unchecked((int)0xFF98FB98)); - public static readonly Color PaleTurquoise = FromInteger(unchecked((int)0xFFAFEEEE)); - public static readonly Color PaleVioletRed = FromInteger(unchecked((int)0xFFDB7093)); - public static readonly Color PapayaWhip = FromInteger(unchecked((int)0xFFFFEFD5)); - public static readonly Color PeachPuff = FromInteger(unchecked((int)0xFFFFDAB9)); - public static readonly Color Peru = FromInteger(unchecked((int)0xFFCD853F)); - public static readonly Color Pink = FromInteger(unchecked((int)0xFFFFC0CB)); - public static readonly Color Plum = FromInteger(unchecked((int)0xFFDDA0DD)); - public static readonly Color PowderBlue = FromInteger(unchecked((int)0xFFB0E0E6)); - public static readonly Color Purple = FromInteger(unchecked((int)0xFF800080)); - public static readonly Color Red = FromInteger(unchecked((int)0xFFFF0000)); - public static readonly Color RosyBrown = FromInteger(unchecked((int)0xFFBC8F8F)); - public static readonly Color RoyalBlue = FromInteger(unchecked((int)0xFF4169E1)); - public static readonly Color SaddleBrown = FromInteger(unchecked((int)0xFF8B4513)); - public static readonly Color Salmon = FromInteger(unchecked((int)0xFFFA8072)); - public static readonly Color SandyBrown = FromInteger(unchecked((int)0xFFF4A460)); - public static readonly Color SeaGreen = FromInteger(unchecked((int)0xFF2E8B57)); - public static readonly Color SeaShell = FromInteger(unchecked((int)0xFFFFF5EE)); - public static readonly Color Sienna = FromInteger(unchecked((int)0xFFA0522D)); - public static readonly Color Silver = FromInteger(unchecked((int)0xFFC0C0C0)); - public static readonly Color SkyBlue = FromInteger(unchecked((int)0xFF87CEEB)); - public static readonly Color SlateBlue = FromInteger(unchecked((int)0xFF6A5ACD)); - public static readonly Color SlateGray = FromInteger(unchecked((int)0xFF708090)); - public static readonly Color Snow = FromInteger(unchecked((int)0xFFFFFAFA)); - public static readonly Color SpringGreen = FromInteger(unchecked((int)0xFF00FF7F)); - public static readonly Color SteelBlue = FromInteger(unchecked((int)0xFF4682B4)); - public static readonly Color Tan = FromInteger(unchecked((int)0xFFD2B48C)); - public static readonly Color Teal = FromInteger(unchecked((int)0xFF008080)); - public static readonly Color Thistle = FromInteger(unchecked((int)0xFFD8BFD8)); - public static readonly Color Tomato = FromInteger(unchecked((int)0xFFFF6347)); - public static readonly Color Turquoise = FromInteger(unchecked((int)0xFF40E0D0)); - public static readonly Color Violet = FromInteger(unchecked((int)0xFFEE82EE)); - public static readonly Color Wheat = FromInteger(unchecked((int)0xFFF5DEB3)); - public static readonly Color White = FromInteger(unchecked((int)0xFFFFFFFF)); - public static readonly Color WhiteSmoke = FromInteger(unchecked((int)0xFFF5F5F5)); - public static readonly Color Yellow = FromInteger(unchecked((int)0xFFFFFF00)); - public static readonly Color YellowGreen = FromInteger(unchecked((int)0xFF9ACD32)); + private static Color? _transparent; + private static Color? _aliceBlue; + private static Color? _antiqueWhite; + private static Color? _aqua; + private static Color? _aquamarine; + private static Color? _azure; + private static Color? _beige; + private static Color? _bisque; + private static Color? _black; + private static Color? _blanchedAlmond; + private static Color? _blue; + private static Color? _blueViolet; + private static Color? _brown; + private static Color? _burlyWood; + private static Color? _cadetBlue; + private static Color? _chartreuse; + private static Color? _chocolate; + private static Color? _coral; + private static Color? _cornflowerBlue; + private static Color? _cornsilk; + private static Color? _crimson; + private static Color? _cyan; + private static Color? _darkBlue; + private static Color? _darkCyan; + private static Color? _darkGoldenrod; + private static Color? _darkGray; + private static Color? _darkGreen; + private static Color? _darkKhaki; + private static Color? _darkMagenta; + private static Color? _darkOliveGreen; + private static Color? _darkOrange; + private static Color? _darkOrchid; + private static Color? _darkRed; + private static Color? _darkSalmon; + private static Color? _darkSeaGreen; + private static Color? _darkSlateBlue; + private static Color? _darkSlateGray; + private static Color? _darkTurquoise; + private static Color? _darkViolet; + private static Color? _deepPink; + private static Color? _deepSkyBlue; + private static Color? _dimGray; + private static Color? _dodgerBlue; + private static Color? _firebrick; + private static Color? _floralWhite; + private static Color? _forestGreen; + private static Color? _fuchsia; + private static Color? _gainsboro; + private static Color? _ghostWhite; + private static Color? _gold; + private static Color? _goldenrod; + private static Color? _gray; + private static Color? _green; + private static Color? _greenYellow; + private static Color? _honeydew; + private static Color? _hotPink; + private static Color? _indianRed; + private static Color? _indigo; + private static Color? _ivory; + private static Color? _khaki; + private static Color? _lavender; + private static Color? _lavenderBlush; + private static Color? _lawnGreen; + private static Color? _lemonChiffon; + private static Color? _lightBlue; + private static Color? _lightCoral; + private static Color? _lightCyan; + private static Color? _lightGoldenrodYellow; + private static Color? _lightGray; + private static Color? _lightGreen; + private static Color? _lightPink; + private static Color? _lightSalmon; + private static Color? _lightSeaGreen; + private static Color? _lightSkyBlue; + private static Color? _lightSlateGray; + private static Color? _lightSteelBlue; + private static Color? _lightYellow; + private static Color? _lime; + private static Color? _limeGreen; + private static Color? _linen; + private static Color? _magenta; + private static Color? _maroon; + private static Color? _mediumAquamarine; + private static Color? _mediumBlue; + private static Color? _mediumOrchid; + private static Color? _mediumPurple; + private static Color? _mediumSeaGreen; + private static Color? _mediumSlateBlue; + private static Color? _mediumSpringGreen; + private static Color? _mediumTurquoise; + private static Color? _mediumVioletRed; + private static Color? _midnightBlue; + private static Color? _mintCream; + private static Color? _mistyRose; + private static Color? _moccasin; + private static Color? _navajoWhite; + private static Color? _navy; + private static Color? _oldLace; + private static Color? _olive; + private static Color? _oliveDrab; + private static Color? _orange; + private static Color? _orangeRed; + private static Color? _orchid; + private static Color? _paleGoldenrod; + private static Color? _paleGreen; + private static Color? _paleTurquoise; + private static Color? _paleVioletRed; + private static Color? _papayaWhip; + private static Color? _peachPuff; + private static Color? _peru; + private static Color? _pink; + private static Color? _plum; + private static Color? _powderBlue; + private static Color? _purple; + private static Color? _red; + private static Color? _rosyBrown; + private static Color? _royalBlue; + private static Color? _saddleBrown; + private static Color? _salmon; + private static Color? _sandyBrown; + private static Color? _seaGreen; + private static Color? _seaShell; + private static Color? _sienna; + private static Color? _silver; + private static Color? _skyBlue; + private static Color? _slateBlue; + private static Color? _slateGray; + private static Color? _snow; + private static Color? _springGreen; + private static Color? _steelBlue; + private static Color? _tan; + private static Color? _teal; + private static Color? _thistle; + private static Color? _tomato; + private static Color? _turquoise; + private static Color? _violet; + private static Color? _wheat; + private static Color? _white; + private static Color? _whiteSmoke; + private static Color? _yellow; + private static Color? _yellowGreen; + + public static Color Transparent => _transparent ??= FromInteger(0x00FFFFFF); + public static Color AliceBlue => _aliceBlue ??= FromInteger(unchecked((int)0xFFF0F8FF)); + public static Color AntiqueWhite => _antiqueWhite ??= FromInteger(unchecked((int)0xFFFAEBD7)); + public static Color Aqua => _aqua ??= FromInteger(unchecked((int)0xFF00FFFF)); + public static Color Aquamarine => _aquamarine ??= FromInteger(unchecked((int)0xFF7FFFD4)); + public static Color Azure => _azure ??= FromInteger(unchecked((int)0xFFF0FFFF)); + public static Color Beige => _beige ??= FromInteger(unchecked((int)0xFFF5F5DC)); + public static Color Bisque => _bisque ??= FromInteger(unchecked(unchecked((int)0xFFFFE4C4))); + public static Color Black => _black ??= FromInteger(unchecked((int)0xFF000000)); + public static Color BlanchedAlmond => _blanchedAlmond ??= FromInteger(unchecked((int)0xFFFFEBCD)); + public static Color Blue => _blue ??= FromInteger(unchecked((int)0xFF0000FF)); + public static Color BlueViolet => _blueViolet ??= FromInteger(unchecked((int)0xFF8A2BE2)); + public static Color Brown => _brown ??= FromInteger(unchecked((int)0xFFA52A2A)); + public static Color BurlyWood => _burlyWood ??= FromInteger(unchecked((int)0xFFDEB887)); + public static Color CadetBlue => _cadetBlue ??= FromInteger(unchecked((int)0xFF5F9EA0)); + public static Color Chartreuse => _chartreuse ??= FromInteger(unchecked((int)0xFF7FFF00)); + public static Color Chocolate => _chocolate ??= FromInteger(unchecked((int)0xFFD2691E)); + public static Color Coral => _coral ??= FromInteger(unchecked((int)0xFFFF7F50)); + public static Color CornflowerBlue => _cornflowerBlue ??= FromInteger(unchecked((int)0xFF6495ED)); + public static Color Cornsilk => _cornsilk ??= FromInteger(unchecked((int)0xFFFFF8DC)); + public static Color Crimson => _crimson ??= FromInteger(unchecked((int)0xFFDC143C)); + public static Color Cyan => _cyan ??= FromInteger(unchecked((int)0xFF00FFFF)); + public static Color DarkBlue => _darkBlue ??= FromInteger(unchecked((int)0xFF00008B)); + public static Color DarkCyan => _darkCyan ??= FromInteger(unchecked((int)0xFF008B8B)); + public static Color DarkGoldenrod => _darkGoldenrod ??= FromInteger(unchecked((int)0xFFB8860B)); + public static Color DarkGray => _darkGray ??= FromInteger(unchecked((int)0xFFA9A9A9)); + public static Color DarkGreen => _darkGreen ??= FromInteger(unchecked((int)0xFF006400)); + public static Color DarkKhaki => _darkKhaki ??= FromInteger(unchecked((int)0xFFBDB76B)); + public static Color DarkMagenta => _darkMagenta ??= FromInteger(unchecked((int)0xFF8B008B)); + public static Color DarkOliveGreen => _darkOliveGreen ??= FromInteger(unchecked((int)0xFF556B2F)); + public static Color DarkOrange => _darkOrange ??= FromInteger(unchecked((int)0xFFFF8C00)); + public static Color DarkOrchid => _darkOrchid ??= FromInteger(unchecked((int)0xFF9932CC)); + public static Color DarkRed => _darkRed ??= FromInteger(unchecked((int)0xFF8B0000)); + public static Color DarkSalmon => _darkSalmon ??= FromInteger(unchecked((int)0xFFE9967A)); + public static Color DarkSeaGreen => _darkSeaGreen ??= FromInteger(unchecked((int)0xFF8FBC8B)); + public static Color DarkSlateBlue => _darkSlateBlue ??= FromInteger(unchecked((int)0xFF483D8B)); + public static Color DarkSlateGray => _darkSlateGray ??= FromInteger(unchecked((int)0xFF2F4F4F)); + public static Color DarkTurquoise => _darkTurquoise ??= FromInteger(unchecked((int)0xFF00CED1)); + public static Color DarkViolet => _darkViolet ??= FromInteger(unchecked((int)0xFF9400D3)); + public static Color DeepPink => _deepPink ??= FromInteger(unchecked((int)0xFFFF1493)); + public static Color DeepSkyBlue => _deepSkyBlue ??= FromInteger(unchecked((int)0xFF00BFFF)); + public static Color DimGray => _dimGray ??= FromInteger(unchecked((int)0xFF696969)); + public static Color DodgerBlue => _dodgerBlue ??= FromInteger(unchecked((int)0xFF1E90FF)); + public static Color Firebrick => _firebrick ??= FromInteger(unchecked((int)0xFFB22222)); + public static Color FloralWhite => _floralWhite ??= FromInteger(unchecked((int)0xFFFFFAF0)); + public static Color ForestGreen => _forestGreen ??= FromInteger(unchecked((int)0xFF228B22)); + public static Color Fuchsia => _fuchsia ??= FromInteger(unchecked((int)0xFFFF00FF)); + public static Color Gainsboro => _gainsboro ??= FromInteger(unchecked((int)0xFFDCDCDC)); + public static Color GhostWhite => _ghostWhite ??= FromInteger(unchecked((int)0xFFF8F8FF)); + public static Color Gold => _gold ??= FromInteger(unchecked((int)0xFFFFD700)); + public static Color Goldenrod => _goldenrod ??= FromInteger(unchecked((int)0xFFDAA520)); + public static Color Gray => _gray ??= FromInteger(unchecked((int)0xFF808080)); + public static Color Green => _green ??= FromInteger(unchecked((int)0xFF008000)); + public static Color GreenYellow => _greenYellow ??= FromInteger(unchecked((int)0xFFADFF2F)); + public static Color Honeydew => _honeydew ??= FromInteger(unchecked((int)0xFFF0FFF0)); + public static Color HotPink => _hotPink ??= FromInteger(unchecked((int)0xFFFF69B4)); + public static Color IndianRed => _indianRed ??= FromInteger(unchecked((int)0xFFCD5C5C)); + public static Color Indigo => _indigo ??= FromInteger(unchecked((int)0xFF4B0082)); + public static Color Ivory => _ivory ??= FromInteger(unchecked((int)0xFFFFFFF0)); + public static Color Khaki => _khaki ??= FromInteger(unchecked((int)0xFFF0E68C)); + public static Color Lavender => _lavender ??= FromInteger(unchecked((int)0xFFE6E6FA)); + public static Color LavenderBlush => _lavenderBlush ??= FromInteger(unchecked((int)0xFFFFF0F5)); + public static Color LawnGreen => _lawnGreen ??= FromInteger(unchecked((int)0xFF7CFC00)); + public static Color LemonChiffon => _lemonChiffon ??= FromInteger(unchecked((int)0xFFFFFACD)); + public static Color LightBlue => _lightBlue ??= FromInteger(unchecked((int)0xFFADD8E6)); + public static Color LightCoral => _lightCoral ??= FromInteger(unchecked((int)0xFFF08080)); + public static Color LightCyan => _lightCyan ??= FromInteger(unchecked((int)0xFFE0FFFF)); + public static Color LightGoldenrodYellow => _lightGoldenrodYellow ??= FromInteger(unchecked((int)0xFFFAFAD2)); + public static Color LightGray => _lightGray ??= FromInteger(unchecked((int)0xFFD3D3D3)); + public static Color LightGreen => _lightGreen ??= FromInteger(unchecked((int)0xFF90EE90)); + public static Color LightPink => _lightPink ??= FromInteger(unchecked((int)0xFFFFB6C1)); + public static Color LightSalmon => _lightSalmon ??= FromInteger(unchecked((int)0xFFFFA07A)); + public static Color LightSeaGreen => _lightSeaGreen ??= FromInteger(unchecked((int)0xFF20B2AA)); + public static Color LightSkyBlue => _lightSkyBlue ??= FromInteger(unchecked((int)0xFF87CEFA)); + public static Color LightSlateGray => _lightSlateGray ??= FromInteger(unchecked((int)0xFF778899)); + public static Color LightSteelBlue => _lightSteelBlue ??= FromInteger(unchecked((int)0xFFB0C4DE)); + public static Color LightYellow => _lightYellow ??= FromInteger(unchecked((int)0xFFFFFFE0)); + public static Color Lime => _lime ??= FromInteger(unchecked((int)0xFF00FF00)); + public static Color LimeGreen => _limeGreen ??= FromInteger(unchecked((int)0xFF32CD32)); + public static Color Linen => _linen ??= FromInteger(unchecked((int)0xFFFAF0E6)); + public static Color Magenta => _magenta ??= FromInteger(unchecked((int)0xFFFF00FF)); + public static Color Maroon => _maroon ??= FromInteger(unchecked((int)0xFF800000)); + public static Color MediumAquamarine => _mediumAquamarine ??= FromInteger(unchecked((int)0xFF66CDAA)); + public static Color MediumBlue => _mediumBlue ??= FromInteger(unchecked((int)0xFF0000CD)); + public static Color MediumOrchid => _mediumOrchid ??= FromInteger(unchecked((int)0xFFBA55D3)); + public static Color MediumPurple => _mediumPurple ??= FromInteger(unchecked((int)0xFF9370DB)); + public static Color MediumSeaGreen => _mediumSeaGreen ??= FromInteger(unchecked((int)0xFF3CB371)); + public static Color MediumSlateBlue => _mediumSlateBlue ??= FromInteger(unchecked((int)0xFF7B68EE)); + public static Color MediumSpringGreen => _mediumSpringGreen ??= FromInteger(unchecked((int)0xFF00FA9A)); + public static Color MediumTurquoise => _mediumTurquoise ??= FromInteger(unchecked((int)0xFF48D1CC)); + public static Color MediumVioletRed => _mediumVioletRed ??= FromInteger(unchecked((int)0xFFC71585)); + public static Color MidnightBlue => _midnightBlue ??= FromInteger(unchecked((int)0xFF191970)); + public static Color MintCream => _mintCream ??= FromInteger(unchecked((int)0xFFF5FFFA)); + public static Color MistyRose => _mistyRose ??= FromInteger(unchecked((int)0xFFFFE4E1)); + public static Color Moccasin => _moccasin ??= FromInteger(unchecked((int)0xFFFFE4B5)); + public static Color NavajoWhite => _navajoWhite ??= FromInteger(unchecked((int)0xFFFFDEAD)); + public static Color Navy => _navy ??= FromInteger(unchecked((int)0xFF000080)); + public static Color OldLace => _oldLace ??= FromInteger(unchecked((int)0xFFFDF5E6)); + public static Color Olive => _olive ??= FromInteger(unchecked((int)0xFF808000)); + public static Color OliveDrab => _oliveDrab ??= FromInteger(unchecked((int)0xFF6B8E23)); + public static Color Orange => _orange ??= FromInteger(unchecked((int)0xFFFFA500)); + public static Color OrangeRed => _orangeRed ??= FromInteger(unchecked((int)0xFFFF4500)); + public static Color Orchid => _orchid ??= FromInteger(unchecked((int)0xFFDA70D6)); + public static Color PaleGoldenrod => _paleGoldenrod ??= FromInteger(unchecked((int)0xFFEEE8AA)); + public static Color PaleGreen => _paleGreen ??= FromInteger(unchecked((int)0xFF98FB98)); + public static Color PaleTurquoise => _paleTurquoise ??= FromInteger(unchecked((int)0xFFAFEEEE)); + public static Color PaleVioletRed => _paleVioletRed ??= FromInteger(unchecked((int)0xFFDB7093)); + public static Color PapayaWhip => _papayaWhip ??= FromInteger(unchecked((int)0xFFFFEFD5)); + public static Color PeachPuff => _peachPuff ??= FromInteger(unchecked((int)0xFFFFDAB9)); + public static Color Peru => _peru ??= FromInteger(unchecked((int)0xFFCD853F)); + public static Color Pink => _pink ??= FromInteger(unchecked((int)0xFFFFC0CB)); + public static Color Plum => _plum ??= FromInteger(unchecked((int)0xFFDDA0DD)); + public static Color PowderBlue => _powderBlue ??= FromInteger(unchecked((int)0xFFB0E0E6)); + public static Color Purple => _purple ??= FromInteger(unchecked((int)0xFF800080)); + public static Color Red => _red ??= FromInteger(unchecked((int)0xFFFF0000)); + public static Color RosyBrown => _rosyBrown ??= FromInteger(unchecked((int)0xFFBC8F8F)); + public static Color RoyalBlue => _royalBlue ??= FromInteger(unchecked((int)0xFF4169E1)); + public static Color SaddleBrown => _saddleBrown ??= FromInteger(unchecked((int)0xFF8B4513)); + public static Color Salmon => _salmon ??= FromInteger(unchecked((int)0xFFFA8072)); + public static Color SandyBrown => _sandyBrown ??= FromInteger(unchecked((int)0xFFF4A460)); + public static Color SeaGreen => _seaGreen ??= FromInteger(unchecked((int)0xFF2E8B57)); + public static Color SeaShell => _seaShell ??= FromInteger(unchecked((int)0xFFFFF5EE)); + public static Color Sienna => _sienna ??= FromInteger(unchecked((int)0xFFA0522D)); + public static Color Silver => _silver ??= FromInteger(unchecked((int)0xFFC0C0C0)); + public static Color SkyBlue => _skyBlue ??= FromInteger(unchecked((int)0xFF87CEEB)); + public static Color SlateBlue => _slateBlue ??= FromInteger(unchecked((int)0xFF6A5ACD)); + public static Color SlateGray => _slateGray ??= FromInteger(unchecked((int)0xFF708090)); + public static Color Snow => _snow ??= FromInteger(unchecked((int)0xFFFFFAFA)); + public static Color SpringGreen => _springGreen ??= FromInteger(unchecked((int)0xFF00FF7F)); + public static Color SteelBlue => _steelBlue ??= FromInteger(unchecked((int)0xFF4682B4)); + public static Color Tan => _tan ??= FromInteger(unchecked((int)0xFFD2B48C)); + public static Color Teal => _teal ??= FromInteger(unchecked((int)0xFF008080)); + public static Color Thistle => _thistle ??= FromInteger(unchecked((int)0xFFD8BFD8)); + public static Color Tomato => _tomato ??= FromInteger(unchecked((int)0xFFFF6347)); + public static Color Turquoise => _turquoise ??= FromInteger(unchecked((int)0xFF40E0D0)); + public static Color Violet => _violet ??= FromInteger(unchecked((int)0xFFEE82EE)); + public static Color Wheat => _wheat ??= FromInteger(unchecked((int)0xFFF5DEB3)); + public static Color White => _white ??= FromInteger(unchecked((int)0xFFFFFFFF)); + public static Color WhiteSmoke => _whiteSmoke ??= FromInteger(unchecked((int)0xFFF5F5F5)); + public static Color Yellow => _yellow ??= FromInteger(unchecked((int)0xFFFFFF00)); + public static Color YellowGreen => _yellowGreen ??= FromInteger(unchecked((int)0xFF9ACD32)); } } diff --git a/src/Uno.UWP/UI/Text/FontWeight.cs b/src/Uno.UWP/UI/Text/FontWeight.cs index 358c5966af8f..68c901c3e7a7 100644 --- a/src/Uno.UWP/UI/Text/FontWeight.cs +++ b/src/Uno.UWP/UI/Text/FontWeight.cs @@ -11,7 +11,7 @@ public FontWeight(ushort weight) Weight = weight; } - public ushort Weight { get; set; } + public ushort Weight; public override int GetHashCode() => Weight.GetHashCode(); diff --git a/src/Uno.UWP/UI/Text/FontWeights.cs b/src/Uno.UWP/UI/Text/FontWeights.cs index de77b33dda2b..895d07daea6d 100644 --- a/src/Uno.UWP/UI/Text/FontWeights.cs +++ b/src/Uno.UWP/UI/Text/FontWeights.cs @@ -6,38 +6,40 @@ namespace Windows.UI.Text { public partial class FontWeights { - public static readonly FontWeight Thin = new FontWeight(100); - - public static readonly FontWeight ExtraLight = new FontWeight(200); - - public static readonly FontWeight UltraLight = new FontWeight(200); - - public static readonly FontWeight SemiLight = new FontWeight(250); - - public static readonly FontWeight Light = new FontWeight(300); - - public static readonly FontWeight Normal = new FontWeight(400); - - public static readonly FontWeight Regular = new FontWeight(400); - - public static readonly FontWeight Medium = new FontWeight(500); - - public static readonly FontWeight SemiBold = new FontWeight(600); - - public static readonly FontWeight DemiBold = new FontWeight(600); - - public static readonly FontWeight Bold = new FontWeight(700); - - public static readonly FontWeight UltraBold = new FontWeight(800); - - public static readonly FontWeight ExtraBold = new FontWeight(800); - - public static readonly FontWeight Black = new FontWeight(900); - - public static readonly FontWeight Heavy = new FontWeight(900); - - public static readonly FontWeight ExtraBlack = new FontWeight(950); - - public static readonly FontWeight UltraBlack = new FontWeight(950); + private static FontWeight? _thin; + private static FontWeight? _extraLight; + private static FontWeight? _ultraLight; + private static FontWeight? _semiLight; + private static FontWeight? _light; + private static FontWeight? _normal; + private static FontWeight? _regular; + private static FontWeight? _medium; + private static FontWeight? _semiBold; + private static FontWeight? _demiBold; + private static FontWeight? _bold; + private static FontWeight? _ultraBold; + private static FontWeight? _extraBold; + private static FontWeight? _black; + private static FontWeight? _heavy; + private static FontWeight? _extraBlack; + private static FontWeight? _ultraBlack; + + public static FontWeight Thin => _thin ??= new FontWeight(100); + public static FontWeight ExtraLight => _extraLight ??= new FontWeight(200); + public static FontWeight UltraLight => _ultraLight ??= new FontWeight(200); + public static FontWeight SemiLight => _semiLight ??= new FontWeight(250); + public static FontWeight Light => _light ??= new FontWeight(300); + public static FontWeight Normal => _normal ??= new FontWeight(400); + public static FontWeight Regular => _regular ??= new FontWeight(400); + public static FontWeight Medium => _medium ??= new FontWeight(500); + public static FontWeight SemiBold => _semiBold ??= new FontWeight(600); + public static FontWeight DemiBold => _demiBold ??= new FontWeight(600); + public static FontWeight Bold => _bold ??= new FontWeight(700); + public static FontWeight UltraBold => _ultraBold ??= new FontWeight(800); + public static FontWeight ExtraBold => _extraBold ??= new FontWeight(800); + public static FontWeight Black => _black ??= new FontWeight(900); + public static FontWeight Heavy => _heavy ??= new FontWeight(900); + public static FontWeight ExtraBlack => _extraBlack ??= new FontWeight(950); + public static FontWeight UltraBlack => _ultraBlack ??= new FontWeight(950); } }