共用方式為


DropHandlerBase 類別

定義

這個類別提供在編輯器中處理數據卸除所需的基本功能。 它以方便類別的形式提供,可藉由延伸此類別輕鬆地允許擴充器提供自己的自定義置放處理程式。

public ref class DropHandlerBase abstract : Microsoft::VisualStudio::Text::Editor::DragDrop::IDropHandler
[Windows::Foundation::Metadata::WebHostHidden]
public ref class DropHandlerBase abstract : Microsoft::VisualStudio::Text::Editor::DragDrop::IDropHandler
[Windows::Foundation::Metadata::WebHostHidden]
class DropHandlerBase abstract : Microsoft::VisualStudio::Text::Editor::DragDrop::IDropHandler
public abstract class DropHandlerBase : Microsoft.VisualStudio.Text.Editor.DragDrop.IDropHandler
type DropHandlerBase = class
    interface IDropHandler
Public MustInherit Class DropHandlerBase
Implements IDropHandler
繼承
DropHandlerBase
實作

備註

提供這個類別可讓擴充器藉由擴充此類別來提供自己的自定義置放處理程式。

建構函式

DropHandlerBase(IWpfTextView, IEditorOperations)

建構 DropHandlerBase

屬性

EditorOperations

IEditorOperations取得用來處理文字插入等工作的 。

TextView

IWpfTextView取得這個卸除處理程式在其上運作的 。

方法

DeleteSpans(IList<ITrackingSpan>)

指定 s 的清單 ITrackingSpan,從緩衝區中刪除它們。

ExtractText(DragDropInfo)

這個方法會擷取 物件的文字 DragDropInfo

GetDragDropEffect(DragDropInfo)

根據作業的狀態,決定應該向用戶顯示哪些拖放 & 效果。

HandleDataDropped(DragDropInfo)

表示拖放作業已完成,而且應該立即執行最終工作。

HandleDragCanceled()

表示拖放作業已取消。

HandleDraggingOver(DragDropInfo)

表示拖放作業正在進行中。

HandleDragStarted(DragDropInfo)

表示拖放作業的開始。

InsertText(VirtualSnapshotPoint, String)

在指定的位置插入一些文字數據。

IsDropEnabled(DragDropInfo)

判斷處理程式是否可以接受拖放作業的數據。

MoveText(VirtualSnapshotPoint, IList<ITrackingSpan>, String)

藉由刪除選取內容並在 insertPoint 中插入 toInsert,將數據從一個位置移至緩衝區中的另一個位置。

PerformPostEditActions(DragDropInfo, Boolean)

這個方法會在對緩衝區進行編輯之後呼叫,以執行任何必要的後續編輯動作。

PerformPreEditActions(DragDropInfo)

在對緩衝區進行編輯之前,會呼叫這個方法,以執行任何必要的預先編輯動作。

SelectText(SnapshotPoint, Int32, DragDropInfo, Boolean)

這個方法會選取卸除作業結尾處的文字。

適用於