I trying to understand Model to ViewModel relation and I keep bumping in the same problem. Assuming we have a "Person" class with just one field:
public class Person
{
public string Name;
}
在下一阶段,我有我的XAML艺术家,他们建立了一种能够显示一个人的用户控制,而根据MVVVER的做法,他的观点需要与VMPerson(GView-Model Person)联系起来,因此,现在我增加了另一类:
public class VMPerson : INotifyPropertyChange
{
private Person person;
public VMPerson():this(new Person()){}
public VMPerson(Person person)
{
this.person = person;
}
public Name
{ get { return person.name; }
{ set { person.name = value; PropertyChange("Name"); }
}
因此,现在我几乎全心全意,但我的考试和测验组如何与我模式类别的变化有关? 如果在模式一中添加“Name”的“Name”财产,与我的观点Model类相类似,我不需要额外一层。 是否有办法保持我的《示范公约》的类别,因为现在和现在仍要通报其内部的变化。 如果没有其他办法,则使用专利权 改变机制或类似措施将在模式中加以实施,为什么我需要证书? 只是将少数“模范”类别合并成一个类别,供人们考虑吗?
I think I must be missing something in my understanding cause it seems to me according to what I described that a Model to View pattern while using the View code-behind as a controller would be better abstraction than MVVM, but I certainly not sure about that. Can someone explain to me what I am missing? thanks.