HitTestLocations 列舉

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

描述設計工具區域,其中包含傳遞至 HitTest(Point) 方法的點。

此列舉支援其成員值的位元組合。

C#
[System.Flags]
public enum HitTestLocations
C#
[System.Flags]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public enum HitTestLocations
繼承
HitTestLocations
屬性

欄位

ActionArea 2

表示點擊展開按鈕所包含的區域。

Bottom 32

表示點擊設計工具的按鈕。

Connector 64

表示點擊設計工具上的接點。

Designer 1

表示點擊設計工具的任何部分。

Left 4

表示點擊設計工具的左邊部分。

None 0

表示未點擊設計工具的任何部分。

Right 16

表示點擊設計工具的右邊部分。

Top 8

表示點擊設計工具的上方。

範例

下列範例將示範如何使用 CompositeActivityDesigner 類別以外的設計工具,加入新的分支。 如果 CanInsertActivities 傳回 true,系統就會使用 InsertActivities 方法來建立新的分支。 ConnectorHitTestInfo物件會藉由指定 Designer 旗標,使用工作流程設計工具的位置,建立為 InsertActivities 方法的參數。 當結束時,EnsureVisibleContainedDesigner 方法會用來確保新加入的分支將顯示在工作流程設計工具上。

C#
protected override CompositeActivity OnCreateNewBranch()
{
    return new ParallelIfBranch();
}

備註

備註

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

HitTestLocations 可由 HitTest 方法使用,以描述由按一下滑鼠及拖放作業所點擊的設計工具區域。 使用 HitTestLocations 決定要採取哪種動作以回應成功的點擊測試。

適用於

產品 版本 (已過時)
.NET Framework 3.0, 3.5, 4.0 (4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8)