Remove

MathParagraph.Remove method

Supprime la première occurrence d’un objet spécifique de la collection/>.

public bool Remove(IMathBlock mathBlock)
ParamètreTypeDescription
mathBlockIMathBlockL’objet à supprimer de la collection.

Valeur de Retour

true si mathBlock a été supprimé avec succès de la collection; sinon, false. Cette méthode retourne également false si mathBlock n’est pas trouvé dans la collection d’origine/>.

Exemples

Exemple:

[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
mathParagraph.Add(new MathBlock(new MathematicalText("x")));
IMathBlock block = new MathBlock(new MathematicalText("y"));
mathParagraph.Add(block);
mathParagraph.Remove(block);

Voir Également