Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void ShowItem(object sender, ExecuteEventArgs e)
 {
     SelectedData = (Data)e.MethodParameter;
 }