Insert
MathParagraph.Insert 方法
在指定索引处将 IMathBlock 插入集合中。
public void Insert(int index, IMathBlock mathBlock)
参数 | 类型 | 描述 |
---|---|---|
index | Int32 | 应插入项的零基础索引。 |
mathBlock | IMathBlock | 要插入的 IMathBlock。 |
示例
示例:
[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
IMathBlock block = new MathBlock(new MathematicalText("y"));
mathParagraph.Insert(0, block);