FlowDocument.ColumnRuleBrush Property

Gets or sets the Brush used to draw the rule between columns. This is a dependency property.

Namespace:  System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public Brush ColumnRuleBrush { get; set; }
For XAML information, see the Brush type.

Property Value

Type: System.Windows.Media.Brush
A Brush to use when drawing the rule line between columns, or null to not use a background brush. The default is null.

Identifier field

ColumnRuleBrushProperty

Metadata properties set to true

AffectsRender

The column rule is a line that is drawn between columns, and is used to visually separate columns of content.

For a table of swatches that show the available predefined brush colors, see Brushes.

This property has no effect if the ColumnRuleWidth property is 0 or null.

Column rules are displayed only when there are two or more columns.

The following example shows how to set the ColumnRuleBrush property programmatically.

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
// Set a column rule two pixels wide colored Dodger blue.
flowDoc.ColumnRuleWidth = 2.0;
flowDoc.ColumnRuleBrush = Brushes.DodgerBlue;

More Code

How to: Use FlowDocument Column-Separating Attributes This example shows how to use the column-separating features of a FlowDocument.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft