Category / Section
How to load and save the contents of the WinForms SyntaxEditor (EditControl) from or to a memory stream?
1 min read
Load or save the content
The below code helps you to know how to load and save the contents of the Edit Control from or to a memory stream.
C#
// Sample to load the contents of any desired file into the Edit Control. this.editControl1.LoadStream(streamName); this.editControl1.LoadStream(streamName, config); // Sample to save the contents of the Edit Control into the memory stream. this.editControl1.SaveToStream(); this.editControl1.SaveToStream(streamName);
VB
' Sample to load the contents of any desired file into the Edit Control. Me.editControl1.LoadStream(streamName) Me.editControl1.LoadStream(streamName, config) ' Sample to save the contents of the Edit Control into the memory stream. Me.editControl1.SaveToStream() Me.editControl1.SaveToStream(streamName)
Reference link: https://help.syncfusion.com/windowsforms/syntaxeditor/file-operation