Class
TreeViewDragDropService

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public class TreeViewDragDropService : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener

Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceTreeViewDragDropService

Derived Classes: DataFilterDragDropService

Implements: ICustomTypeDescriptorIDisposableIMessageListenerINotifyPropertyChanged

Inherited Members RadDragDropService.messageFilterAddedRadDragDropService.xOutlineFormOffsetRadDragDropService.yOutlineFormOffsetRadDragDropService.beginPointRadDragDropService.HandleLeftButtonUp()RadDragDropService.HandleEscKeyDown()RadDragDropService.RestoreOriginalMouseCursor()RadDragDropService.ShouldBeginDrag(Point, Point)RadDragDropService.OnPreviewDragStart(PreviewDragStartEventArgs)RadDragDropService.Commit()RadDragDropService.GetDropTarget(Point, out Point)RadDragDropService.OnPreviewDropTarget(PreviewDropTargetEventArgs)RadDragDropService.BeginDrag(Point, ISupportDrag)RadDragDropService.EndDrag(Point, RadControl)RadDragDropService.EndDrag()RadDragDropService.DoMouseMove(Point)RadDragDropService.CanCommitRadDragDropService.ValidCursorRadDragDropService.InitializedRadDragDropService.InvalidCursorRadDragDropService.UseDefaultPreviewRadDragDropService.DropTargetRadDragDropService.DropLocationRadDragDropService.HintWindowRadDragDropService.PreviewDragDropRadDragDropService.PreviewDragOverRadDragDropService.PreviewDropTargetRadDragDropService.PreviewDragStartRadDragDropService.PreviewDragHintRadService.CanOperate()RadService.Start(object)RadService.Stop(bool)RadService.Pause()RadService.Resume()RadService.OnStarting(RadServiceStartingEventArgs)RadService.IsContextValid(object)RadService.Abort()RadService.PerformResume()RadService.PerformPause()RadService.SetContext(object)RadService.OnEnabledChanged()RadService.ContextRadService.AvailableAtDesignTimeRadService.StateRadService.NameRadService.EnabledRadService.StartingRadService.StartedRadService.StoppingRadService.StoppedRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing

Constructors

TreeViewDragDropService(RadTreeViewElement)

Declaration

cs-api-definition
public TreeViewDragDropService(RadTreeViewElement owner)

Parameters

owner

RadTreeViewElement

Properties

DropHintColor

Declaration

cs-api-definition
public Color DropHintColor { get; set; }

Property Value

Color

IsCopyingNodes

Declaration

cs-api-definition
protected virtual bool IsCopyingNodes { get; }

Property Value

bool

Owner

Declaration

cs-api-definition
protected RadTreeViewElement Owner { get; }

Property Value

RadTreeViewElement

ShowDragHint

Gets or sets a value indicating whether drag hint should be shown.

Declaration

cs-api-definition
public bool ShowDragHint { get; set; }

Property Value

bool

true if [show drag hint]; otherwise, false.

ShowDropHint

Gets or sets a value indicating whether show drop hint should be shown.

Declaration

cs-api-definition
public bool ShowDropHint { get; set; }

Property Value

bool

true if [show drop hint]; otherwise, false.

Methods

CanDragOver(DropPosition, TreeNodeElement)

Declaration

cs-api-definition
protected virtual bool CanDragOver(DropPosition dropPosition, TreeNodeElement targetNodeElement)

Parameters

dropPosition

DropPosition

targetNodeElement

TreeNodeElement

Returns

bool

CanShowDropHint(Point)

Declaration

cs-api-definition
protected virtual bool CanShowDropHint(Point mousePosition)

Parameters

mousePosition

Point

Returns

bool

CanStart(object)

Determines whether the service may be started. Validation is as follows:

  1. Check whether Enabled is true.
  2. Check the context through IsContextValid method. An exception is thrown if context is invalid.
  3. Checks the current state - it should be Initial or Stopped.

Declaration

cs-api-definition
protected override bool CanStart(object context)

Parameters

context

object

Returns

bool

Overrides RadDragDropService.CanStart(object)

CancelPreviewDragDrop(RadDropEventArgs)

Declaration

cs-api-definition
protected virtual bool CancelPreviewDragDrop(RadDropEventArgs e)

Parameters

e

RadDropEventArgs

Returns

bool

CreateTreeNode(RadTreeNode)

Creates a new tree node in the target RadTreeView using the information from the source tree.

Declaration

cs-api-definition
protected virtual RadTreeNode CreateTreeNode(RadTreeNode sourceTreeNode)

Parameters

sourceTreeNode

RadTreeNode

The source tree node.

Returns

RadTreeNode

A new instance of RadTreeNode if successfull.

DisposeHint()

Declaration

cs-api-definition
protected virtual void DisposeHint()

DisposeManagedResources()

Releases managed resources by clearing the property store and disposing value animators to prevent memory leaks.

Declaration

cs-api-definition
protected override void DisposeManagedResources()

Overrides RadDragDropService.DisposeManagedResources()

GetDraggedNodes(RadTreeNode)

