Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Package: 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