コード例 #1
0
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(AssociatedControl, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(AssociatedControl, OnGiveFeedback);
     DragDropManager.AddDragDropCompletedHandler(AssociatedControl, OnDragDropCompleted);
     DragDropManager.AddDragOverHandler(AssociatedControl, OnDragOver);
 }
コード例 #2
0
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize);
     DragDropManager.AddGiveFeedbackHandler(this.AssociatedObject, OnGiveFeedback);
     DragDropManager.AddDropHandler(this.AssociatedObject, OnDrop);
     DragDropManager.AddDragDropCompletedHandler(this.AssociatedObject, OnDragDropCompleted);
 }
コード例 #3
0
 public MainWindow()
 {
     InitializeComponent();
     DragDropManager.AddDragInitializeHandler(this.treeview, OnDragInitialize);
     this.treeview.ItemsSource = Snippet.GetSnippets();
     this.syntaxEditor.TaggersRegistry.RegisterTagger(new CSharpTagger(this.syntaxEditor));
     this.syntaxEditor.TaggersRegistry.RegisterTagger(new CSharpFoldingTagger(this.syntaxEditor));
 }
コード例 #4
0
        protected virtual void Initialize()
        {
            DragDropManager.AddDragInitializeHandler(AssociatedTreeListView, OnDragInitialize, true);
            DragDropManager.AddDropHandler(AssociatedTreeListView, OnDrop, true);
            DragDropManager.AddDragOverHandler(AssociatedTreeListView, OnDragOver, true);

            AssociatedTreeListView.DataLoaded += RadTreeListView_DataLoaded;
        }
コード例 #5
0
 private static void OnIsEnabledPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
 {
     var gridView = dependencyObject as RadGridView;
     if (gridView != null)
     {
         DragDropManager.AddDragInitializeHandler(gridView, OnGridViewRowDragInitialize);
     }
 }
コード例 #6
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);
        }
コード例 #7
0
        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;
        }
コード例 #8
0
ファイル: MainPage.xaml.cs プロジェクト: wlatif/xaml-sdk
        public MainPage()
        {
            InitializeComponent();

            this.pdfViewer.MouseLeftButtonDown += pdfViewer_MouseLeftButtonDown;
            this.pdfViewer.MouseLeftButtonUp   += pdfViewer_MouseLeftButtonUp;

            DragDropManager.AddDragInitializeHandler(this.pdfViewer, OnDragInitialize);
            DragDropManager.AddDropHandler(this.radRichTextBox, OnDrop);
        }
コード例 #9
0
        public Example()
        {
            InitializeComponent();

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

            DragDropManager.AddDropHandler(this.ListBox2, OnDrop);
            DragDropManager.AddDragOverHandler(this.ListBox2, OnDragOver);
        }
コード例 #10
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;
        }
コード例 #11
0
        public Example()
        {
            InitializeComponent();
            this.SamplesList1.DataContext = this.SamplesList.DataContext = new SamplesViewModel(this.diagram);
            this.diagram.ItemsChanged    += this.DiagramItemsChanged;
            this.fileManager = new FileManager(this.diagram);
            DragDropManager.AddDragInitializeHandler(this.panelBar, ToolboxDragService.OnDragInitialized);

            //// This is needed so that the code in SL and WPF is the same
            //// for the Undo/Redo list bindings in the SplitButton DropDownContent.
            this.DataContext          = this.diagram.UndoRedoService;
            this.panelBar.ItemsSource = new HierarchicalGalleryItemsCollection();
        }
コード例 #12
0
ファイル: CustomTileView.cs プロジェクト: yaguza2/xaml-sdk
        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
        private static void OnShowArrowDragCueChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
        {
            var element = (FrameworkElement)target;

            if ((bool)args.NewValue)
            {
                DragDropManager.AddDragInitializeHandler(element, OnElementDragInitialize, true);
                DragDropManager.AddDragDropCompletedHandler(element, OnElementDragDropCompleted, true);
                element.Unloaded += OnElementUnloaded;
            }
            else
            {
                UnsubscribeFromEvents(element);
            }
        }
コード例 #14
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>();
            }
        }
コード例 #15
0
        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);
            }
        }
コード例 #16
0
        private static void InitializeHost(RadToolBar toolBar, double left, double top)
        {
            Border border = new Border();

            border.Background = new SolidColorBrush(new Color {
                A = 50, R = 127, G = 127, B = 127
            });
            border.CornerRadius = new CornerRadius(3);
            RadToolBarTray tray = new RadToolBarTray();

            tray.Orientation = toolBar.Orientation;
            tray.Items.Add(toolBar);
            border.Child = tray;
            double hMargin = DragDropManager.MinimumHorizontalDragDistance;
            double vMargin = DragDropManager.MinimumVerticalDragDistance;

            tray.Margin = new Thickness(hMargin, vMargin, hMargin, vMargin);
            DragDropManager.AddDragInitializeHandler(tray, TrayDragInitialized);
            FrameworkElement host = InitializeWindowHost(border, left - hMargin - 1, top - vMargin);

            trayToHostDict[tray] = host;
        }
コード例 #17
0
ファイル: MainPage.xaml.cs プロジェクト: MikeH2012/xaml-sdk
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     DragDropManager.AddDragInitializeHandler(this.radTreeView, OnDragInitialize);
     DragDropManager.AddDragOverHandler(this.radRichTextBox, OnDragOver);
     DragDropManager.AddDropHandler(this.radRichTextBox, OnDrop);
 }
コード例 #18
0
 private void SubscribeToDragDropEvents()
 {
     DragDropManager.AddDragInitializeHandler(this.timeline, OnTimelineDragInitialize);
     DragDropManager.AddDragOverHandler(this.timeline, OnTimelineDragOver);
     DragDropManager.AddDropHandler(this.timeline, OnTimelineDrop);
 }
コード例 #19
0
 public MainWindow()
 {
     InitializeComponent();
     DragDropManager.AddDragInitializeHandler(this.border1, OnBorderDrop);
     DragDropManager.AddDropHandler(this.border2, OnBorderDrop);
 }
コード例 #20
0
 public Example()
 {
     InitializeComponent();
     this.DataContext = this.GenerateData();
     DragDropManager.AddDragInitializeHandler(this.radTreeView, OnTreeViewDragInitialize, true);
 }