开发者

MouseLeftButtonDown is not getting fired

开发者 https://www.devze.com 2023-01-14 07:53 出处:网络
I have a WPF user control that is dervied from UserControl class. MouseLeftButtonDown is not getting fired at all for the contol. I added event handler and also tried as follows.

I have a WPF user control that is dervied from UserControl class. MouseLeftButtonDown is not getting fired at all for the contol. I added event handler and also tried as follows. I guess it is handled somewhere else, how to debug and find where is it getting hanlded.. Any help is appreciated!

protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e开发者_StackOverflow)
{
    base.OnMouseLeftButtonDown(e); 
} 


Did you have the Background of the UserControl set to something? If not, try setting it to "Background=Transparent" and see if that works. If it doesn't work, can you post the XAML for your UserControl, as well as the XAML for its usage?

0

精彩评论

暂无评论...
验证码 换一张
取 消