Declaration

cs-api-definition
protected virtual List<RadTreeNode> GetDraggedNodes(RadTreeNode draggedNode)

Parameters

draggedNode

RadTreeNode

Returns

List<RadTreeNode>

GetDropPosition(Point, TreeNodeElement)

Declaration

cs-api-definition
protected DropPosition GetDropPosition(Point dropLocation, TreeNodeElement targetNodeElement)

Parameters

dropLocation

Point

targetNodeElement

TreeNodeElement

Returns

DropPosition

GetSelectedNodes(RadTreeNode)

Declaration

cs-api-definition
protected virtual List<RadTreeNode> GetSelectedNodes(RadTreeNode draggedNode)

Parameters

draggedNode

RadTreeNode

Returns

List<RadTreeNode>

HandleMouseMove(Point)

Declaration

cs-api-definition
protected override void HandleMouseMove(Point mousePosition)

Parameters

mousePosition

Point

Overrides RadDragDropService.HandleMouseMove(Point)

HideHintWindow()

Declaration

cs-api-definition
public void HideHintWindow()

IsDropTargetValid(ISupportDrop)

Declaration

cs-api-definition
protected override bool IsDropTargetValid(ISupportDrop dropTarget)

Parameters

dropTarget

ISupportDrop

Returns

bool

Overrides RadDragDropService.IsDropTargetValid(ISupportDrop)

OnPreviewDragDrop(RadDropEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragDrop(RadDropEventArgs e)

Parameters

e

RadDropEventArgs

Overrides RadDragDropService.OnPreviewDragDrop(RadDropEventArgs)

OnPreviewDragHint(PreviewDragHintEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragHint(PreviewDragHintEventArgs e)

Parameters

e

PreviewDragHintEventArgs

Overrides RadDragDropService.OnPreviewDragHint(PreviewDragHintEventArgs)

OnPreviewDragHintWithDropPosition(TreeViewPreviewDragHintEventArgs)

Declaration

cs-api-definition
protected virtual void OnPreviewDragHintWithDropPosition(TreeViewPreviewDragHintEventArgs e)

Parameters

e

TreeViewPreviewDragHintEventArgs

OnPreviewDragOver(RadDragOverEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragOver(RadDragOverEventArgs e)

Parameters

e

RadDragOverEventArgs

Overrides RadDragDropService.OnPreviewDragOver(RadDragOverEventArgs)

OnStarted()

Notifies that the service has been successfully started. Allows inheritors to perform some additional logic upon start.

Declaration

cs-api-definition
protected override void OnStarted()

Overrides RadService.OnStarted()

OnStopped()

Notifies that a running operation has stopped. Allows inheritors to perform some additional logic upon stop.

Declaration

cs-api-definition
protected override void OnStopped()

Overrides RadService.OnStopped()

OnStopping(RadServiceStoppingEventArgs)

Notifies that a stop request has occured. Cancelable.

Declaration

cs-api-definition
protected override void OnStopping(RadServiceStoppingEventArgs e)

Parameters

e

RadServiceStoppingEventArgs

Overrides RadService.OnStopping(RadServiceStoppingEventArgs)

PerformDragDrop(Point, TreeNodeElement, List<RadTreeNode>)

Declaration

cs-api-definition
protected virtual void PerformDragDrop(Point dropLocation, TreeNodeElement targetNodeElement, List<RadTreeNode> draggedNodes)

Parameters

dropLocation

Point

targetNodeElement

TreeNodeElement

draggedNodes

List<RadTreeNode>

PerformDragDropCore(DropPosition, RadTreeNode, List<RadTreeNode>)

Declaration

cs-api-definition
protected virtual void PerformDragDropCore(DropPosition position, RadTreeNode targetNode, List<RadTreeNode> draggedNodes)

Parameters

position

DropPosition

targetNode

RadTreeNode

draggedNodes

List<RadTreeNode>

PerformStart()

Performs the core Start logic.

Declaration

cs-api-definition
protected override void PerformStart()

Overrides RadDragDropService.PerformStart()

PerformStop()

Stops the service. Performs the core logic.

Declaration

cs-api-definition
protected override void PerformStop()

Overrides RadDragDropService.PerformStop()

PrepareContext()

Declaration

cs-api-definition
protected override bool PrepareContext()

Returns

bool

Overrides RadDragDropService.PrepareContext()

PrepareDragHint(TreeNodeElement)

Declaration

cs-api-definition
protected virtual void PrepareDragHint(TreeNodeElement nodeElement)

Parameters

nodeElement

TreeNodeElement

SetHintWindowPosition(Point)

Declaration

cs-api-definition
protected override void SetHintWindowPosition(Point mousePt)

Parameters

mousePt

Point

Overrides RadDragDropService.SetHintWindowPosition(Point)

ShowHintWindow()

Declaration

cs-api-definition
public void ShowHintWindow()

UpdateHintPosition(Point)

Declaration

cs-api-definition
protected virtual void UpdateHintPosition(Point mousePosition)

Parameters

mousePosition

Point