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

WorkspaceManager.CloseStreamOnWorkspaceSaving Property

Gets or sets whether this WorkspaceManager should automatically close streams opened when saving workspaces.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v21.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Win.Design, DevExpress.Wpf.Core

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean CloseStreamOnWorkspaceSaving { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean enumerator value that specifies whether this WorkspaceManager should automatically close streams opened when saving workspaces.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

Each time the WorkspaceManager saves (WorkspaceManager.SaveWorkspace) or loads (WorkspaceManager.LoadWorkspace) a workspace, it opens a stream to work with an XML file. By default, these streams are not closed automatically and stay in memory, which can cause performance issues when working with large workspaces. To force the WorkspaceManager to close these streams, set the CloseStreamOnWorkspaceSaving and WorkspaceManager.CloseStreamOnWorkspaceLoading properties to DefaultBoolean.True.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CloseStreamOnWorkspaceSaving 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.

See Also