windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-basedocument-b53fd72a.md
Gets the control displayed within the current document.
Namespace : DevExpress.XtraBars.Docking2010.Views
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
public Control Control { get; }
<Browsable(False)>
Public ReadOnly Property Control As Control
| Type | Description |
|---|---|
| Control |
The control displayed within the current document.
|
You can provide the content for a Document via the Deferred Load mechanism or by using the BaseView.AddDocument method, which takes a Control object as a parameter.
Any Control or Form descendant can be used as a Document’s content. If you use a Control as the Document’s content, a new form that will display this control will be automatically created. The assigned control and new form can be accessed via the Control and BaseDocument.Form properties, respectively. If you use a Form as the Document’s content, this form is returned by both the Control and BaseDocument.Form properties.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Control property.
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-document-manager-web-browser-ui/CS/Form1.cs#L40
foreach (Document doc in docs)
if (doc.Control == documentControl)
return doc;
winforms-document-manager-web-browser-ui/VB/Form1.vb#L32
For Each doc As Document In docs
If doc.Control Is documentControl Then Return doc
Next
See Also