wpf - MVVM - Controls versus Views -


I am doing a prototype in WPF without using MVVM. It has now been found for this type of shape that I am restructuring it to use MVVM.

When I started this project, I jumped straight straight up and made user controls for many things.

I 'm now breaking things in visual and visual models. But, I'm ending with visual controls with user controls; The user near the control now has binding for objects in the model.

So, now is the estimate of user controls which is now dead in MVVM? What I mean, in the past (WinForms, ASP.NET etc.) you will have a project called 'Controls' and these will be reuse. Is there a direct replacement of 'View' specific user credit in MVVM?

A UserControl with some tweaked default property values ​​in WPF ContentControl is slightly more than a bit of ContentControl content, on which a template can be applied to define its point of view.

The way I do MVVM, Leaves the middleman and is DataTemplate . After this you should not just touch your VMF anywhere in the WPF visual tree, and the WPF render it with your DataTemplate . For example:

  & amp; Content control content = "{some certain binding models}" /> & lt; ItemsControl ItemSource = "{some Binding Some Models}" />  

Comments