Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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