在WPF中,你能看到一个PathFigure的段吗?

时间:2021-04-03 14:14:54

I'm making a control that involves dragging pieces of a displayed element around. Since part of it is an arc, I have to use a PathFigure so I can use ArcSegments. I'd like to be able to know if the mouse is over a particular segment of the figure, but I don't see an obvious way to do this. Is it impossible or am I missing something?

我正在制作一个控件,涉及拖动显示元素的各个部分。由于它的一部分是弧形,我必须使用PathFigure,所以我可以使用ArcSegments。我希望能够知道鼠标是否在图的特定部分上,但我没有看到明显的方法来做到这一点。这是不可能的还是我错过了什么?

1 个解决方案

#1


the root Path object has the normal UI events for Mouse, instead of one Path with lots of Arcs you will need lots of Paths with an arc in each.

根Path对象具有Mouse的常规UI事件,而不是一个包含大量Arc的Path,您将需要许多Path,每个Path都有一个弧。

#1


the root Path object has the normal UI events for Mouse, instead of one Path with lots of Arcs you will need lots of Paths with an arc in each.

根Path对象具有Mouse的常规UI事件,而不是一个包含大量Arc的Path,您将需要许多Path,每个Path都有一个弧。