TextStyle Class
Represents style attributes of text.
public class TextStyle : ICloneable
- Inheritance:
- object object
- Implements:
- ICloneable
Constructors
TextStyle()
Initializes an instance of the text style with default values.
public TextStyle()
TextStyle(string?, double?, Color?)
Initializes an instance of the text style with the specified font family name, font size, and font color.
public TextStyle(string? fontFamilyName, double? fontSize, Color? textColor)
| Parameter | Type | Description |
|---|---|---|
| fontFamilyName | string | The font family name or |
| fontSize | double? | The font size, or |
| textColor | Color? | The text color, or |
Properties
Bold
Indicates if bold is active.
FontFamilyName
The font family name.
FontSize
The font size.
Italic
Indicates if italic is active.
TextColor
The text color.
public Color TextColor { get; set; }
Property Value
- Color
Methods
Clone()
Creates a new object that is a copy of the current instance.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The object to compare with the current object. |
Returns
- bool:
trueif the specified object is equal to the current object; otherwise,false.
GetHashCode()
Serves as the default hash function.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)