private void UserControl_PreviewGiveFeedback(object sender, GiveFeedbackEventArgs e) { GetCursorPos(ref pointRef); Point relPos = this.PointFromScreen(pointRef.GetPoint()); myAdornment.Arrange(new Rect(relPos, myAdornment.DesiredSize)); }
private void Item_PreviewGiveFeedback(object sender, GiveFeedbackEventArgs e) { GetCursorPos(ref pointRef); Point relPos = this.PointFromScreen(pointRef.GetPoint(myAdornment.CenterOffset)); myAdornment.Arrange(new Rect(relPos, myAdornment.DesiredSize)); Mouse.SetCursor(Cursors.None); e.Handled = true; }