public void Load(object sender, ExecuteEventArgs e) { var tag = e.TriggerSource.Tag.ToString(); int id = 0; if (!string.IsNullOrEmpty(tag)) { id = int.Parse(tag); } DoRefresh("GetList", id); }
public void ProcessItemsExecute(object sender, ExecuteEventArgs e) { // copy selected items to known list type var listBox = ((System.Windows.Controls.Control)e.TriggerSource).Tag as System.Windows.Controls.ListBox; var selection = new List <Data>(); foreach (var item in listBox.SelectedItems) { selection.Add((Data)item); } // process selection var form = new DetailPage(); var vm = form.Resources["ViewModel"] as DetailModel; if (vm != null) { vm.SelectedItems = selection; } MainPageModel.ShowForm(form); }
public void ShowItem(object sender, ExecuteEventArgs e) { SelectedData = (Data)e.MethodParameter; }