public ViewStartController() : base() { Model = new ViewStartModel(); }
public ViewStartController() { Model = new ViewStartModel(); DoSomething = str => { AyMessageBox.Show("Action方式 " + str.ToString()); }; SomeCommand = new SimpleCommand { ExecuteDelegate = obj => { AyMessageBox.Show("ICommand方式 " + obj.ToString()); } }; SubmitCommand = new SimpleCommand { ExecuteDelegate = obj => { AyMessageBox.Show("提交成功,你提交的数据是: " + obj.ToString()); }, CanExecuteDelegate = x => { if (x.ToObjectString().IsNullAndTrimAndEmpty()) { return(false); } else { return(true); } } }; //演示绑定多个操作 Multy1Command = new SimpleCommand { ExecuteDelegate = obj => { Model.TextBoxStatus = "Multy1 触发了"; } }; Multy2Command = new SimpleCommand { ExecuteDelegate = obj => { Model.TextBoxStatus = "Multy2触发了"; } }; Multy3Action = x => { Model.TextBoxStatus = "Multy3操作 触发了"; }; }