Skip to main content

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.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public BaseDocument AddOrActivateDocument(
    Predicate<BaseDocument> match,
    Func<Control> getControl
)

Parameters

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.

Returns

Type Description
BaseDocument

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

See Also