Пример #1
0
        private void OnEditorLoaded(object sender, RoutedEventArgs e)
        {
            this.syntaxEditor.EditorPresenter.AllowDrop = true;
            DragDropManager.AddDragOverHandler(this.syntaxEditor.EditorPresenter, OnDragOver);

            DragDropManager.AddDropHandler(this.syntaxEditor.EditorPresenter, OnDrop);
        }
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(AssociatedControl, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(AssociatedControl, OnGiveFeedback);
     DragDropManager.AddDragDropCompletedHandler(AssociatedControl, OnDragDropCompleted);
     DragDropManager.AddDragOverHandler(AssociatedControl, OnDragOver);
 }
Пример #3
0
        protected virtual void Initialize()
        {
            DragDropManager.AddDragInitializeHandler(AssociatedTreeListView, OnDragInitialize, true);
            DragDropManager.AddDropHandler(AssociatedTreeListView, OnDrop, true);
            DragDropManager.AddDragOverHandler(AssociatedTreeListView, OnDragOver, true);

            AssociatedTreeListView.DataLoaded += RadTreeListView_DataLoaded;
        }
        public SelectFolderControl()
        {
            InitializeComponent();
            DragDropManager.AddDragOverHandler(treeView, OnItemDragOver);
            DragDropManager.AddDropHandler(treeView, OnDrop);

            this.AddHandler(RadTreeViewItem.DragEnterEvent, new System.Windows.DragEventHandler(OnTreeItemDragEnter));
            this.AddHandler(RadTreeViewItem.DragLeaveEvent, new System.Windows.DragEventHandler(OnTreeItemDragLeave));
        }
        protected virtual void Initialize()
        {
            DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize, true);
            DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop, true);
            DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted, true);
            DragDropManager.AddDragOverHandler(this.AssociatedObject, OnDragOver, true);

            this.AssociatedObject.DataLoaded += RadTreeListView1_DataLoaded;
        }
Пример #6
0
        public ApplicationModuleRelationView()
        {
            InitializeComponent();
            this.DataContext = ViewModel;

            DragDropManager.AddDragDropCompletedHandler(listBox1, new DragDropCompletedEventHandler(ListDropComplete), true);
            DragDropManager.AddDragDropCompletedHandler(listBox2, new DragDropCompletedEventHandler(ListDropComplete), true);
            DragDropManager.AddDragOverHandler(radGridView, new Telerik.Windows.DragDrop.DragEventHandler(ListDragOver), true);
        }
        public DigitalWalletItems()
        {
            InitializeComponent();
            DragDropManager.AddDragOverHandler(treeView, OnItemDragOver);
            DragDropManager.AddDropHandler(treeView, OnDrop);

            this.AddHandler(RadTreeViewItem.DragEnterEvent, new System.Windows.DragEventHandler(OnTreeItemDragEnter));
            this.AddHandler(RadTreeViewItem.DragLeaveEvent, new System.Windows.DragEventHandler(OnTreeItemDragLeave));
        }
Пример #8
0
        public Example()
        {
            InitializeComponent();

            DragDropManager.AddDragInitializeHandler(this.ListBox1, OnDragInitialize);
            DragDropManager.AddDragDropCompletedHandler(this.ListBox1, OnDragDropCompleted);

            DragDropManager.AddDropHandler(this.ListBox2, OnDrop);
            DragDropManager.AddDragOverHandler(this.ListBox2, OnDragOver);
        }
 //attaching new DragDropManager event handlers
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.SetAllowDrag(this.AssociatedObject, true);
     DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
     DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop);
     DragDropManager.AddPreviewDropHandler(this.AssociatedObject, OnDrop);
     DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted);
     DragDropManager.AddDragOverHandler(this.AssociatedObject, OnDragOver);
 }
Пример #10
0
        private void InitializeRowDragAndDrop(GridViewRow row)
        {
            if (row == null)
            {
                return;
            }

            DragDropManager.RemoveDragOverHandler(row, OnRowDragOver);
            DragDropManager.AddDragOverHandler(row, OnRowDragOver);
        }
