《WPF编程宝典》第325页说到:PathGeometry和PathGeometryDrawing都不是元素,所以不能使用这两个对象中的任何一个为窗口添加自己绘制的内容<PathGeometry>
<PathFigure IsClosed="True" StartPoint="10,100">
<LineSegment Point="100,100" />
<LineSegment Point="100,50" />
</PathFigure>
</PathGeometry>
上面这个,能说PathGeometry不是元素吗?
<PathFigure IsClosed="True" StartPoint="10,100">
<LineSegment Point="100,100" />
<LineSegment Point="100,50" />
</PathFigure>
</PathGeometry>
上面这个,能说PathGeometry不是元素吗?
这里的元素指的是"WPF中的元素",也就是UIElement,而不是XAML中的元素。