wpf中的路径图

时间:2011-07-31 06:58:04

标签: wpf pathgeometry

点击路径后如何获取准确的Pathfigure实例?我的路径有多个pathFigures。我有以下Xaml代码:

    <Path Stroke="Black">
        <Path.Data>
            <PathGeometry>
                <PathFigure StartPoint="5,5">
                    <LineSegment Point="10,10"/>
                    <LineSegment Point="20,60"/>
                    <LineSegment Point="70,90"/>
                </PathFigure>
                <PathFigure StartPoint="20,60">
                    <LineSegment Point="30,20"/>
                    <LineSegment Point="40,70"/>
                    <LineSegment Point="70,80"/>
                </PathFigure>
            </PathGeometry>
        </Path.Data>
    </Path>

1 个答案:

答案 0 :(得分:3)