TableCell.BorderBrush 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定要在繪製項目框線時使用的 Brush。
public:
property System::Windows::Media::Brush ^ BorderBrush { System::Windows::Media::Brush ^ get(); void set(System::Windows::Media::Brush ^ value); };
public System.Windows.Media.Brush BorderBrush { get; set; }
member this.BorderBrush : System.Windows.Media.Brush with get, set
Public Property BorderBrush As Brush
屬性值
用來套用至項目框線的筆刷。
預設值為 Null 筆刷。
範例
下列範例示範如何設定 BorderBrush 專案的屬性 Block (Paragraph) 。
<FlowDocument>
<Paragraph Name="par"
BorderBrush="Blue"
BorderThickness="0.25in"
>
<Run>
Child elements in this Block element (Paragraph) will be surrounded by a blue border.
</Run>
<LineBreak/><LineBreak/>
<Run>
This border will be one quarter inch thick in all directions.
</Run>
</Paragraph>
</FlowDocument>
下圖顯示此範例的轉譯方式。
下列範例示範如何以程式設計方式設定 BorderBrush 屬性。
Paragraph par = new Paragraph();
Run run1 = new Run("Child elements in this Block element (Paragraph) will be surrounded by a blue border.");
Run run2 = new Run("This border will be one quarter inch thick in all directions.");
par.Inlines.Add(run1);
par.Inlines.Add(run2);
par.BorderBrush = Brushes.Blue;
ThicknessConverter tc = new ThicknessConverter();
par.BorderThickness = (Thickness)tc.ConvertFromString("0.25in");
Dim par As New Paragraph()
Dim run1 As New Run("Child elements in this Block element (Paragraph) will be surrounded by a blue border.")
Dim run2 As New Run("This border will be one quarter inch thick in all directions.")
par.Inlines.Add(run1)
par.Inlines.Add(run2)
par.BorderBrush = Brushes.Blue
Dim tc As New ThicknessConverter()
par.BorderThickness = CType(tc.ConvertFromString("0.25in"), Thickness)
備註
如需顯示可用預先定義筆刷色彩的表格,請參閱 Brushes 。
相依性屬性資訊
識別碼欄位 | BorderBrushProperty |
設定為 的中繼資料屬性 true |
AffectsRender |