今天我们讲讲Xamarin中的MVVM双向绑定,嗯..需要有一定的MVVM基础.,具体什么是MVVM - -,请百度,我就不多讲了
效果如下:
?...>
<ContentPage xmlns="http://<em>xamarin</em>.com/schemas/2014/<em>forms</em>"
xmlns:x="http://schemas.microsoft.com...首先,我们会发现ContentPage的xmlns定义中多了一个local的定义.这个很重要,他是用来让我们在xaml中引用其他程序集中的类,类似于<em>Using</em>的作用....>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com...今天主要学习了Xamarin中的MVVM双向绑定和命令绑定,
需要双向绑定的类,需要继承INotifyPropertyChanged,需要绑定的命令,需要继承:ICommand
最后,列一下可以使用命令绑定的控件