Back to Devexpress

BaseView.QueryControl Event

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-baseview-371fecb2.md

latest4.7 KB
Original Source

BaseView.QueryControl Event

Occurs when a document is to be displayed and allows you to assign content to this document. This event is in effect in Deferred Load mode.

Namespace : DevExpress.XtraBars.Docking2010.Views

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event QueryControlEventHandler QueryControl
vb
Public Event QueryControl As QueryControlEventHandler

Event Data

The QueryControl event's data class is QueryControlEventArgs. The following properties provide information specific to this event:

PropertyDescription
ControlGets or sets the content of the document that raised the current BaseView.QueryControl event.
DocumentPoints to the document related to the current event. Inherited from DocumentEventArgs.

Remarks

The QueryControl event is raised each time a document with no content is to be displayed. To set this document’s content use the QueryControlEventArgs.Control property. You can also use the DocumentEventArgs.Document property to get a document related to this event.

The QueryControl event is part of the Deferred Load feature.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the QueryControl event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-create-custom-document-manager/CS/CustomDocument/Main.cs#L12

csharp
// Handling the QueryControl event that will populate all automatically generated Documents
this.customWidgetView1.QueryControl += customWidgetView1_QueryControl;
this.customWidgetView1.DocumentActivated += customWidgetView1_DocumentActivated;

winforms-create-custom-document-manager/VB/CustomDocument/Main.vb#L14

vb
' Handling the QueryControl event that will populate all automatically generated Documents
AddHandler Me.customWidgetView1.QueryControl, AddressOf customWidgetView1_QueryControl
AddHandler Me.customWidgetView1.DocumentActivated, AddressOf customWidgetView1_DocumentActivated

See Also

ControlShown

ControlReleasing

ControlReleased

UseLoadingIndicator

LoadingIndicatorProperties

Deferred Load

BaseView Class

BaseView Members

DevExpress.XtraBars.Docking2010.Views Namespace