menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WSymbol - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class WSymbol

    Represents a symbol in the Word document.

    Inheritance
    System.Object
    OwnerHolder
    XDLSSerializableBase
    Entity
    WidgetBase
    ParagraphItem
    WSymbol
    Implements
    IXDLSSerializable
    IParagraphItem
    IEntity
    IOfficeRun
    Inherited Members
    Entity.Clone()
    Entity.IsComposite
    Entity.NextSibling
    Entity.Owner
    Entity.PreviousSibling
    OwnerHolder.Document
    OwnerHolder.m_doc
    ParagraphItem.ApplyStyle(String)
    ParagraphItem.CloneRun()
    ParagraphItem.Dispose()
    ParagraphItem.IsDeleteRevision
    ParagraphItem.IsInsertRevision
    ParagraphItem.m_charFormat
    ParagraphItem.OwnerMathRunElement
    ParagraphItem.OwnerParagraph
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DocIO.DLS
    Assembly: Syncfusion.DocIO.Base.dll
    Syntax
    public class WSymbol : ParagraphItem, IXDLSSerializable, IParagraphItem, IEntity, IOfficeRun, ILeafWidget, IWidget
    Examples
    private void Button1_Click(System.Object sender, System.EventArgs e)
    {
        //Create a new Word document 
        WordDocument document = new WordDocument();
        //Add new section to the document
        IWSection section = document.AddSection();
        //Add new paragraph to the section
        IWParagraph paragraph = section.AddParagraph();
        paragraph.AppendText("Example of adding symbols to the paragraph: ");
        //Insert symbol with character code 100
        WSymbol symbol = paragraph.AppendSymbol(100);
        symbol.FontName = "Windings";
        //Save and close the Word document
        document.Save("Sample.docx", FormatType.Docx);
        document.Close();
    }
    Private Sub button_Click(sender As Object, e As EventArgs)
        'Create a new Word document 
        Dim document As New WordDocument()
        'Add new section to the document
        Dim section As IWSection = document.AddSection()
        'Add new paragraph to the section
        Dim paragraph As IWParagraph = section.AddParagraph()
        paragraph.AppendText("Example of adding symbols to the paragraph: ")
        'Insert symbol with character code 100
        Dim symbol As WSymbol = paragraph.AppendSymbol(100)
        symbol.FontName = "Windings"
        'Save and close the Word document
        document.Save("Sample.docx", FormatType.Docx)
        document.Close()
    End Sub

    Constructors

    WSymbol(IWordDocument)

    Initialize a new instance of the WSymbol class with the specified IWordDocument instance.

    Declaration
    public WSymbol(IWordDocument doc)
    Parameters
    Type Name Description
    IWordDocument doc

    The IWordDocument instance.

    Properties

    CharacterCode

    Gets or sets symbol's character code.

    Declaration
    public byte CharacterCode { get; set; }
    Property Value
    Type
    System.Byte

    CharacterFormat

    Gets the character format for the symbol. Read-only.

    Declaration
    public WCharacterFormat CharacterFormat { get; }
    Property Value
    Type
    WCharacterFormat

    EntityType

    Gets the type of the entity. Read-only.

    Declaration
    public override EntityType EntityType { get; }
    Property Value
    Type Description
    EntityType

    The EntityType of the current item.

    Overrides
    Entity.EntityType

    FontName

    Gets or sets font name for the symbol.

    Declaration
    public string FontName { get; set; }
    Property Value
    Type
    System.String

    Methods

    CloneImpl()

    Creates a duplicate copy of the entity.

    Declaration
    protected override object CloneImpl()
    Returns
    Type Description
    System.Object

    The reference to the newly created object.

    Overrides
    ParagraphItem.CloneImpl()

    CreateLayoutInfo()

    Creates layout information.

    Declaration
    protected override void CreateLayoutInfo()
    Overrides
    WidgetBase.CreateLayoutInfo()

    InitXDLSHolder()

    Registers child objects in XDSL holder.

    Declaration
    protected override void InitXDLSHolder()
    Overrides
    XDLSSerializableBase.InitXDLSHolder()

    ReadXmlAttributes(IXDLSAttributeReader)

    Reads object data from xml attributes.

    Declaration
    protected override void ReadXmlAttributes(IXDLSAttributeReader reader)
    Parameters
    Type Name Description
    IXDLSAttributeReader reader

    The IXDLSAttributeReader object.

    Overrides
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)

    WriteXmlAttributes(IXDLSAttributeWriter)

    Writes object data as xml attributes.

    Declaration
    protected override void WriteXmlAttributes(IXDLSAttributeWriter writer)
    Parameters
    Type Name Description
    IXDLSAttributeWriter writer

    The IXDLSAttributeWriter object.

    Overrides
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)

    Implements

    IXDLSSerializable
    IParagraphItem
    IEntity
    IOfficeRun
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved