ParagraphFrameFormat Property

Provides access to the paragraph formatting properties.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.10.0

ExpandedSyntax

public FrameFormat FrameFormat { get; }

Property Value

Type: FrameFormat

ExpandedExamples

Shows how to get information about formatting properties of paragraphs that are frames.
Document doc = new Document(MyDir + "Paragraph frame.docx");

ParagraphCollection paragraphs = doc.FirstSection.Body.Paragraphs;

foreach (Paragraph paragraph in paragraphs.OfType<Paragraph>().Where(p => p.FrameFormat.IsFrame))
{
    Console.WriteLine("Width: " + paragraph.FrameFormat.Width);
    Console.WriteLine("Height: " + paragraph.FrameFormat.Height);
    Console.WriteLine("HeightRule: " + paragraph.FrameFormat.HeightRule);
    Console.WriteLine("HorizontalAlignment: " + paragraph.FrameFormat.HorizontalAlignment);
    Console.WriteLine("VerticalAlignment: " + paragraph.FrameFormat.VerticalAlignment);
    Console.WriteLine("HorizontalPosition: " + paragraph.FrameFormat.HorizontalPosition);
    Console.WriteLine("RelativeHorizontalPosition: " +
                      paragraph.FrameFormat.RelativeHorizontalPosition);
    Console.WriteLine("HorizontalDistanceFromText: " +
                      paragraph.FrameFormat.HorizontalDistanceFromText);
    Console.WriteLine("VerticalPosition: " + paragraph.FrameFormat.VerticalPosition);
    Console.WriteLine("RelativeVerticalPosition: " + paragraph.FrameFormat.RelativeVerticalPosition);
    Console.WriteLine("VerticalDistanceFromText: " + paragraph.FrameFormat.VerticalDistanceFromText);
}

ExpandedSee Also