// if many action controls are opened, click on an action will make its control appears on top private void ActionButton_Click(object sender, RoutedEventArgs e) { ActionGUI actionGUI = ActionsListView.SelectedItem as ActionGUI; UserControlGrid.Children.Remove(actionGUI.Control); UserControlGrid.Children.Add(actionGUI.Control); }
// action GUI expand // user clicks expand button on an action, a control will be display to received arguments private void ExpandButton_Click(object sender, RoutedEventArgs e) { try { ActionGUI actionGUI = ActionsListView.SelectedItem as ActionGUI; int result = actionGUI.ShowControlToGetArgument(); } catch (Exception ex) { MessageBox.Show(ex.Message); Log.Error("ExpandButton_Click: " + ex.Message); } }