Edytuj

Udostępnij za pośrednictwem


FlowDocument.ColumnRuleBrush Property

Definition

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

public:
 property System::Windows::Media::Brush ^ ColumnRuleBrush { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush ColumnRuleBrush { get; set; }
member this.ColumnRuleBrush : System.Windows.Media.Brush with get, set
Public Property ColumnRuleBrush As Brush

Property Value

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

Examples

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;
Dim flowDocColRule As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
    ' Set a column rule two pixels wide colored Dodger blue.
flowDocColRule.ColumnRuleWidth = 2.0
flowDocColRule.ColumnRuleBrush = Brushes.DodgerBlue

Remarks

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.

Dependency Property Information

Identifier field ColumnRuleBrushProperty
Metadata properties set to true AffectsRender

Applies to

See also