Drastic.DragAndDrop
1.0.8
See the version list below for details.
dotnet add package Drastic.DragAndDrop --version 1.0.8
NuGet\Install-Package Drastic.DragAndDrop -Version 1.0.8
<PackageReference Include="Drastic.DragAndDrop" Version="1.0.8" />
paket add Drastic.DragAndDrop --version 1.0.8
#r "nuget: Drastic.DragAndDrop, 1.0.8"
// Install Drastic.DragAndDrop as a Cake Addin #addin nuget:?package=Drastic.DragAndDrop&version=1.0.8 // Install Drastic.DragAndDrop as a Cake Tool #tool nuget:?package=Drastic.DragAndDrop&version=1.0.8
Drastic.DragAndDrop
Drastic.DragAndDrop is a simple API for adding Drag And Drop enabled views to existing controls. It is not intended to be the most "comprehensive" control, but to be an easy way to add basic functionality to an app. It can also serve as a springboard for your own controls.
How To Use
iOS/Catalyst
internal class SampleViewController : UIViewController
{
private UILabel label = new UILabel() { Text = "Drag and Drop an image onto the window..." };
private UIImageView image = new UIImageView() { BackgroundColor = UIColor.Gray };
private DragAndDrop dragAnDrop;
public SampleViewController()
{
this.SetupUI();
this.SetupLayout();
this.dragAnDrop = new DragAndDrop(this);
this.dragAnDrop.Drop += this.DragAnDrop_Drop;
}
...
WinUI
public sealed partial class MainWindow : Window
{
private DragAndDrop? dragAndDrop;
public MainWindow()
{
this.InitializeComponent();
this.dragAndDrop = new DragAndDrop(this);
this.dragAndDrop.Drop += DragAndDrop_Drop;
}
private async void DragAndDrop_Drop(object? sender, DragAndDropOverlayTappedEventArgs e)
Tips
DragAndDrop
can be applied to individual UIView
s for UIKit, or UIElement
s for WinUI. When you apply the Drag And Drop view to a WinUI Window, it uses the internal contents of the frame as the drop zone. If your content does not extend to the edge of the Window
(As it does in the default sample) then the drag and drop target will not extend to the edge of the window. If you wish to do that, nest your content within something like a Grid
that extends to the edge of the frame.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net7.0-ios was computed. net7.0-ios16.0 is compatible. net7.0-maccatalyst was computed. net7.0-maccatalyst15.4 is compatible. net7.0-macos was computed. net7.0-macos12.3 is compatible. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows10.0.19041 is compatible. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- No dependencies.
-
net7.0-android33.0
- No dependencies.
-
net7.0-ios16.0
- No dependencies.
-
net7.0-maccatalyst15.4
- No dependencies.
-
net7.0-macos12.3
- No dependencies.
-
net7.0-windows10.0.19041
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Drastic.DragAndDrop:
Package | Downloads |
---|---|
Drastic.DragAndDrop.Maui
A simple and straightforward Drag and Drop control for MAUI apps. Supports WinUI, Mac Catalyst, and iOS. |
GitHub repositories
This package is not used by any popular GitHub repositories.