有代码有J8:
UI
VM:DelegateCommand<ListBox> _SelectionChangedCmd = null; public DelegateCommand<ListBox> SelectionChangedCmd { get { if (this._SelectionChangedCmd == null) { this._SelectionChangedCmd = new DelegateCommand<ListBox>(SelectionChanged); } return this._SelectionChangedCmd; } } void SelectionChanged(ListBox lst) { SelectedUser = lst.SelectedItem as User; } //这个就是选中项啦。User是自定义类 public User SelectedUser { get; set; }