How can I make a richtextbox with a dotted border
I tried something like this:
<Border Width="100" Height="100" Background="White" BorderThickness="1,1,1,1">
<RichTextBox Name="richTextBox1" />
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,.1" SpreadMethod="Repeat" >
<GradientStopCollection>
<GradientStop Color="Transparent" Offset="0" />
<GradientStop Color="Transparent" Offset="0.2" />
<GradientStop Color="Red" Offset="0.2" />
<GradientStop Color="Red" Offset="0.4" />
<GradientStop Color="Transparent" Offset="0.4" />
<GradientStop Color="Transparent" Offset="0.6" />
<GradientStop Color="Red" Offset="0.6" />
<GradientStop Color="Red" Offset="0.8" />
<GradientStop Color="Transparent" Offset="0.8" />
<GradientStop Color="Transparent" Offset="0.9" />
<GradientStop Color="Red" Offset="0.9" />
<GradientStop Color="Red" Offset="1" />
</GradientStopCollection>
</LinearGradientBrush>
</Border.BorderBrush>
</Border>
but that only works for left/right or top/bottom
(sorry for my bad english)
Try this:
Is a bit of a hack, maybe you can create a style with this so you can override the RichTextBox borders too.