New to Telerik UI for WPFStart a free 30-day trial

Represents formatting of a text portion.

Definition

Namespace:Telerik.Windows.Controls.SyntaxEditor.UI

Assembly:Telerik.Windows.Controls.SyntaxEditor.dll

Syntax:

C#
public class TextFormatDefinition

Inheritance: objectTextFormatDefinition

Constructors

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Brush foreground, Brush background, UnderlineInfo underline, Pen border, FontWeight fontWeight, FontStyle fontStyle)
Parameters:foregroundBrushbackgroundBrushunderlineUnderlineInfoborderPenfontWeightFontWeightfontStyleFontStyle

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Brush foreground, Brush background, UnderlineInfo underline, Pen border)
Parameters:foregroundBrushbackgroundBrushunderlineUnderlineInfoborderPen

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Brush foreground, Brush background)
Parameters:foregroundBrushbackgroundBrush

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Brush foreground, FontWeight fontWeight, FontStyle fontStyle)
Parameters:foregroundBrushfontWeightFontWeightfontStyleFontStyle

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Brush foreground)
Parameters:foregroundBrush

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(Pen border)
Parameters:borderPen

Initializes a new instance of the TextFormatDefinition class.

C#
public TextFormatDefinition(UnderlineInfo underline)
Parameters:underlineUnderlineInfo

Properties

Gets the background of the text format definition.

C#
public Brush Background { get; }

Gets the border of the text format definition.

C#
public Pen Border { get; }

FontStyle

FontStyle

Gets the font style of the text format definition.

C#
public FontStyle FontStyle { get; }

FontWeight

FontWeight

Gets the font weight of the text format definition.

C#
public FontWeight FontWeight { get; }

Gets the foreground of the text format definition.

C#
public Brush Foreground { get; }

Gets the underline of the text format definition.

C#
public UnderlineInfo Underline { get; }

Methods

Determines whether two object instances are equal.

C#
public override bool Equals(object obj)
Parameters:objobjectReturns:

bool

Overrides: object.Equals(object)

Determines whether this instance is equal to other TextFormatDefinition instance.

C#
public bool Equals(TextFormatDefinition other)
Parameters:otherTextFormatDefinitionReturns:

bool

Gets the hash code of this instance.

C#
public override int GetHashCode()
Returns:

int

Overrides: object.GetHashCode()

Operators

Implements the != operator.

C#
public static bool operator !=(TextFormatDefinition left, TextFormatDefinition right)
Parameters:leftTextFormatDefinition

The left.

rightTextFormatDefinition

The right.

Returns:

bool

The result of the operator.

Implements the == operator.

C#
public static bool operator ==(TextFormatDefinition left, TextFormatDefinition right)
Parameters:leftTextFormatDefinition

The left.

rightTextFormatDefinition

The right.

Returns:

bool

The result of the operator.