Share via


CoreDragDropManager Klasse

Definition

Verwaltet den Zugriff zum Ziehen und Ablegen innerhalb und zwischen Apps.

public ref class CoreDragDropManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CoreDragDropManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CoreDragDropManager
Public NotInheritable Class CoreDragDropManager
Vererbung
Object Platform::Object IInspectable CoreDragDropManager
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Beispiele

public sealed partial class MainPage : Page
{
      private void DropOperationTargetRequested(CoreDragDropManager sender, 
            CoreDropOperationTargetRequestedEventArgs evtArgs)
      {
            // Create a target (see above for more implementation details)
            var target = new DropTarget ();
            evtArgs.SetTarget(target);
      }

      public MainPage()
      {                           
            InitializeComponents();
            var dragDropManager = DragDropManager.GetForCurrentView();
            dragDropManager.DropOperationTargetRequested += DropOperationTargetRequested;
      }
}

Eigenschaften

AreConcurrentOperationsEnabled

Ruft ab oder legt fest, ob gleichzeitige Drag and Drop-Vorgänge aktiviert sind.

Methoden

GetForCurrentView()

Ruft den zentralen Drag and Drop-Manager ab, der dem aktuell sichtbaren Anwendungsfenster zugeordnet ist.

Ereignisse

TargetRequested

Tritt auf, wenn ein Drag-and-Drop-Ziel angefordert wird.

Gilt für: