随笔分类 - MVVM
摘要:http://forums.silverlight.net/forums/p/199477/466291.aspx
阅读全文
posted @ 2011-05-11 09:27
fannet
摘要:先根元素设置名称 x:Name="ucOrderInfoView" ,然后可直接引用元素绑定Command="{Binding ElementName=ucOrderInfoView,Path=DataContext.PrintsCommand}"绑定字符串格式{Binding Total, StringFormat='Total: {0}'}
阅读全文
posted @ 2011-05-11 09:25
fannet
摘要:public class ViewModel : INotifyPropertyChanged{ private Item _selectedItem; public ViewModel() { Items = new ObservableCollection<Item>() { new Item {Name = "Foo"}, new Item {Name = "Bar"} }; foreach ( Item anItem in Items { anItem.PropertyChanged += OnItemIsSelectedChange
阅读全文
posted @ 2011-04-19 23:56
fannet

浙公网安备 33010602011771号