WorkflowView.EnsureVisible(Object) Method

Definition

Ensures that the Object passed is visible, expanding parent objects and scrolling the WorkflowView as necessary.

C#
public void EnsureVisible(object selectableObject);

Parameters

selectableObject
Object

The object to make visible.

Exceptions

selectableObject is a null reference (Nothing in Visual Basic).

Examples

The following example uses the GetService method of the WorkflowView object to return an ISelectionService interface. If the service exists, EnsureVisible is called passing the currently selected activity using the PrimarySelection property of the ISelectionService object.

C#
public void FindSelection()
{
    ISelectionService selectionService;
    selectionService = ((IServiceProvider)this.workflowView).GetService(typeof(ISelectionService))
        as ISelectionService;

    if (selectionService != null)
        this.workflowView.EnsureVisible(selectionService.PrimarySelection);
}

Remarks

Use EnsureVisible when you are working with an object in the workflow that requires user interface cues. EnsureVisible will expand parent objects and scroll the WorkflowView as necessary to make the object visible on the designer.

Applies to

Product Versions
.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, 4.8.1