Пример #11
0
        public MainPage()
        {
            InitializeComponent();
            MainViewModel viewModelData = new MainViewModel();

            this.xLocalMachineTree.ItemsSource = viewModelData.LocalMachinePartitions;
            this.xApplicationTree.ItemsSource  = viewModelData.Applications;

            DragDropManager.AddDragOverHandler(this.xLocalMachineTree, OnLocalMachineTreeDragOver, true);
            DragDropManager.AddDragOverHandler(this.xApplicationTree, OnApplicationTreeDragOver, true);
            DragDropManager.AddDropHandler(this.xApplicationTree, OnApplicationTreeDrop, true);
        }
Пример #12
0
        private void InitializeDragAndDrop()
        {
            DragDropManager.RemoveDragInitializeHandler(this, new DragInitializeEventHandler(this.OnDragInitialized));
            DragDropManager.RemoveDragOverHandler(this, new Telerik.Windows.DragDrop.DragEventHandler(this.OnDragOver));
            DragDropManager.RemoveDragDropCompletedHandler(this, new Telerik.Windows.DragDrop.DragDropCompletedEventHandler(this.OnElementDragDropCompleted));
            DragDropManager.RemoveDropHandler(this, new Telerik.Windows.DragDrop.DragEventHandler(this.OnDropCompleted));
            DragDropManager.RemoveGiveFeedbackHandler(this, new Telerik.Windows.DragDrop.GiveFeedbackEventHandler(this.OnGiveFeedback));

            DragDropManager.AddDragInitializeHandler(this, new DragInitializeEventHandler(this.OnDragInitialized));
            DragDropManager.AddDragOverHandler(this, new Telerik.Windows.DragDrop.DragEventHandler(this.OnDragOver));
            DragDropManager.AddDragDropCompletedHandler(this, new Telerik.Windows.DragDrop.DragDropCompletedEventHandler(this.OnElementDragDropCompleted));
            DragDropManager.AddDropHandler(this, new Telerik.Windows.DragDrop.DragEventHandler(this.OnDropCompleted));
            DragDropManager.AddGiveFeedbackHandler(this, new Telerik.Windows.DragDrop.GiveFeedbackEventHandler(this.OnGiveFeedback));
        }
Пример #13
0
        public MainWindow()
        {
            InitializeComponent();

            // Set the items source of the controls:
            allProductsView.ItemsSource = CategoryViewModel.Generate();

            IList wishlistSource = new ObservableCollection <ProductViewModel>();

            foreach (ProductViewModel product in ProductViewModel.Generate(6))
            {
                wishlistSource.Add(product);
            }
            wishlistView.ItemsSource = wishlistSource;

            DragDropManager.AddDragOverHandler(allProductsView, OnItemDragOver);
            DragDropManager.AddDropHandler(allProductsView, OnDrop);
        }
Пример #14
0
        public MainWindow()
        {
            InitializeComponent();


            // Set the items source of the controls:
            //allProductsView.ItemsSource = null;
            //allProductsView.ItemsSource = CategoryViewModel.Generate();

            //var Background = new BackgroundWorkerTest();
            IList wishlistSource = new ObservableCollection <ProductViewModel>();

            wishlistView.ItemsSource = wishlistSource;


            DragDropManager.AddDragOverHandler(allProductsView, OnItemDragOver);
            DragDropManager.AddDropHandler(allProductsView, OnDrop);
        }
Пример #15
0
        static DragDropManagerUtilities()
        {
            rootVisual = App.Current.MainWindow;

            arrowVisual                 = new ArrowShape();
            arrowVisual.HeadHeight      = 10;
            arrowVisual.HeadWidth       = 10;
            arrowVisual.Stroke          = Brushes.RoyalBlue;
            arrowVisual.StrokeThickness = 3;

            arrowContainer = new Popup();
            arrowContainer.AllowsTransparency = true;
            arrowContainer.AllowDrop          = true;
            arrowContainer.IsHitTestVisible   = false;
            arrowContainer.Placement          = PlacementMode.Relative;
            arrowContainer.PlacementTarget    = rootVisual;
            arrowContainer.Child = arrowVisual;

            DragDropManager.AddDragOverHandler(rootVisual, OnWindowDragOver, true);
        }
