TableCell.BorderBrush Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a Brush to use when painting the element's border.
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
Property Value
The brush used to apply to the element's border.
The default value is a null brush.
Examples
The following example shows how to set the BorderBrush attribute of a Block element (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>
The following figure shows how this example renders.
The following example shows how to set the BorderBrush property programmatically.
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)
Remarks
For a table of swatches that show the available pre-defined brush colors, see Brushes.
Dependency Property Information
Identifier field | BorderBrushProperty |
Metadata properties set to true |
AffectsRender |
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기