09 2017 档案
摘要:无参Command: 1 internal class DelegateCommand : ICommand 2 { 3 private readonly Action _execute; 4 private readonly Func<bool> _canExecute; 5 6 public D
阅读全文
摘要:1.已知item的DataContext,获取ListBoxItem 1)ItemContainerGenerator.ContainerFromItem var selectedItem = DocumentsControl.ItemContainerGenerator.ContainerFrom
阅读全文
摘要:列表排序 1.使用控件默认排序方式(推荐) 2.使用CollectionView排序 2.自定义SortableObservableCollection 添加列表属性,并绑定到控件 在排序触发时,添加 viewModel.Items.Sort(item => item.UpdateTime, sor
阅读全文