[WPF] Position souris Image
Bonsoir a tous,
je cherche a connaitre la position de la souris dans un contrôle Image.
La position relative dans le contrôle.
Code:
1 2 3 4 5 6 7 8 9
| private void Test_MouseMove(object sender, MouseEventArgs e)
{
Image Im = sender as Image;
Double Height = Im.Height;
Double Width = Im.Width;
Point p = new Point();
Im.PointFromScreen(p);
this.Button_Connect.Content = Convert.ToString(p.X) + " - " + Convert.ToString(p.Y);
} |
Cependant j'ai toujours 0 - 0 ...
Avez-vous une idées ?
Cordialement,
NeoKript