Can i set a mouselistener (Clicked) in WPF?
+1
A:
If te user clicked where? If you have a button(or window or pretty much anything else) you simpy add the MouseDown() eventhandler....
sklitzz
2010-01-19 08:14:39
+2
A:
Simple,
- Just a Click attribute to your xaml control
- Assign it a handler
- Define the handler in your xaml.cs
In your xaml,
<Button Click="Button_Click"></Button>
In your xaml.cs,
private void Button_Click(object sender, RoutedEventArgs e)
{
//What should be done when you click the control
}
There are loads of mouse events available. Check MSDN for the list of mouse events supported in WPF
sudarsanyes
2010-01-19 08:49:33