Rediger

Del via


HitTestLocations Enum

Definition

Caution

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

Describes the area of the designer that contains the point passed to a HitTest(Point) method.

This enumeration supports a bitwise combination of its member values.

public enum class HitTestLocations
[System.Flags]
public enum HitTestLocations
[System.Flags]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public enum HitTestLocations
[<System.Flags>]
type HitTestLocations = 
[<System.Flags>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type HitTestLocations = 
Public Enum HitTestLocations
Inheritance
HitTestLocations
Attributes

Fields

Name Value Description
None 0

Indicates that no part of the designer was hit.

Designer 1

Indicates that any part of the designer was hit.

ActionArea 2

Indicates the area contained by the expand button was hit.

Left 4

Indicates that the left part of the designer was hit.

Top 8

Indicates the top of the designer was hit.

Right 16

Indicates the right part of the designer was hit.

Bottom 32

Indicates that the bottom of the designer was hit.

Connector 64

Indicates that a connector on the designer was hit.

Examples

The following example shows the addition of a new branch using a designer based off of the CompositeActivityDesigner class. If CanInsertActivities returns true, a new branch is created using the InsertActivities method. A ConnectorHitTestInfo object is created as a parameter to the InsertActivities method using the location of the workflow designer by specifying the Designer flag. When this is finished, the EnsureVisibleContainedDesigner method is used to ensure that the newly added branch is displayed in the workflow designer.

protected override CompositeActivity OnCreateNewBranch()
{
    return new ParallelIfBranch();
}
Protected Overrides Function OnCreateNewBranch() As CompositeActivity
    Return New ParallelIfBranch()
End Function

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

HitTestLocations is used by HitTest methods to describe the area of the designer hit by mouse clicks and drag and drop operations. Use the HitTestLocations to decide what kind of action to take in response to a successful hit test.

Applies to