Skip to content

A decorative element that can provide a dotted border to achieve some special effects.

cs
public class DashedBorder : Decorator

Attributes

ropertyDescriptionDefault ValueRemarks
BorderThicknessBorder Thickness
BorderDashThicknessBorder DashThickness0
PaddingPadding
CornerRadiusRound Corner
BorderBrushBorder color
BackgroundBackground color
BorderDashArrayBorder DashArray
BorderDashCapBorder dashed line cap stylePenLineCap.Flat
BorderDashOffsetBorder dash offset0

Case

xml
<hc:DashedBorder Width="100" Height="100" BorderDashThickness="2" BorderBrush="Black" BorderDashArray="3, 1" CornerRadius="0,50,0,0"/>

DashedBorder

WARNING

Pay attention when you need to set the border thickness. If the four rounded corners have the same value, please use BorderThickness, otherwise please use BorderDashThickness

Released under the MIT License.