WrapText

TextFrameFormat.WrapText-Eigenschaft

Wahr, wenn der Text an den Rändern des TextFrames umgebrochen wird. Schreib-/Lese NullableBool.

public NullableBool WrapText { get; set; }

Beispiele

Der folgende Beispielcode zeigt, wie man Text in einer Präsentation umbricht.

[C#]
using (Presentation pres = new Presentation())
{
    ISlide slide = pres.Slides[0];
    IAutoShape autoShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 30, 30, 350, 100);
    Portion portion = new Portion("lorem ipsum...");
    portion.PortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
    portion.PortionFormat.FillFormat.FillType = FillType.Solid;
    autoShape.TextFrame.Paragraphs[0].Portions.Add(portion);
    ITextFrameFormat textFrameFormat = autoShape.TextFrame.TextFrameFormat;
    textFrameFormat.WrapText = NullableBool.True;
    pres.Save("Output-presentation.pptx", SaveFormat.Pptx);
}

Siehe auch