View / ViewModel - what is the sense (in a WPF control)?

Posted by TomTom on Stack Overflow See other posts from Stack Overflow or by TomTom
Published on 2010-05-13T10:50:34Z Indexed on 2010/05/13 10:54 UTC
Read the original article Hit count: 170

Filed under:
|

Not as funny as it sounds.

Normally the View / ViewModel should decouple the presentation from the business logic.

Good.

Now, a Control in WPF is basically invisible unless made different (with the exceptions of UserControl and Window that have XAML directly attached). The Style is putting in the "visual presentation" - which basically means a Control does not need a view mechanism as WPF already has one?

In addition. the ViewModel is actually part of the Control, or?

Just fighting with that stuff. I know in ASP.NET, WinForms the separation makes a lot of sense - but there, basically, controls HAVE an intrinsic look. In WPF, I have some where it makes sense (derived from UserControl), but for the majority of the controls I write, the View & ViewModel look like pretty much totally superflous thanks to the already presenting view mechanism.

© Stack Overflow or respective owner

Related posts about wf

Related posts about mvc