Пример #16
0
        /// <summary>
        /// Initialize control
        /// </summary>
        public FileStructureControl()
        {
            InitializeComponent();

            stackService                     = CommonServiceLocator.ServiceLocator.Current.GetInstance <IStackService>();
            fielStructureService             = CommonServiceLocator.ServiceLocator.Current.GetInstance <IFileStructureService>();
            fileStructureDocumentPathService = CommonServiceLocator.ServiceLocator.Current.GetInstance <IFileStructureDocumentPathService>();

            // Subscribe to preview drop event
            DragDropManager.AddPreviewDropHandler(directoryTreeView, new Telerik.Windows.DragDrop.DragEventHandler(OnPreviewDrop), true);
            DragDropManager.AddDragOverHandler(directoryTreeView, new Telerik.Windows.DragDrop.DragEventHandler(OnDragOver), true);
            DragDropManager.AddDropHandler(directoryTreeView, new Telerik.Windows.DragDrop.DragEventHandler(OnDrop), true);
            DragDropManager.AddDragInitializeHandler(directoryTreeView, new Telerik.Windows.DragDrop.DragInitializeEventHandler(OnDraginitialize), true);

            EventManager.RegisterClassHandler(typeof(RadTreeViewItem), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnTreeViewItemMouseDown), false);

            if (localizationService == null)
            {
                localizationService = CommonServiceLocator.ServiceLocator.Current.GetInstance <ILocalizationService>();
            }
        }
        private static void OnIsDragDropEnabledChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
        {
            RadToolBarTray tray = (RadToolBarTray)target;

            if ((bool)args.OldValue)
            {
                DragDropManager.RemoveDragInitializeHandler(tray, TrayDragInitialized);
                DragDropManager.RemoveDragEnterHandler(tray, TrayDragEntered);
                DragDropManager.RemoveDragOverHandler(tray, TrayDraggedOver);
                DragDropManager.RemoveDragLeaveHandler(tray, TrayDragLeft);
                DragDropManager.RemoveDropHandler(tray, TrayDropped);
            }

            if ((bool)args.NewValue)
            {
                DragDropManager.AddDragInitializeHandler(tray, TrayDragInitialized);
                DragDropManager.AddDragEnterHandler(tray, TrayDragEntered);
                DragDropManager.AddDragOverHandler(tray, TrayDraggedOver);
                DragDropManager.AddDragLeaveHandler(tray, TrayDragLeft);
                DragDropManager.AddDropHandler(tray, TrayDropped);
            }
        }
Пример #18
0
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
     DragDropManager.AddDragOverHandler(this.AssociatedObject, OnDragOver);
 }
Пример #19
0
 public MainPage()
 {
     InitializeComponent();
     DragDropManager.AddDragOverHandler(xTreeView, OnDragOver, true);
 }
Пример #20
0
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(this.timeline, OnTimelineDragInitialize);
     DragDropManager.AddDragOverHandler(this.timeline, OnTimelineDragOver);
     DragDropManager.AddDropHandler(this.timeline, OnTimelineDrop);
 }
Пример #21
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     DragDropManager.AddDragInitializeHandler(this.radTreeView, OnDragInitialize);
     DragDropManager.AddDragOverHandler(this.radRichTextBox, OnDragOver);
     DragDropManager.AddDropHandler(this.radRichTextBox, OnDrop);
 }
Пример #22
0
 public MultipleRowsAndColumnsPanel()
 {
     this.freeSlot = new KeyValuePair <int, int>(-1, -1);
     DragDropManager.AddDragOverHandler(this, new Telerik.Windows.DragDrop.DragEventHandler(this.OnDragOver));
 }