Sasa1234
Sasa1234

Reputation: 948

Image MoueUp event vs Button Click event

I have seen that many users have asked how to make a clickable image in WPF.

Image has Mouseup event. It works like Button click event as I understand.

Is there any difference in Image Mouseup event and Button click event?

Upvotes: 1

Views: 156

Answers (2)

Christian Regli
Christian Regli

Reputation: 2246

The MouseUp can happen in a different control from MouseDown. A Button can also be bound to a Command and thus separating your logic from the UI.

Upvotes: 1

Saad Abdullah
Saad Abdullah

Reputation: 2432

Mouseup event, user can click somewhere else on the screen and hold down the click button and move the pointer to Mouseup element, and then release the mouse.

Click event requires both the mousedown and mouseup event to happen.

Upvotes: 1

Related Questions