wpf - What should compose View with ViewModel and show result? -


i have problem of thinking ideal solution creating , showing window in wpf mvvm application. part of application needs show window data. create vm, set properties, create view, assign vm (in constructor), display window. done using class named viewcontroller , class have methods parameters every window in application. think there can better solution this, not overengineered.

the normal solution have class wraps , instantiates view viewmodel pair. called screen. this.

public class screen<tview> tview : window {      public screen(tview view, object viewmodel){          //store view , viewmodel props          //display view          //set viewmodel datacontext of view      } } 

this rough example, there lots of ways can it.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -