←Select platform

AllowedEffects Property

Summary

Drag operations that can occur.

Syntax
C#
C++/CLI
public DragDropEffects AllowedEffects { get; set; } 
public:  
   property System::Windows::Forms::DragDropEffects^ AllowedEffects 
   { 
      System::Windows::Forms::DragDropEffects^ get() 
      void set(System::Windows::Forms::DragDropEffects^ value) 
   } 

Property Value

The drag operations that can occur. Default value is System.Windows.Forms.DragDropEffects.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
public void ImageViewerDragInteractiveModeExample() 
{ 
   _imageViewer.ItemDragDrop += (sender, e) => 
   { 
      _imageViewer.InteractiveModes.BeginUpdate(); 
      e.Effect = DragDropEffects.Copy | DragDropEffects.Move | DragDropEffects.Link; 
      Debug.WriteLine("Format: {0}, Location: {1}, NativeEvent: {2}, Operation: {3}, SourceImageViewer: {4}, SourceItem: {5}, TargetImageViewer: {6}, TargetItem: {7}",  
         e.Format, e.Location, e.NativeEvent, e.Operation, e.SourceImageViewer, e.SourceItem, e.TargetImageViewer, e.TargetItem); 
      _imageViewer.InteractiveModes.EndUpdate(); 
      e.Abort = true; 
   }; 
   _imageViewer.InteractiveModes.BeginUpdate(); 
   ImageViewerDragInteractiveMode dragMode = new ImageViewerDragInteractiveMode(); 
   dragMode.Format = RasterImage.RasterImageDataFormat; 
   dragMode.TargetImageViewerMode = ImageViewerDragTargetMode.All; 
   dragMode.AllowedEffects = DragDropEffects.Copy | DragDropEffects.Move | DragDropEffects.Link; 
   _imageViewer.InteractiveModes.Add(dragMode); 
   _imageViewer.InteractiveModes.EndUpdate(); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.