private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(AssociatedControl, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(AssociatedControl, OnGiveFeedback);
     DragDropManager.AddDragDropCompletedHandler(AssociatedControl, OnDragDropCompleted);
     DragDropManager.AddDragOverHandler(AssociatedControl, OnDragOver);
 }
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
     DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop);
     DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted);
 }
Beispiel #3
0
        protected override void OnAttached()
        {
            base.OnAttached();

            DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
            DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
            DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted);
            DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop);
        }
Beispiel #4
0
        public MainPage()
        {
            InitializeComponent();

            this.Loaded += MainPage_Loaded;

            DragDropManager.AddDragInitializeHandler(this.ColumnsListBox, OnDragInitialize);
            DragDropManager.AddDropHandler(this.ColumnsListBox, OnDrop);
            DragDropManager.AddGiveFeedbackHandler(this.ColumnsListBox, OnGiveFeedback);

            this.clubsGrid.ColumnReordered += clubsGrid_ColumnReordered;
        }
Beispiel #5
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));
        }
        private static void TrayDragInitialized(object sender, DragInitializeEventArgs e)
        {
            RadToolBarTray tray    = sender as RadToolBarTray;
            RadToolBar     toolBar = e.Source as RadToolBar;

            if (tray == null || toolBar == null)
            {
                return;
            }

            DragDropInfo info = new DragDropInfo(toolBar, tray);

            lastInitializedInfo = info;
            if (trayToHostDict.ContainsKey(tray) || !tray.IsMouseOver)
            {
                MoveToolBarToDragVisual(info, tray);
            }
            else
            {
                SetHitTesting(info.Tray.Items);
            }

            SetActiveToolBarStyle(info.ToolBar);
            if (trayToHostDict.ContainsKey(info.Tray))
            {
                trayToHostDict[info.Tray].Opacity = 0;
            }

            DragDropManager.AddDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
            DragDropManager.AddGiveFeedbackHandler(info.ToolBar, ToolBarGiveFeedback);

            e.Data             = info;
            e.DragVisual       = info.DragVisual;
            e.DragVisualOffset = e.RelativeStartPoint;
            e.AllowedEffects   = DragDropEffects.All;
            e.Handled          = true;
        }
 protected virtual void Initialize()
 {
     DragDropManager.AddGiveFeedbackHandler(AssociatedObject, OnGiveFeedback);
     DragDropManager.AddDropHandler(AssociatedObject, OnDrop);
 }