New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class ParagraphBorders

Inheritance: objectParagraphBorders

Constructors

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

C#
public ParagraphBorders()

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

C#
public ParagraphBorders(Border leftBorder, Border topBorder, Border rightBorder, Border bottomBorder, Border between)
Parameters:leftBorderBorder

The left border.

topBorderBorder

The top border.

rightBorderBorder

The right border.

bottomBorderBorder

The bottom border.

betweenBorder

The between border for consecutive paragraphs with identical border settings.

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

C#
public ParagraphBorders(Border leftBorder, Border topBorder, Border rightBorder, Border bottomBorder)
Parameters:leftBorderBorder

The left border.

topBorderBorder

The top border.

rightBorderBorder

The right border.

bottomBorderBorder

The bottom border.

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

C#
public ParagraphBorders(Border all)
Parameters:allBorder

The border to apply to all sides.

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

C#
public ParagraphBorders(ParagraphBorders source, Border leftBorder = null, Border topBorder = null, Border rightBorder = null, Border bottomBorder = null, Border between = null)
Parameters:sourceParagraphBorders

The source paragraph borders to copy from.

leftBorderBorder

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

topBorderBorder

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

rightBorderBorder

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

bottomBorderBorder

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

betweenBorder

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

Methods

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

C#
public override bool Equals(object obj)
Parameters:objobject

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)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

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

C#
public ParagraphBorders SetBetween(Border between)
Parameters:betweenBorder

The between.

Returns:

ParagraphBorders

New instance of paragraph borders.

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

C#
public ParagraphBorders SetBottom(Border bottom)
Parameters:bottomBorder

The bottom.

Returns:

ParagraphBorders

New instance of paragraph borders.

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

C#
public ParagraphBorders SetLeft(Border left)
Parameters:leftBorder

The left.

Returns:

ParagraphBorders

New instance of paragraph borders.

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

C#
public ParagraphBorders SetRight(Border right)
Parameters:rightBorder

The right.

Returns:

ParagraphBorders

New instance of paragraph borders.

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

C#
public ParagraphBorders SetTop(Border top)
Parameters:topBorder

The top.

Returns:

ParagraphBorders

New instance of paragraph borders.

Operators

Determines whether the specified paragraph borders are different.

C#
public static bool operator !=(ParagraphBorders a, ParagraphBorders b)
Parameters:aParagraphBordersbParagraphBordersReturns:

bool

True if the paragraph borders are different.

Determines whether the specified paragraph borders are equal.

C#
public static bool operator ==(ParagraphBorders a, ParagraphBorders b)
Parameters:aParagraphBordersbParagraphBordersReturns:

bool

True if the paragraph borders are equal.

Properties

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

C#
public Border Between { get; }
Property Value:

The between border.

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

C#
public Border Bottom { get; }
Property Value:

The bottom border.

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

C#
public Border Left { get; }
Property Value:

The left border.

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

C#
public Border Right { get; }
Property Value:

The right border.

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

C#
public Border Top { get; }
Property Value:

The top border.