The viewmodel becomes wholly responsible for the model in this scenario. Fortunately, it's not alone
在本场景中视图模型完全为模型负责,幸运的是,它并不孤单
The viewmodel exposes not only models, but other properties (such as state information, like the "is busy" indicator) and commands
视图模型不仅暴露模型,还有属性(比如状态信息,就像“isbusy”指示符)和命令。
The ViewModel can interact with View through its interface.
ViewModel可以通过它的接口与View交互。
It implements the Model - ViewModel - View - Controller pattern that seems to be popular in WPF.
它实现了模型-视图模型-视图-控制器这个看起来在WPF中很流行的模式。
This article explores how to use the ViewModel pattern to make it easier to work with the TreeView control in WPF.
这篇文章探讨了如何通过使用ViewModel模式来更容易的使用WPF中的TreeView控件。
This property has nothing to do with a "person", but is simply a state used to synchronize the View with the ViewModel.
这个属性跟一个“person ”没有任何关系,而是一个简单的用于同步view和ViewModel的状态标识。
Also, the Controller class has a dynamic property ViewModel offering better access to the ViewData dictionary like in this example based on the previous one.
此外,Controller类也有一个动态属性ViewModel,可以更好地访问ViewData字典,如下代码所示(基于上面的代码)。
Dynamic View and ViewModel Properties - Views have a new dynamic View property offering simple access to the ViewData object. An example would look like this.
动态视图与ViewModel属性:视图将拥有一个新的动态View属性,可以访问ViewData对象。
Dynamic View and ViewModel Properties - Views have a new dynamic View property offering simple access to the ViewData object. An example would look like this.
动态视图与ViewModel属性:视图将拥有一个新的动态View属性,可以访问ViewData对象。
应用推荐