windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-windowsui-dot-windowsuiview-49bf8e1a.md
Fires at the WindowsUIView application start-up.
Namespace : DevExpress.XtraBars.Docking2010.Views.WindowsUI
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public event QueryContentContainerEventHandler QueryStartupContentContainer
Public Event QueryStartupContentContainer As QueryContentContainerEventHandler
The QueryStartupContentContainer event's data class is DevExpress.XtraBars.Docking2010.Views.WindowsUI.QueryContentContainerEventArgs.
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.
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;
}
Private Sub WindowsUIView1_QueryStartupContentContainer(ByVal sender As Object, ByVal e As DevExpress.XtraBars.Docking2010.Views.WindowsUI.QueryContentContainerEventArgs)
If . . . Then
e.ContentContainer = tileContainer1
Else
e.ContentContainer = pageGroup1
End If
End Sub
See Also