Back to Devexpress

WindowsUIView.QueryStartupContentContainer Event

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-windowsui-dot-windowsuiview-49bf8e1a.md

latest3.2 KB
Original Source

WindowsUIView.QueryStartupContentContainer Event

Fires at the WindowsUIView application start-up.

Namespace : DevExpress.XtraBars.Docking2010.Views.WindowsUI

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event QueryContentContainerEventHandler QueryStartupContentContainer
vb
Public Event QueryStartupContentContainer As QueryContentContainerEventHandler

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.

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:

csharp
private void WindowsUIView1_QueryStartupContentContainer(object sender, DevExpress.XtraBars.Docking2010.Views.WindowsUI.QueryContentContainerEventArgs e) {
    if (. . .) e.ContentContainer = tileContainer1;
    else e.ContentContainer = pageGroup1;
}
vb
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

WindowsUIView Class

WindowsUIView Members

DevExpress.XtraBars.Docking2010.Views.WindowsUI Namespace