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
| Name | Type | Access | Description |
|---|---|---|---|
Paragraphs | Paragraphs | Read | What the box holds, in order. |
Border | BorderInfo? | Read/Write | The rules around the padding; null for none. |
Padding | MarginInfo? | Read/Write | The space between the border and the paragraphs; null for none. |
BackgroundColor | Color? | Read/Write | The colour filling the box out to its border’s outer edge; null for none. |
BackgroundOpacity | double? | Read/Write | The opacity the background is painted at, 0 to 1; null paints it at its colour’s own alpha. |
CornerRadii | CornerRadii? | Read/Write | The box’s rounded corners; null leaves them square. |
BackgroundPictures | List<BackgroundPicture> | Read | Pictures 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. |
Width | double | Read/Write | The 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. |
WidthIsFraction | bool | Read/Write | Width is a fraction of the region’s width, not points. |
MinHeight | double | Read/Write | The 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. |
TopMarginAfterBreak | bool | Read/Write | Whether 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. |
IsKeptTogether | bool | Read/Write | Whether a box that would break across pages starts on the next page instead, whole. |
MiddleRule | GraphInfo? | Read/Write | A 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. |
HorizontalAlignment | HorizontalAlignment | Read/Write | Horizontal alignment applied to this paragraph. |
VerticalAlignment | VerticalAlignment | Read/Write | Vertical alignment applied to this paragraph. |
Margin | MarginInfo | Read/Write | Outer-margin info applied to this paragraph. |
IsFirstParagraphInColumn | bool | Read/Write | Force the paragraph to start a new column. |
IsKeptWithNext | bool | Read/Write | Keep this paragraph on the same page as the next one. |
IsInNewPage | bool | Read/Write | Force the paragraph to start on a new page. |
IsInLineParagraph | bool | Read/Write | Inline paragraph flag (does not start a new line). |
HyperlinkText | string? | Read/Write | Legacy string-typed hyperlink target. |
Hyperlink | Hyperlink? | Read/Write | Typed hyperlink decoration applied to the paragraph. |
ZIndex | int | Read/Write | Z-order index used by the DOM renderer. |
Methods
| Signature | Description |
|---|---|
BaseParagraph() | Creates a paragraph with default alignment, an empty margin and no hyperlink. |
Clone() | Shallow clone — copies scalar/ref-shared state. |