Now you can bind C1Editor to a document that can be saved to a file and loaded later when needed. If this document is edited within the C1Editor, the underlying XmlDocument syncs to match it.
To write code in Visual Basic
Visual Basic |
Copy Code |
---|---|
Imports System.Xml Imports C1.Win.C1Editor |
To write code in C#
C# |
Copy Code |
---|---|
using System.Xml; using C1.Win.C1Editor; |
To write code in Visual Basic
Visual Basic |
Copy Code |
---|---|
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Dim myDoc As New XmlDocument() C1Editor1.Document = myDoc End Sub |
To write code in C#
C# |
Copy Code |
---|---|
private void Form1_Load(object sender, EventArgs e) { XmlDocument myDoc = new XmlDocument(); c1Editor1.Document = myDoc; } |
In the next step you will add code to apply a cascading style sheet to the C1Editor content.