# PdfPanelStyle

Visual style shared by panel paragraphs and decorated flow elements.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfPanelStyle.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L19)

Visual style shared by panel paragraphs and decorated flow elements.

## Inheritance

- object
- PdfPanelStyle

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [A three-column service catalog](/showcase/pdf-service-catalog/) Sample
  
  Lay out a PDF service catalog in C# with relative columns, feature lists, and colored guidance panels. Download the generated PDF and source.

## Usage

Explore 7 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Property [PdfCreateOptions.DefaultPanelStyle](/api/pdf/officeimo-pdf-pdfcreateoptions/#property-defaultpanelstyle)
- Method [PdfPanelStyle.Clone](/api/pdf/officeimo-pdf-pdfpanelstyle/#method-clone)
- Property [PdfTheme.PdfPanelStyle](/api/pdf/officeimo-pdf-pdftheme/#property-pdfpanelstyle)

### Accepted by parameters 4

- Method [PdfContentBuilder.AddPanelParagraph](/api/pdf/officeimo-pdf-pdfcontentbuilder/#method-addpanelparagraph-action-officeimo-pdf-pdfparagraph-officeimo-pdf-pdfpanelstyle-officeimo-officealignment-nullable-officeimo-officecolor) parameter `style`
- Method [PdfContentBuilder.Panel](/api/pdf/officeimo-pdf-pdfcontentbuilder/#method-panel-action-officeimo-pdf-pdfcontentbuilder-officeimo-pdf-pdfpanelstyle) parameter `style`
- Method [PdfElementBuilder.Style](/api/pdf/officeimo-pdf-pdfelementbuilder/#method-style-officeimo-pdf-pdfpanelstyle) parameter `style`
- Method [PdfPageBuilder.DefaultPanelStyle](/api/pdf/officeimo-pdf-pdfpagebuilder/#method-defaultpanelstyle-officeimo-pdf-pdfpanelstyle) parameter `style`

Filter members 

Show inherited

## Constructors

`public PdfPanelStyle()` [#](#constructor-ctor)

[PdfPanelStyle.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L19)

## Methods

`public PdfPanelStyle Clone()` [#](#method-clone)

[PdfPanelStyle.cs:194](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L194)

Creates a copy of this panel style.

Returns

`PdfPanelStyle`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OfficeColor? Background { get; set; }` [#](#property-background)

[PdfPanelStyle.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L52)

Background fill color. Set to null for no fill.

`public OfficeColor? BorderColor { get; set; }` [#](#property-bordercolor)

[PdfPanelStyle.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L54)

Border color. Set to null for no border.

`public OfficeLength BorderWidth { get; set; }` [#](#property-borderwidth)

[PdfPanelStyle.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L57)

Border stroke width in points.

`public OfficeLength CornerRadius { get; set; }` [#](#property-cornerradius)

[PdfPanelStyle.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L69)

Corner radius, in points, for the panel box. Zero (the default) keeps square corners. When set, the background fill and the uniform border follow rounded corners; per-side border overrides are clipped to the rounded box so they do not overrun the curve.

`public PdfPanelBorder? TopBorder { get; set; }` [#](#property-topborder)

[PdfPanelStyle.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L77)

Optional top border override. When set, it overrides the uniform border for this side.

`public PdfPanelBorder? RightBorder { get; set; }` [#](#property-rightborder)

[PdfPanelStyle.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L82)

Optional right border override. When set, it overrides the uniform border for this side.

`public PdfPanelBorder? BottomBorder { get; set; }` [#](#property-bottomborder)

[PdfPanelStyle.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L87)

Optional bottom border override. When set, it overrides the uniform border for this side.

`public PdfPanelBorder? LeftBorder { get; set; }` [#](#property-leftborder)

[PdfPanelStyle.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L92)

Optional left border override. When set, it overrides the uniform border for this side.

`public OfficeLength PaddingY { get; set; }` [#](#property-paddingy)

[PdfPanelStyle.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L102)

Vertical padding inside the panel (points).

`public bool RepeatFragmentDecoration { get; set; }` [#](#property-repeatfragmentdecoration)

[PdfPanelStyle.cs:113](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L113)

When true, each page or column fragment repeats vertical padding and top/bottom borders. When false, top padding and border belong to the first fragment and bottom padding and border belong to the final fragment; intermediate fragments retain side borders and background.

`public OfficeLength FragmentBottomInset { get; set; }` [#](#property-fragmentbottominset)

[PdfPanelStyle.cs:121](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L121)

Space reserved above the bottom boundary of every panel fragment. This leaves room at a continuation boundary without shifting the next fragment's first line downward. Closing vertical padding can occupy this reserved space. The default is zero.

`public OfficeLength PaddingX { get; set; }` [#](#property-paddingx)

[PdfPanelStyle.cs:145](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L145)

Horizontal padding inside the panel (points).

`public OfficeLength LeftInset { get; set; }` [#](#property-leftinset)

[PdfPanelStyle.cs:152](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L152)

Space before the panel's left edge, relative to its containing frame. Negative values extend the frame outward.

`public OfficeLength RightInset { get; set; }` [#](#property-rightinset)

[PdfPanelStyle.cs:154](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L154)

Space after the panel's right edge, relative to its containing frame. Negative values extend the frame outward.

`public OfficeLength? MaxWidth { get; set; }` [#](#property-maxwidth)

[PdfPanelStyle.cs:157](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L157)

Optional maximum width for the panel box (points). When set, the box can be centered or right-aligned.

`public OfficeAlignment Align { get; set; }` [#](#property-align)

[PdfPanelStyle.cs:165](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L165)

Horizontal alignment of the panel box within the content area.

`public OfficeLength SpacingBefore { get; set; }` [#](#property-spacingbefore)

[PdfPanelStyle.cs:173](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L173)

Vertical space before the panel in the surrounding document flow, in points.

`public OfficeLength SpacingAfter { get; set; }` [#](#property-spacingafter)

[PdfPanelStyle.cs:181](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L181)

Vertical space after the panel in the surrounding document flow, in points.

`public bool KeepTogether { get; set; }` [#](#property-keeptogether)

[PdfPanelStyle.cs:188](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L188)

When true, the entire panel is kept on one page; otherwise it can split across pages.

`public bool KeepWithNext { get; set; }` [#](#property-keepwithnext)

[PdfPanelStyle.cs:190](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfPanelStyle.cs#L190)

When true, the panel moves to the next page when it would otherwise be separated from the following flow block.

<!-- PowerForge markdown artifact sha256:21ED27524804E286897067C7E71720ED8397458090E4455EC0B6B6556BB9FF70 -->
