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:
public class ParagraphBorders
Inheritance: objectParagraphBorders
Constructors
Initializes a new instance of the ParagraphBorders class with all borders set to the default border style.
public ParagraphBorders()
Initializes a new instance of the ParagraphBorders class with full control over all borders, including the between border for consecutive paragraphs.
public ParagraphBorders(Border leftBorder, Border topBorder, Border rightBorder, Border bottomBorder, Border between)
The left border.
topBorderBorderThe top border.
rightBorderBorderThe right border.
bottomBorderBorderThe bottom border.
betweenBorderThe 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.
Initializes a new instance of the ParagraphBorders class with the same border applied to all sides (top, bottom, left, right, between).
Initializes a new instance of the ParagraphBorders class by copying from a source instance and selectively replacing specified borders while preserving others.
public ParagraphBorders(ParagraphBorders source, Border leftBorder = null, Border topBorder = null, Border rightBorder = null, Border bottomBorder = null, Border between = null)
The source paragraph borders to copy from.
leftBorderBorderThe left border to replace, or null to preserve the source value.
topBorderBorderThe top border to replace, or null to preserve the source value.
rightBorderBorderThe right border to replace, or null to preserve the source value.
bottomBorderBorderThe bottom border to replace, or null to preserve the source value.
betweenBorderThe between border to replace, or null to preserve the source value.
Methods
Creates a new paragraph borders instance with the specified between border, preserving all other borders from the current instance.
public ParagraphBorders SetBetween(Border between)
The between.
Returns:New instance of paragraph borders.
Creates a new paragraph borders instance with the specified bottom border, preserving all other borders from the current instance.
public ParagraphBorders SetBottom(Border bottom)
The bottom.
Returns:New instance of paragraph borders.
Creates a new paragraph borders instance with the specified left border, preserving all other borders from the current instance.
public ParagraphBorders SetLeft(Border left)
The left.
Returns:New instance of paragraph borders.
Creates a new paragraph borders instance with the specified right border, preserving all other borders from the current instance.
public ParagraphBorders SetRight(Border right)
The right.
Returns:New instance of paragraph borders.
Creates a new paragraph borders instance with the specified top border, preserving all other borders from the current instance.
public ParagraphBorders SetTop(Border top)
The top.
Returns:New instance of paragraph borders.
Operators
Determines whether the specified paragraph borders are different.
public static bool operator !=(ParagraphBorders a, ParagraphBorders b)
True if the paragraph borders are different.
Determines whether the specified paragraph borders are equal.
public static bool operator ==(ParagraphBorders a, ParagraphBorders b)
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.
public Border Between { get; }
The between border.
Gets the border displayed at the bottom edge of the paragraph.
public Border Bottom { get; }
The bottom border.
Gets the border displayed at the left edge of the paragraph.
public Border Left { get; }
The left border.
Gets the border displayed at the right edge of the paragraph.
public Border Right { get; }
The right border.