FlowDocument.ColumnRuleBrush 属性

定义

获取或设置用于绘制列之间标尺的 Brush

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

属性值

Brush

Brush(用于绘制列之间的标尺线),或 null(不使用背景画笔)。 默认值为 null

示例

以下示例演示如何以编程方式设置 ColumnRuleBrush 属性。

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

注解

列规则是在列之间绘制的线条,用于直观地分隔内容列。

有关显示可用预定义画笔颜色的表,请参阅 Brushes

如果属性为 0 或 null,则ColumnRuleWidth此属性无效。

仅当有两列或更多列时,才会显示列规则。

依赖项属性信息

标识符字段 ColumnRuleBrushProperty
元数据属性设置为 true AffectsRender

适用于

另请参阅