Binding C1XmlEditor to a Document
You can bind the C1XmlEditor control to a document specified in the Document property. If the document is edited within the C1XmlEditor, the underlying XmlDocument syncs to match it. If the XmlDocument changes in code, these changes are visible in the C1XmlEditor control at run time.
1. In Visual Studio, click the View menu and select Code to switch to Source view, if necessary.
2. Add the following statements to your project.
Imports C1.Win.XmlEditor
Imports System.Xml
• C#
using C1.Win.XmlEditor;
using System.Xml;
3. Add the following code to the Page_Load event to set the Document property.
Dim myDoc as new XmlDocument()
C1XmlEditor1.Document = myDoc
• C#
XmlDocument myDoc = new XmlDocument();
c1XmlEditor1.Document = myDoc;
|