MVVM – Simple Generic<T> Event Commands With Attached Properties(www.deanchalk.me.uk)

submitted by ButtonChromeButtonChrome(230) 1 year, 6 months ago

One of the challenges of MVVM is to favour command bindings over handling routed events, as currently all event handling must happen in the ‘code behind’ file rather than the ViewModel – which breaks the pattern. There are many elaborate and highly engineered strategies that I have seen to solve this, but maybe we could use a simple attached property implementation to achieve the desired effect. Also, WPF bindings (including command bindings) don't support generics, but maybe we could use type inference to create a generic implementation.

add a comment |category: |Views: 81

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story