C# 在WPF/C中绘制半圆/半圆#

C# 在WPF/C中绘制半圆/半圆#,c#,wpf,graphics,2d,geometry,C#,Wpf,Graphics,2d,Geometry,我需要在WPF中画一个半圆。你知道怎么做吗?谢谢你的提示 将是一个很好的开始 这是如何在代码中使用它的一个很好的例子。由于原始链接已失效,下面是我如何绘制圆弧的: <Canvas> <Path Stroke="Gray"> <Path.Data> <PathGeometry> <PathGeometry.Figures>

我需要在WPF中画一个半圆。你知道怎么做吗?谢谢你的提示

将是一个很好的开始


这是如何在代码中使用它的一个很好的例子。

由于原始链接已失效,下面是我如何绘制圆弧的:

<Canvas>
    <Path Stroke="Gray">
        <Path.Data>
            <PathGeometry>
                <PathGeometry.Figures>
                    <PathFigureCollection>
                        <PathFigure StartPoint="0,20">
                            <PathFigure.Segments>
                                <PathSegmentCollection>
                                    <ArcSegment Size="20, 20"
                                    IsLargeArc="True"
                                    SweepDirection="CounterClockwise"
                                    Point="40,20" />
                                </PathSegmentCollection>
                            </PathFigure.Segments>
                        </PathFigure>
                    </PathFigureCollection>
                </PathGeometry.Figures>
            </PathGeometry>
        </Path.Data>
    </Path>
</Canvas>

上面的XAML是在此处找到的XAML的修改版本:


可能是因为这一秒的链接已断开。。。请提供答案中的一些信息。