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)
Parameters
visual Avalonia.Visual
Returns
GetHashCode Method
public int GetHashCode()
Returns
int
GetTextHintingMode Method
Gets the TextHintingMode attached property for a visual.
public Avalonia.Media.TextHintingMode GetTextHintingMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
Returns
GetTextOptions Method
Gets the TextOptions attached value for a visual.
public Avalonia.Media.TextOptions GetTextOptions(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
Returns
GetTextRenderingMode Method
Gets the TextRenderingMode attached property for a visual.
public Avalonia.Media.TextRenderingMode GetTextRenderingMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
Returns
MergeWith Method
Merges this instance with other using inheritance semantics: unspecified values on this
instance are taken from other.
public Avalonia.Media.TextOptions MergeWith(Avalonia.Media.TextOptions other)
Parameters
other Avalonia.Media.TextOptions
Returns
SetBaselinePixelAlignment Method
Sets the BaselinePixelAlignment attached property for a visual.
public void SetBaselinePixelAlignment(Avalonia.Visual visual, Avalonia.Media.BaselinePixelAlignment value)
Parameters
visual Avalonia.Visual
SetTextHintingMode Method
Sets the TextHintingMode attached property for a visual.
public void SetTextHintingMode(Avalonia.Visual visual, Avalonia.Media.TextHintingMode value)
Parameters
visual Avalonia.Visual
SetTextOptions Method
Sets the TextOptions attached value for a visual.
public void SetTextOptions(Avalonia.Visual visual, Avalonia.Media.TextOptions value)