我想将鼠标直接放在元素上。在 WPF 中,我可以使用以下代码将鼠标悬停在元素上
DependencyObject el = Mouse.DirectlyOver as DependencyObject;
但鼠标在 Silverlight 中不可用。因此我使用了VisualTreeHelper
如下代码
var el = VisualTreeHelper.FindElementsInHostCoordinates(point, this.grid);
上面的代码返回集合UIElement
。但我只想要鼠标直接悬停在 WPF 中的元素上。所以请建议一种方法让鼠标直接在 Silverlight 中的元素上。