Class
ParagraphBorders

Defines an immutable set of borders (top, bottom, left, right, between) for paragraph elements, controlling border appearance and spacing between paragraphs with identical border settings.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Styles

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

cs-api-definition
public class ParagraphBorders

Inheritance: objectParagraphBorders

Constructors

ParagraphBorders()

Initializes a new instance of the ParagraphBorders class with all borders set to the default border style.

Declaration

cs-api-definition
public ParagraphBorders()

ParagraphBorders(Border)

Initializes a new instance of the ParagraphBorders class with the same border applied to all sides (top, bottom, left, right, between).

Declaration

cs-api-definition
public ParagraphBorders(Border all)

Parameters

all

Border

The border to apply to all sides.

ParagraphBorders(Border, Border, Border, Border)

Initializes a new instance of the ParagraphBorders class with individually specified borders for each side, using the default border for the between setting.

Declaration

cs-api-definition
public ParagraphBorders(Border leftBorder, Border topBorder, Border rightBorder, Border bottomBorder)

Parameters

leftBorder

Border

The left border.

topBorder

Border

The top border.

rightBorder

Border

The right border.

bottomBorder

Border

The bottom border.

ParagraphBorders(Border, Border, Border, Border, Border)

Initializes a new instance of the ParagraphBorders class with full control over all borders, including the between border for consecutive paragraphs.

Declaration

cs-api-definition
public ParagraphBorders(Border leftBorder, Border topBorder, Border rightBorder, Border bottomBorder, Border between)

Parameters

leftBorder

Border

The left border.

topBorder

Border

The top border.

rightBorder

Border

The right border.

bottomBorder

Border

The bottom border.

between

Border

The between border for consecutive paragraphs with identical border settings.

ParagraphBorders(ParagraphBorders, Border, Border, Border, Border, Border)

Initializes a new instance of the ParagraphBorders class by copying from a source instance and selectively replacing specified borders while preserving others.

Declaration

cs-api-definition
public ParagraphBorders(ParagraphBorders source, Border leftBorder = null, Border topBorder = null, Border rightBorder = null, Border bottomBorder = null, Border between = null)

Parameters

source

ParagraphBorders

The source paragraph borders to copy from.

leftBorder

Border

The left border to replace, or null to preserve the source value.

topBorder

Border

The top border to replace, or null to preserve the source value.

rightBorder

Border

The right border to replace, or null to preserve the source value.

bottomBorder

Border

The bottom border to replace, or null to preserve the source value.

between

Border

The between border to replace, or null to preserve the source value.

Properties

Between

Gets the border displayed between consecutive paragraphs that share identical border settings, replacing individual top/bottom borders for visual continuity.

Declaration

cs-api-definition
public Border Between { get; }

Property Value

Border

The between border.

Bottom

Gets the border displayed at the bottom edge of the paragraph.

Declaration

cs-api-definition
public Border Bottom { get; }

Property Value

Border

The bottom border.

Left

Gets the border displayed at the left edge of the paragraph.

Declaration

cs-api-definition
public Border Left { get; }

Property Value

Border

The left border.

Right

Gets the border displayed at the right edge of the paragraph.

Declaration

cs-api-definition
public Border Right { get; }

Property Value

Border

The right border.

Top

Gets the border displayed at the top edge of the paragraph.

Declaration

cs-api-definition
public Border Top { get; }

Property Value

Border

The top border.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

Returns true if the specified object is equal to the current object; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

SetBetween(Border)

Creates a new paragraph borders instance with the specified between border, preserving all other borders from the current instance.

Declaration

cs-api-definition
public ParagraphBorders SetBetween(Border between)

Parameters

between

Border

The between.

Returns

ParagraphBorders

New instance of paragraph borders.

SetBottom(Border)

Creates a new paragraph borders instance with the specified bottom border, preserving all other borders from the current instance.

Declaration

cs-api-definition
public ParagraphBorders SetBottom(Border bottom)

Parameters

bottom

Border

The bottom.

Returns

ParagraphBorders

New instance of paragraph borders.

SetLeft(Border)

Creates a new paragraph borders instance with the specified left border, preserving all other borders from the current instance.

Declaration

cs-api-definition
public ParagraphBorders SetLeft(Border left)

Parameters

left

Border

The left.

Returns

ParagraphBorders

New instance of paragraph borders.

SetRight(Border)

Creates a new paragraph borders instance with the specified right border, preserving all other borders from the current instance.

Declaration

cs-api-definition
public ParagraphBorders SetRight(Border right)

Parameters

right

Border

The right.

Returns

ParagraphBorders

New instance of paragraph borders.

SetTop(Border)

Creates a new paragraph borders instance with the specified top border, preserving all other borders from the current instance.

Declaration

cs-api-definition
public ParagraphBorders SetTop(Border top)

Parameters

top

Border

The top.

Returns

ParagraphBorders

New instance of paragraph borders.

Operators

operator !=(ParagraphBorders, ParagraphBorders)

Determines whether the specified paragraph borders are different.

Declaration

cs-api-definition
public static bool operator !=(ParagraphBorders a, ParagraphBorders b)

Parameters

a

ParagraphBorders

b

ParagraphBorders

Returns

bool

True if the paragraph borders are different.

operator ==(ParagraphBorders, ParagraphBorders)

Determines whether the specified paragraph borders are equal.

Declaration

cs-api-definition
public static bool operator ==(ParagraphBorders a, ParagraphBorders b)

Parameters

a

ParagraphBorders

b

ParagraphBorders

Returns

bool

True if the paragraph borders are equal.