示例#1
0
        private void HandleAddInstanceClick(object sender, RoutedEventArgs e)
        {
            object dataContext = ((System.Windows.Controls.Control)sender).DataContext;

            if (dataContext is ArrowElementOrIntentVm)
            {
                ArrowElementVm aevm = ((ArrowElementOrIntentVm)dataContext).ElementVm;

                ArrowElementSave arrowElementSave = aevm.Model;

                var newInstance = ArrowCommands.Self.Add.ElementInstance(arrowElementSave.Name + "Instance", arrowElementSave);

                ArrowCommands.Self.Add.MakeNewObjectUnique(ArrowState.Self.CurrentArrowElementSave, newInstance);
            }
        }
 public ArrowElementOrIntentVm(ArrowElementVm elementVm) 
     : this()
 {
     this.ElementVm = elementVm;
 }