Class StylesheetFontsCollection
- Namespace
- Myra.Graphics2D.UI.Styles
- Assembly
- Myra.dll
Represents a collection of StylesheetFont objects used by a stylesheet.
[XmlName("Fonts")]
public class StylesheetFontsCollection : IEnumerable<StylesheetFont>, IEnumerable
- Inheritance
-
StylesheetFontsCollection
- Implements
- Inherited Members
Properties
AtlasUsedSpace
Gets or sets the atlas used space rectangle for the font collection.
[XmlName("UsedSpace")]
public Rectangle? AtlasUsedSpace { get; set; }
Property Value
- Rectangle?
Count
Gets the number of fonts in the collection.
public int Count { get; }
Property Value
Fonts
Gets the underlying dictionary of fonts keyed by identifier.
public Dictionary<string, StylesheetFont> Fonts { get; }
Property Value
this[string]
Gets or sets a font by its identifier.
public StylesheetFont this[string id] { get; set; }
Parameters
idstringThe font identifier.
Property Value
Methods
GetEnumerator()
public IEnumerator<StylesheetFont> GetEnumerator()
Returns
TryGetValue(string, out StylesheetFont)
Attempts to retrieve a font by its identifier.
public bool TryGetValue(string id, out StylesheetFont font)
Parameters
idstringThe font identifier.
fontStylesheetFontWhen this method returns, contains the font associated with the specified identifier, if found.
Returns
- bool
trueif a font with the specified identifier exists; otherwise,false.