Table of Contents

Interface ISillActivatedByDragAndDrop

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Represents the declaration of a sill that will be activated when drag and dropping something into WindowSill.

public interface ISillActivatedByDragAndDrop : ISill
Inherited Members
Extension Methods

Remarks

Use this interface to create a sill that gets displayed when dragging a data in WindowSill. For example, you can create a sill that only gets displayed when the user drops an image file into WindowSill.

<pre><code class="lang-csharp">[(typeof())]
[("My Sill")]
[()] // Optional. Default is .
[(Before = "OtherSill", After = "AnotherSill")] // Optional. Use to tied break ordering of sills when conflicting properties are set.
internal sealed class MySill: 
{
}</code></pre>

Properties

DragAndDropActivatorTypeNames

Gets a list of ISillDragAndDropActivator activator names that determine when this sill will be activated based on what data got dropped into WindowSill.

string[] DragAndDropActivatorTypeNames { get; }

Property Value

string[]

Remarks

You can define your own custom activator by implementing ISillDragAndDropActivator.

Methods

OnActivatedAsync(string, DataPackageView)

Invoked when the sill is activated based on a drag-and-drop operation in WindowSill.

ValueTask OnActivatedAsync(string dragAndDropActivatorTypeName, DataPackageView data)

Parameters

dragAndDropActivatorTypeName string

The name of the type that initiated the drag-and-drop operation.

data DataPackageView

The data associated with the drag-and-drop operation. This parameter cannot be null.

Returns

ValueTask

A ValueTask that represents the asynchronous operation.

Remarks

This method is invoked when a drag-and-drop operation is activated. The caller is responsible for ensuring that the data parameter contains valid data for the operation.