Skip to main content
A newer version of this page is available. .

ControlReleasingEventArgs.DisposeControl Property

Gets or sets whether a content object should be disposed of after it has been unbound from a document.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v21.1.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

public bool DisposeControl { get; set; }

Property Value

Type Description
Boolean

true if a content object should be destroyed after it has been unbound from a document; otherwise, false. The default is true.

Remarks

When a Deferred Load document is fully initialized and displayed, the previously selected document raises the BaseView.ControlReleasing event. If you handle this event and set the ControlReleasingEventArgs.KeepControl property to false, the document content will be unbound. By default, it will then be destroyed. You can set the DisposeControl property to false in order to keep the unbound content. In this case, you can pass it to another empty document when its BaseView.QueryControl event occurs.

See the Deferred Load topic to learn more.

See Also