private void ExecuteRemoveDragDropCommand(DragAndDropOptionEditViewModel obj)
 {
     SelectedField.Model.DragAndDropOptions.Remove(obj.Model);
     SelectedField.DragAndDropOptions.Remove(obj);
 }
        private void ExecuteAddDragAndDropOptionCommand(object obj)
        {
            if (SelectedField != null)
            {
                var item = APQPDragAndDropConfigurationList.NewChildItem();
                if (SelectedField.DragAndDropOptions == null)
                {
                    SelectedField.DragAndDropOptions = new ObservableCollection<DragAndDropOptionEditViewModel>();
                    SelectedField.Model.DragAndDropOptions = new APQPDragAndDropConfigurationList();
                }

                var vm = new DragAndDropOptionEditViewModel(item, SelectedField, this);
                SelectedField.DragAndDropOptions.Add(vm);
                SelectedField.Model.DragAndDropOptions.Add(item);

                RaisePropertyChanged(() => SelectedField);
            }
        }
 private static bool CanExecuteRemoveDragDropCommand(DragAndDropOptionEditViewModel obj)
 {
     return true;
 }
 /// <summary>
 /// The initialize.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 /// <param name="parent">
 /// The parent.
 /// </param>
 public void Initialize(APQPDragAndDropOptionFieldEdit model, DragAndDropOptionEditViewModel parent)
 {
     Model = model;
     ParentViewModel = parent;
     this.nextSubfieldIsEnabled = parent.HasSubfields(model);
 }