Share via


FlowDocument.ColumnRuleWidth 屬性

定義

取得或設定欄尺規寬度。

public:
 property double ColumnRuleWidth { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public double ColumnRuleWidth { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)>]
member this.ColumnRuleWidth : double with get, set
Public Property ColumnRuleWidth As Double

屬性值

欄尺規寬度 (以與裝置無關的像素為單位)。 預設值為 0.0。

屬性

範例

下列範例示範如何以程式設計方式設定 ColumnRuleWidth 屬性。

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

備註

資料行規則是在資料行之間繪製的線條,可用來以視覺化方式分隔內容的資料行。

如果 屬性為 null ,這個 ColumnRuleBrush 屬性就不會有任何作用。

只有在有兩個或多個資料行時,才會顯示資料行規則。 資料行規則寬度限制為小於或等於 ColumnGap

XAML Attribute Usage

<object ColumnRuleWidth="double"/>  
- or -  
<object ColumnRuleWidth="qualifiedDouble"/>  

XAML 值

double
Double

值等於或大於 0.0 但小於 Double.PositiveInfinityDouble 字串表示。 不合格的值是以裝置獨立圖元來測量。 字串不需要明確包含小數點。

qualifiedDouble
如上所述的 雙精度 浮點數,後面接著下列其中一個單位規範: px 、、 incmpt

px (預設) 是裝置獨立單位 (,每個單位 1/96 英吋)

in 為英吋;1in==96px

cm 為公分;1cm== (96/2.54) px

pt 為點;1pt== (96/72) px

相依性屬性資訊

識別碼欄位 ColumnRuleWidthProperty
設定為 的中繼資料屬性 true AffectsRender

適用於

另請參閱