mouseleftbuttonup

WPF MouseLeftButtonUp Not Firing

萝らか妹 提交于 2019-11-27 16:02:58
Strange happenings in WPF... When I set the event to MouseUp I can get it to fire when I right-click the button. But this won't fire with either click! <Button MouseLeftButtonUp="btnNewConfig_MouseUp" Name="btnNewConfig"> <StackPanel Orientation="Horizontal"> <Image Source="Icons\new.ico" Height="24" Width="24" Margin="5"/> <TextBlock VerticalAlignment="Center">New</TextBlock> </StackPanel> </Button> I know this is most likely something simple. Thanks for the help! Looks like Button control is eating up that event Since Button.Click is actually a combination of LeftButtonDown event and

WPF MouseLeftButtonUp Not Firing

心已入冬 提交于 2019-11-26 17:23:19
问题 Strange happenings in WPF... When I set the event to MouseUp I can get it to fire when I right-click the button. But this won't fire with either click! <Button MouseLeftButtonUp="btnNewConfig_MouseUp" Name="btnNewConfig"> <StackPanel Orientation="Horizontal"> <Image Source="Icons\new.ico" Height="24" Width="24" Margin="5"/> <TextBlock VerticalAlignment="Center">New</TextBlock> </StackPanel> </Button> I know this is most likely something simple. Thanks for the help! 回答1: Looks like Button