Back to Devexpress

DXRichEditBehaviorOptions.KeepStreamInDocumentSource Property

wpf-devexpress-dot-xpf-dot-richedit-dot-dxricheditbehavioroptions-62a36e2b.md

latest3.0 KB
Original Source

DXRichEditBehaviorOptions.KeepStreamInDocumentSource Property

Specifies whether to retain the reference to the stream from which the document is loaded as the RichEditControl.DocumentSource property value. This is a dependency property.

Namespace : DevExpress.Xpf.RichEdit

Assembly : DevExpress.Xpf.RichEdit.v25.2.dll

NuGet Package : DevExpress.Wpf.RichEdit

Declaration

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

Property Value

TypeDescription
Boolean

true , to update the RichEditControl.DocumentSource property to contain the stream reference; otherwise, false.

The default value is false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to KeepStreamInDocumentSource
RichEditControl

.BehaviorOptions .KeepStreamInDocumentSource

|

Remarks

When the document is loaded from a stream using one the RichEditControl.LoadDocument method overrides, the RichEditControl.DocumentSource property does not reference the Stream instance, but contains the StreamSource object instead. This behavior allows you to safely reduce the stream by the garbage collector.

To change this behavior and keep the stream reference as a RichEditControl.DocumentSource property value, set KeepStreamInDocumentSource to true. Note that in this case, the garbage collector will not be able to collect the target Stream instance.

Note

If the RichEditControl.DocumentSource is set to a stream directly, it will contain the stream reference regardless of the KeepStreamInDocumentSource value.

See Also

DXRichEditBehaviorOptions Class

DXRichEditBehaviorOptions Members

DevExpress.Xpf.RichEdit Namespace