如何将 Shapes.Path 的边缘从平坦变为圆角?

How to change the edge of Shapes.Path to rounded from flat?

我有一个 Shapes.Path,我用这样的绑定填充:

<Path Stroke=Black"
      Opacity="0.5"
      StrokeThickness="10"
      Data="{Binding Data, UpdateSourceTrigger=PropertyChanged}">
</Path>

这条路的边缘是平的。 我想把它改成圆边。

我玩过

<Style x:Key="PathStyle" TargetType="Path">

但我找不到 属性 可以让我做我想做的事。

有什么想法吗?

StrokeLineJoin 属性 设置为 Round 用于圆角,可能还设置 StrokeStartLineCapStrokeEndLineCap 用于圆角线端:

<Path StrokeLineJoin="Round"
      StrokeStartLineCap="Round"
      StrokeEndLineCap="Round"
      ... />