Skip to main content

NavigationFrame.QueryControl Event

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

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v23.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