Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor Namespace / C1Editor Class
Members Example

In This Topic
    C1Editor Class
    In This Topic
    Represents the C1Editor control.
    Object Model
    C1Editor Class
    Syntax
    'Declaration
     
    Public Class C1Editor 
       Inherits System.Windows.Forms.UserControl
    public class C1Editor : System.Windows.Forms.UserControl 
    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.

    Example
    This sample shows how to load an XHTML string into the editor and append a stylesheet using functions of XmlDocument.
    c1Editor1.LoadXml(xhtml);
    XmlElement style = c1Editor1.Document.CreateElement("style");
    style.InnerXml = "strong {text-decoration:underline}";
    foreach (XmlNode node in c1Editor1.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.C1Editor.C1Editor

    See Also