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

WindowsUIView.QueryStartupContentContainer Event

Fires at the WindowsUIView application start-up.

Namespace: DevExpress.XtraBars.Docking2010.Views.WindowsUI

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public event QueryContentContainerEventHandler QueryStartupContentContainer

#Event Data

The QueryStartupContentContainer event's data class is DevExpress.XtraBars.Docking2010.Views.WindowsUI.QueryContentContainerEventArgs.

#Remarks

WindowsUIView applications’ hierarchy can consist of multiple Content Containers. By default, on the application start-up, the topmost container (a container whose Parent property is null) is displayed. If there are multiple topmost containers in a single application (like ‘tileContainer1’ and ‘page1’ in the figure below), the first container will be initially shown.

Metro Getting Started - AppTree Hierarchy 3

Handle the QueryStartupContentContainer event, which is fired whenever a WindowsUIView application starts, to manually set the initially displayed Content Container. To do so, assign a required container to the QueryContentContainerEventArgs.ContentContainer property as shown below:

private void WindowsUIView1_QueryStartupContentContainer(object sender, DevExpress.XtraBars.Docking2010.Views.WindowsUI.QueryContentContainerEventArgs e) {
    if (. . .) e.ContentContainer = tileContainer1;
    else e.ContentContainer = pageGroup1;
}
See Also