共用方式為


SelectionTool 類別

更新:2007 年 11 月

表示在設計工具中選取物件的工具,例如滑鼠指標。

命名空間:  Microsoft.Windows.Design.Interaction
組件:  Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)

語法

Public Class SelectionTool _
    Inherits Tool

Dim instance As SelectionTool
public class SelectionTool : Tool
public ref class SelectionTool : public Tool
public class SelectionTool extends Tool

備註

不同類型的設計工具的選取範圍概念各有不同。當使用者在設計工具中選取物件時,設計工具會表現出某些標準行為。例如,使用者應該能夠選取一個物件、多個物件、取消選取物件和選取所有物件。您可以使用擴充性來控制使用者在設計工具中選取物件的方式。

注意事項:

本文未提及的其他選取類型包括文字選取範圍 (選取物件上某個文字範圍) 和點選取範圍 (選取曲線上一個或多個點)。拖曳矩型以選取數個物件之類的複雜選取模式,都可以由這些物件的 TaskProvider 提供者處理。

當在設計工具中選取了多個物件時,有一個物件會是「主要選取物件」(Primary Selection Object)。主要選取物件通常用來做為其他行為的索引鍵。例如,若要將所有選取的物件靠左邊對齊,主要選取物件就會決定對齊物件的位置。

繼承階層架構

System.Object
  Microsoft.Windows.Design.ContextItem
    Microsoft.Windows.Design.Interaction.Tool
      Microsoft.Windows.Design.Interaction.SelectionTool

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

請參閱

參考

SelectionTool 成員

Microsoft.Windows.Design.Interaction 命名空間

Selection

SelectionCommands

SelectionOperations

EditingContext

其他資源

WPF 設計工具擴充性架構