WorkflowView.EnsureVisible(Object) メソッド

定義

渡された Object が確実に表示されるよう、必要に応じて親オブジェクトを展開し、WorkflowView をスクロールします。

public:
 void EnsureVisible(System::Object ^ selectableObject);
public void EnsureVisible (object selectableObject);
member this.EnsureVisible : obj -> unit
Public Sub EnsureVisible (selectableObject As Object)

パラメーター

selectableObject
Object

表示するオブジェクト。

例外

selectableObject が null 参照 (Visual Basic の場合は Nothing) です。

次の例では、GetService オブジェクトの WorkflowView メソッドを使って、ISelectionService インターフェイスを取得しています。 サービスが存在すれば EnsureVisible が呼び出されます。このとき、現在選択状態のアクティビティが、PrimarySelection オブジェクトの ISelectionService プロパティを使って渡されます。

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

    if (selectionService != null)
        this.workflowView.EnsureVisible(selectionService.PrimarySelection);
}
Public Sub FindSelection()
    Dim selectionService As ISelectionService
    selectionService = CType(CType(Me.workflowView, IServiceProvider).GetService(GetType(ISelectionService)), ISelectionService)

    If selectionService IsNot Nothing Then
        Me.workflowView.EnsureVisible(selectionService.PrimarySelection)
    End If
End Sub

注釈

操作対象のオブジェクトがワークフロー内にあって、ユーザー インターフェイス キューを必要とする場合、EnsureVisible を使います。EnsureVisible は、必要に応じて親オブジェクトを展開し、WorkflowView をスクロールして、このオブジェクトがデザイナー上に表示されるようにします。

適用対象