public PresetManagerColumnViewModel(
            PresetManagerViewModel presetManager,
            ColumnViewModelPreset preset,
            DataColumnView columnView)
        {
            if (presetManager == null)
            {
                throw new ArgumentNullException(nameof(presetManager));
            }
            if (preset == null)
            {
                throw new ArgumentNullException(nameof(preset));
            }
            if (columnView == null)
            {
                throw new ArgumentNullException(nameof(columnView));
            }

            PresetManager = presetManager;
            Preset        = preset;
            ColumnType    = PresetManagerColumnType.Configurable;

            defaultSupportedFormat = columnView.FormatProvider.DefaultSupportedFormat();
            SupportedFormats       = columnView.FormatProvider.SupportedFormats();

            RefreshFromPreset();
        }
 private PresetManagerDialog(PresetManagerViewModel viewModel)
     : this()
 {
     this.viewModel = viewModel;
     DataContext    = viewModel;
     dragBehavior   = new PresetColumnDragBehavior(this, viewModel, availableList, layoutList);
 }
        public PresetColumnDragBehavior(
            UIElement associatedObject,
            PresetManagerViewModel viewModel,
            ItemsControl availableList,
            ListBox layoutList)
        {
            AssociatedObject   = associatedObject;
            this.viewModel     = viewModel;
            this.availableList = availableList;
            this.layoutList    = layoutList;

            availableListDragEventSource.DragPrepare += OnDragPrepare;
            availableListDragEventSource.DragStart   += OnAvailableListDragStart;

            layoutListDragEventSource.DragPrepare += OnDragPrepare;
            layoutListDragEventSource.DragStart   += OnLayoutListDragStart;
            layoutListDragPreview = new ListBoxDragPreview(layoutList);
            layoutList.DragEnter += OnLayoutListDragEnter;
            layoutList.DragOver  += OnLayoutListDragOver;

            availableList.Drop += OnAvailableListDrop;
            layoutList.Drop    += OnLayoutListDrop;
        }
 public PresetManagerColumnViewModel(
     PresetManagerViewModel presetManager, PresetManagerColumnType columnType)
 {
     PresetManager = presetManager;
     ColumnType    = columnType;
 }