FlowDocument.ColumnRuleBrush Property

Gets or sets the Brush used to draw the rule between columns.

Namespace: System.Windows.Documents
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public Brush ColumnRuleBrush { get; set; }
/** @property */
public Brush get_ColumnRuleBrush ()

/** @property */
public void set_ColumnRuleBrush (Brush value)

public function get ColumnRuleBrush () : Brush

public function set ColumnRuleBrush (value : Brush)

For XAML information, see the Brush type.

Property Value

A Brush to use when drawing the rule line between columns, or null to not use a background brush. The default value of this property is null.

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 pre-defined brush colors, see Brushes.

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

Column rules are only displayed 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: