Border样式

分段线 BorderStyle_Segment

<Border BorderBrush="{StaticResource BorderStyle_Segment}" BorderThickness="1"/>

<DrawingBrush x:Key="BorderStyle_Segment" Viewport="0,0,8,8" ViewportUnits="Absolute" TileMode="Tile">
    <DrawingBrush.Drawing>
        <DrawingGroup>
            <GeometryDrawing Brush="Black">
                <GeometryDrawing.Geometry>
                    <GeometryGroup>
                        <RectangleGeometry Rect="0,0,50,50"/>
                        <RectangleGeometry Rect="50,50,50,50"/>
                    </GeometryGroup>
                </GeometryDrawing.Geometry>
            </GeometryDrawing>
        </DrawingGroup>
    </DrawingBrush.Drawing>
</DrawingBrush>

圆角

<Border BorderThickness="1" Background="White" CornerRadius="5">
    <Grid Margin="5">
    </Grid>
</Border>
posted @ 2020-08-19 14:04  wesson2019  阅读(150)  评论(0编辑  收藏  举报