BoxBlock

Overview

BoxBlock is a class in Aspose.PDF FOSS for .NET. Inherits from: BaseParagraph.

A box that holds other paragraphs: CSS’s block container.

This class declares 2 methods for BoxBlock objects in .NET programs. Available methods include: BaseParagraph, Clone. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BackgroundColor, BackgroundOpacity, BackgroundPictures, Border, CornerRadii, HorizontalAlignment, and 17 more.

Properties

NameTypeAccessDescription
ParagraphsParagraphsReadWhat the box holds, in order.
BorderBorderInfo?Read/WriteThe rules around the padding; null for none.
PaddingMarginInfo?Read/WriteThe space between the border and the paragraphs; null for none.
BackgroundColorColor?Read/WriteThe colour filling the box out to its border’s outer edge; null for none.
BackgroundOpacitydouble?Read/WriteThe opacity the background is painted at, 0 to 1; null paints it at its colour’s own alpha.
CornerRadiiCornerRadii?Read/WriteThe box’s rounded corners; null leaves them square.
BackgroundPicturesList<BackgroundPicture>ReadPictures painted over the background colour and under the border, the first on top (see BackgroundPicture); each part of a box that breaks across pages draws them as a whole box.
WidthdoubleRead/WriteThe width of the content box in points, or – when WidthIsFraction is set – the fraction of the region’s width it takes; 0 (the default) fills the region less the margins, border and padding.
WidthIsFractionboolRead/WriteWidth is a fraction of the region’s width, not points.
MinHeightdoubleRead/WriteThe least height of the content box in points on the page the box starts; a box whose paragraphs are shorter is closed that far under its content top.
TopMarginAfterBreakboolRead/WriteWhether the part that continues on the next page opens with the box’s top margin again, as the box itself did; off (the default) it opens flush at the page’s content top, the way a fragmented CSS box does.
IsKeptTogetherboolRead/WriteWhether a box that would break across pages starts on the next page instead, whole.
MiddleRuleGraphInfo?Read/WriteA rule stroked across the content box through its vertical middle, from its left edge to its right, painted over the background and border: the line a separator draws.
HorizontalAlignmentHorizontalAlignmentRead/WriteHorizontal alignment applied to this paragraph.
VerticalAlignmentVerticalAlignmentRead/WriteVertical alignment applied to this paragraph.
MarginMarginInfoRead/WriteOuter-margin info applied to this paragraph.
IsFirstParagraphInColumnboolRead/WriteForce the paragraph to start a new column.
IsKeptWithNextboolRead/WriteKeep this paragraph on the same page as the next one.
IsInNewPageboolRead/WriteForce the paragraph to start on a new page.
IsInLineParagraphboolRead/WriteInline paragraph flag (does not start a new line).
HyperlinkTextstring?Read/WriteLegacy string-typed hyperlink target.
HyperlinkHyperlink?Read/WriteTyped hyperlink decoration applied to the paragraph.
ZIndexintRead/WriteZ-order index used by the DOM renderer.

Methods

SignatureDescription
BaseParagraph()Creates a paragraph with default alignment, an empty margin and no hyperlink.
Clone()Shallow clone — copies scalar/ref-shared state.

See Also