@@ -21,6 +21,7 @@ to start their own drag. Notably the `Deferral` can be used to execute any async
2121drag logic and call back into the WebView at a later time. The ` Handled `
2222property lets the WebView2 know whether to exercise its own drag logic or not.
2323
24+ ## Override drag and drop
2425``` C++
2526// Using DragStarting to simply make a synchronous DoDragDrop call instead of
2627// having WebView2 do it.
@@ -67,7 +68,10 @@ CHECK_FAILURE(m_compController5->add_DragStarting(
6768 })
6869 .Get(),
6970 &m_dragStartingToken));
71+ ```
7072
73+ ## Disable drag and drop
74+ ```C++
7175// Using DragStarting to no-op a drag operation.
7276CHECK_FAILURE(m_compController5->add_DragStarting(
7377 Callback<ICoreWebView2DragStartingEventHandler>(
@@ -76,7 +80,7 @@ CHECK_FAILURE(m_compController5->add_DragStarting(
7680 {
7781 // If the event is marked handled, WebView2 will not execute its
7882 // drag logic.
79- args->put_Handled(m_dragOverrideMode == DragOverrideMode::NOOP );
83+ args->put_Handled(TRUE );
8084 return S_OK;
8185 })
8286 .Get(),
@@ -125,7 +129,7 @@ interface ICoreWebView2DragStartingEventArgs : IUnknown {
125129 /// Indicates whether this event has been handled by the app. If the
126130 /// app handles this event, WebView2 will not initiate drag drop. If
127131 /// the app does not handle the event, WebView2 will initiate its own
128- /// drag drop logic.
132+ /// drag drop logic. The default value is FALSE.
129133 [ propput] HRESULT Handled([ in] BOOL value);
130134
131135
0 commit comments