MouseLeftButtonDown not recognized by a ListBox ??
        Posted  
        
            by 
                Flo
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Flo
        
        
        
        Published on 2011-01-07T08:51:09Z
        Indexed on 
            2011/01/07
            8:53 UTC
        
        
        Read the original article
        Hit count: 368
        
Hello everybody,
I'm encountering a huge problem, I have tried everything I could, but I didn't find any solution. I have a listBox, with a DataTemplate. I want to use the events MouseLeftButtonDown and MouseLeftButtonUp to check the item selected is the same the user clicked on.
The problem is the event MouseLeftButtonUp is recognized but not the event MouseLeftButtonDown.
Part of my XAML code :
< ListBox Grid.Row="1" MouseLeftButtonDown="listBox_Faits_MouseLeftButtonDown" MouseLeftButtonUp="listBox_Faits_MouseLeftButtonUp">
The code behind :
private void listBox_Faits_MouseLeftButtonUp(object sender, MouseEventArgs e) { ... } private void listBox_Faits_MouseLeftButtonDown(object sender, MouseEventArgs e) { ... }
Is anyone know why ?
Thanks you,
Regards,
Flo
© Stack Overflow or respective owner