Portion

Portion class

Represents a portion of text inside a text paragraph.

public class Portion : IPortion

Constructors

NameDescription
Portion()Initializes a new instance of the Portion class.
Portion(Portion)Initializes a new instance of the Portion class.
Portion(string)Initializes a new instance of the Portion class.

Properties

NameDescription
Field { get; }Returns a field of this portion. Read-only IField.
PortionFormat { get; }Returns oformatting bject which contains explicitly set formatting properties of the text portion with no inheritance applied. Read-only IPortionFormat.
Text { get; set; }Gets or sets the plain text of a portion. Read/write String.

Methods

NameDescription
AddField(IFieldType)Converts this portion to the automaticaly updated field.
AddField(string)Converts this portion to the automaticaly updated field.
GetCoordinates()Get coordinates of the beginning of the portion. The X coordinate of point represents the portion beginning from the first character including left side bearing. The Y coordinate includes top side bearing.
GetRect()Get coordinates of rect that bounds portion. The rect includes all the lines of text in portion, including empty ones.
RemoveField()Converts this field portion to the simple portion.

See Also