private void DoDrop(IDataObject data, PresetManagerColumnViewModel target, bool moveAfter)
        {
            layoutListDragPreview.Hide();

            if (data.TryGetArray(out PresetManagerColumnViewModel[] toMove))
            {
                viewModel.Move(toMove, target, moveAfter);
            }
            else if (data.TryGetArray(out ColumnViewModelPreset[] toAdd))
            {
                viewModel.Add(toAdd, target, moveAfter);
            }
        }
        private bool CanDrop(IDataObject data, PresetManagerColumnViewModel target, bool moveAfter)
        {
            if (data.TryGetArray(out ColumnViewModelPreset[] toAdd))
            {
                return(true);
            }

            if (data.TryGetArray(out PresetManagerColumnViewModel[] toMove))
            {
                return(viewModel.CanMove(toMove, target, moveAfter));
            }

            return(false);
        }
        public PresetManagerViewModel(AsyncDataViewModel advModel)
        {
            TemplateColumns = CollectionUtils.InitializeReadOnly(out templateColumns);
            PresetColumns   = CollectionUtils.InitializeReadOnly(out presetColumns);

            leftFreezableAreaSeparatorColumn = new PresetManagerColumnViewModel(
                this, PresetManagerColumnType.LeftFreezableAreaSeparator);
            rightFreezableAreaSeparatorColumn = new PresetManagerColumnViewModel(
                this, PresetManagerColumnType.RightFreezableAreaSeparator);

            PresetDropDownMenu = new HeaderDropDownMenu();
            BindingOperations.SetBinding(PresetDropDownMenu, HeaderDropDownMenu.HeaderProperty, new Binding {
                Source = this,
                Path   = new PropertyPath(MangledPresetNameProperty),
                Mode   = BindingMode.OneWay
            });

            AdvViewModel       = advModel;
            IsDialogStateDirty = false;
            isApplyingChanges  = false;
        }