Question about ViewModel Management (DesignTime Vs Run Time)

前端 未结 3 998
庸人自扰
庸人自扰 2020-12-31 13:42

I have a fairly basic WPF UI whereby user requests cause a new tab to open in my TabControl. The TabControl is bound to an ObservableCollection

3条回答
  •  借酒劲吻你
    2020-12-31 14:31

    The built in MS stuff is not bad, but another more elegant and structurally sound alternative which I am busy incorporating in my project is: http://msdn.microsoft.com/en-us/magazine/dn169081.aspx

    Basically, you use the MVVM Light toolkit with the SimpleIoc container it comes with and end up with the ability to serve up data for the following three scenarios:

    Design time, Run time, and Test time.

    Better still, the whole point of MVVM Light is to have your stuff be directly editable in Blend and there is a whole series of videos and blogs and sample apps describing it all. I wish I had found these earlier in my WPF explorations.

提交回复
热议问题