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

NavigationFrame.QueryControl Event

Allows you to dynamically assign content to each NavigationPage in this NavigationFrame or NavigationPane.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Deferred Control Load Events")]
public event QueryControlEventHandler QueryControl

#Event Data

The QueryControl event's data class is DevExpress.XtraBars.Navigation.QueryControlEventArgs.

#Remarks

The QueryControl event fires whenever a blank NavigationPage has to be displayed. When handling this event, use the e.Page property to determine which page fired this event and the e.Control property to assign a content for this page. For instance, the following code illustrates an example.

private void navigationPane1_QueryControl(object sender, DevExpress.XtraBars.Navigation.QueryControlEventArgs e) {
    if (e.Page == myPage1) e.Control = new myXtraUserControl();
}

Dynamic page population in a navigation frame and navigation page is identical to populating documents that belong to the Application UI Manager component. See the Deferred Load topic to learn more.

When a page populated on the QueryControl event is deselected, the NavigationFrame.ControlReleasing event is raised.

See Also