Represents the C1XmlEditor control.
Namespace:
C1.Win.XmlEditorAssembly: C1.Win.XmlEditor.2 (in C1.Win.XmlEditor.2.dll)
Syntax
| C# |
|---|
[ToolboxBitmapAttribute(typeof(C1XmlEditor), "c1winforms_xhtmleditor_16.png")] [ToolboxItemAttribute(true)] [LicenseProviderAttribute] public class C1XmlEditor : UserControl, ISupportInitialize |
| Visual Basic (Declaration) |
|---|
<ToolboxBitmapAttribute(GetType(C1XmlEditor), "c1winforms_xhtmleditor_16.png")> _ <ToolboxItemAttribute(True)> _ <LicenseProviderAttribute> _ Public Class C1XmlEditor _ Inherits UserControl _ Implements ISupportInitialize |
Remarks
The control has a Document property. It is possible to assign an existing document to this property and it will be displayed in the control. The control and the document are bound. If the document is edited within the control, the underlying XmlDocument changes to match the edited document. If the XmlDocument changes (in code), then the changes appear in the editor.
Examples
This sample shows how to load an XHTML string into the editor and
append a stylesheet using functions of XmlDocument.
Copy CodeC#
c1XmlEditor1.LoadXml(xhtml); XmlElement style = c1XmlEditor1.Document.CreateElement("style"); style.InnerXml = "strong {text-decoration:underline}"; foreach (XmlNode node in c1XmlEditor1.Document.DocumentElement) { if (node.Name == "head") { node.AppendChild(style); break; } } |
Inheritance Hierarchy
System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Windows.Forms..::.Control
System.Windows.Forms..::.ScrollableControl
System.Windows.Forms..::.ContainerControl
System.Windows.Forms..::.UserControl
C1.Win.XmlEditor..::.C1XmlEditor
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Windows.Forms..::.Control
System.Windows.Forms..::.ScrollableControl
System.Windows.Forms..::.ContainerControl
System.Windows.Forms..::.UserControl
C1.Win.XmlEditor..::.C1XmlEditor