A newer version of this page is available. Switch to the current version.

BaseView.AddOrActivateDocument(Predicate<BaseDocument>, Func<Control>) Method

Activates an existing document that contains the specific control. If no such document was found, a new document is created and added to this View.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v19.2.dll


public BaseDocument AddOrActivateDocument(
    Predicate<BaseDocument> match,
    Func<Control> getControl
Public Function AddOrActivateDocument(
    match As Predicate(Of BaseDocument),
    getControl As Func(Of Control)
) As BaseDocument


Name Type Description
match Predicate<BaseDocument>

A Predicate that retrieves an existing document.

getControl Func<Control>

A Function that retrieves a control. This control will be placed within a newly created document of the match predicate returns nothing.


Type Description

A BaseDocument class descendant that is the activated or created document.

See Also