TextOptions Struct
Definition
Provides options for controlling text rendering behavior, including rendering mode, hinting mode, and baseline pixel alignment. Used to configure how text appears within visual elements.
public struct TextOptions
Remarks
TextOptions encapsulates settings that influence the clarity, sharpness, and positioning of rendered text. These options can be applied to visual elements to customize text appearance for different display scenarios, such as optimizing for readability at small font sizes or ensuring pixel-perfect alignment. The struct supports merging with other instances to inherit unspecified values, and exposes attached properties for use with visuals.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetBaselinePixelAlignment | Gets the BaselinePixelAlignment attached property for a visual. |
| GetHashCode | No summary available. |
| GetTextHintingMode | Gets the TextHintingMode attached property for a visual. |
| GetTextOptions | Gets the TextOptions attached value for a visual. |
| GetTextRenderingMode | Gets the TextRenderingMode attached property for a visual. |
| MergeWith | Merges this instance with other using inheritance semantics: unspecified values on this instance are taken from other. |
| SetBaselinePixelAlignment | Sets the BaselinePixelAlignment attached property for a visual. |
| SetTextHintingMode | Sets the TextHintingMode attached property for a visual. |
| SetTextOptions | Sets the TextOptions attached value for a visual. |
| SetTextRenderingMode | Sets the TextRenderingMode attached property for a visual. |
| ToString | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Media.TextOptions other)
Parameters
other Avalonia.Media.TextOptions
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetBaselinePixelAlignment Method
Gets the BaselinePixelAlignment attached property for a visual.
public Avalonia.Media.BaselinePixelAlignment GetBaselinePixelAlignment(Avalonia.Visual visual)