Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add own cloneable interface for easier handling #436

Merged
merged 3 commits into from
Sep 4, 2022
Merged

Conversation

punker76
Copy link
Owner

@punker76 punker76 commented Mar 2, 2022

What changed?

Describe the changes you have made to improve this project.

Add own cloneable interface for easier handling:

/// <summary>
/// Supports cloning like the ICloneable interface, which creates a new instance of a class with the same value as an existing instance.
/// </summary>
public interface ICloneableDragItem
{
    /// <summary>
    /// Creates a new object that is a copy of the current instance.
    /// </summary>
    /// <param name="dropInfo">Object which contains several drop information.</param>
    /// <returns>A new object that is a copy of this instance.</returns>
    object CloneItem(IDropInfo dropInfo);
}

Add also a new interface for easier handling after item was dropped.

/// <summary>
/// Supports methods for models which can be dropped.
/// </summary>
public interface IDragItemSource
{
    /// <summary>
    /// Indicates that the item is dropped on the destination list.
    /// </summary>
    /// <param name="dropInfo">Object which contains several drop information.</param>
    void ItemDropped(IDropInfo dropInfo);
}

Closed issues.

Closes #435

@punker76 punker76 added this to the 3.2.0 milestone Mar 2, 2022
@punker76
Copy link
Owner Author

punker76 commented Mar 2, 2022

/cc @RickStrahl @Keboo

@punker76 punker76 force-pushed the jk/better_cloning branch 2 times, most recently from bc791ef to f46b793 Compare March 3, 2022 10:12
@punker76 punker76 merged commit 5475ffb into develop Sep 4, 2022
@punker76 punker76 deleted the jk/better_cloning branch September 4, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with DragDrop.DefaultDropHandler.Drop() when dropping multiple items across groups
1 participant