Share via


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

適用於

另請參閱