MathPortion class

Represents a portion with mathematical context inside.

public sealed class MathPortion : Portion, IMathPortion


Name Description
MathPortion() Initializes a new instance of the MathPortion class.


Name Description
Field { get; } Returns a field of this portion. Read-only IField.
MathParagraph { get; } Math paragraph
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.


Name Description
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.



using (Presentation pres = new Presentation())
    IAutoShape shape = pres.Slides[0].Shapes.AddMathShape(0, 0, 300, 50);
    IParagraph paragraph = shape.TextFrame.Paragraphs[0];
    MathPortion mathPortion = new MathPortion();

See Also