开发者

Where does "Non-Click" Behaviour fit into a MVVM Application?

开发者 https://www.devze.com 2023-01-19 04:57 出处:网络
I can expose ICommands from my ViewModels but where does Non-Click/Command behaviour fit开发者_StackOverflow社区 into a MVVM Application? eg. Drag & Drop, Hover etcHave a look at this post:

I can expose ICommands from my ViewModels but where does Non-Click/Command behaviour fit开发者_StackOverflow社区 into a MVVM Application? eg. Drag & Drop, Hover etc


Have a look at this post:

http://blogs.imeta.co.uk/jyoung/archive/2009/07/21/728.aspx

Shows how you can still use the MVVM pattern effectively for "Non-Click / Command" behaviour such as drag / drop.


I would place them in the code-behind because this is UI behaviour, I don't know if it's "right" but I think you shouldn't overcomplicate such easy things.

0

精彩评论

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