Back to Devexpress

ControlReleasingEventArgs.DisposeControl Property

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-controlreleasingeventargs.md

latest2.6 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public bool DisposeControl { get; set; }
vb
Public Property DisposeControl As Boolean

Property Value

TypeDescription
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

ControlReleasing

QueryControl

Deferred Load

ControlReleasingEventArgs Class

ControlReleasingEventArgs Members

DevExpress.XtraBars.Docking2010.Views Namespace