skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • Resources Hub
    • .NET MAUI Tutorials and Learning
    • First Steps
    • Submit a Ticket
    • FAQs

    Docs & Resources

    • Docs
    • Demos
    • Migrate to .NET MAUI
    • Forums
    • Videos
    • Blogs

    Productivity and Design Tools

    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class CollectionViewDragDropBehavior

Defines the behavior and logic for drag and drop operations within a RadCollectionView control. This class provides customization points for controlling when drag operations can start, when drops are allowed, and how the drop operation is completed.

Inheritance
System.Object
CollectionViewDragDropBehavior
Namespace: Telerik.Maui.Controls.CollectionView
Assembly: Telerik.Maui.Controls.dll

Syntax

public class CollectionViewDragDropBehavior : Object

Constructors

CollectionViewDragDropBehavior()

Declaration
public CollectionViewDragDropBehavior()

Properties

AllowDrop

Gets or sets a value indicating whether drop operations are allowed on this collection view. When set to false, the collection view will not accept dropped items from drag operations. Default is true.

Declaration
public bool AllowDrop { get; set; }
Property Value
System.Boolean

CollectionView

Gets the RadCollectionView control instance that this behavior is associated with. Returns null if the collection view has been garbage collected or is not set.

Declaration
public RadCollectionView CollectionView { get; }
Property Value
RadCollectionView

Methods

CanDrop(CollectionViewDragDropContext)

Determines whether the current drop operation can be completed based on the drag and drop context. Override this method to provide custom validation logic for when drop operations are allowed.

Declaration
public virtual bool CanDrop(CollectionViewDragDropContext state)
Parameters
CollectionViewDragDropContext state

The context information about the current drag and drop operation.

Returns
System.Boolean

True if the drop operation can be completed; otherwise, false.

CanStartDrag(CollectionViewDragDropContext)

Determines whether a drag operation can be initiated with the current context. Override this method to provide custom validation logic for when drag operations are allowed to start.

Declaration
public virtual bool CanStartDrag(CollectionViewDragDropContext state)
Parameters
CollectionViewDragDropContext state

The context information about the potential drag operation.

Returns
System.Boolean

True if the drag operation can start; otherwise, false.

Drop(CollectionViewDragDropContext)

Executes the drop operation, performing the actual data manipulation to complete the drag and drop. This method is called only when the item is dropped on a valid drop target. Override this method to provide custom drop logic.

Declaration
public virtual void Drop(CollectionViewDragDropContext state)
Parameters
CollectionViewDragDropContext state

The context information about the drag and drop operation being completed.

GetDropOperation(CollectionViewDragDropContext)

Determines the type of drop operation to perform based on the current drag and drop context. Override this method to provide custom logic for determining whether items should be moved, copied, or if the drop should be refused.

Declaration
public virtual DropOperation GetDropOperation(CollectionViewDragDropContext state)
Parameters
CollectionViewDragDropContext state

The context information about the current drag and drop operation.

Returns
DropOperation

A DropOperation value indicating the type of operation to perform.

Extension Methods

AndroidTypeConversionExtensions.ToJavaObject(Object)
Sample Applications
  • Controls Samples App
  • Crypto Tracker App
Support Resources
  • .NET MAUI SDKBrowser App
Community
  • Forums
  • Blogs
  • Feedback Portal
  • YouTube Channel

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.