elmish / Elmish.WPF

Static WPF views for elmish programs
Other
430 stars 71 forks source link

Q: How to bind to [mouse] events? #199

Closed KingKnecht closed 4 years ago

KingKnecht commented 4 years ago

Hi,

I'm tyring to write some drawing application. Of course I would need to handle mouse events (move, button down, button up etc) in my message loop. I have already discovered this issue https://github.com/elmish/Elmish.WPF/issues/33 with the awesome Fable example

How would I do that in Elmish.WPF? From the issue mentioned, it's not clear for me how to accomplish that. It would be ok for me to write my own Canvas which provides commands instead of events. Is that the way to go or is there another/better solution? Thx.

cmeeren commented 4 years ago

Check out the bottom of the readme which points to the EventBindingsAndBehaviors sample. Let me know if you still have questions. :)

TysonMN commented 4 years ago

Hello @KingKnecht. I asked a related question in #191. I have learned somethings since then, so I just updated that issue with some more information. Like @cmeeren said, let us know if you have any questions.