menu

UWP

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

    Show / Hide Table of Contents

    Class WSmartArt

    Represents a SmartArt diagram.

    Inheritance
    System.Object
    OwnerHolder
    XDLSSerializableBase
    Entity
    WidgetBase
    ParagraphItem
    ShapeCommon
    ShapeBase
    WSmartArt
    Implements
    IXDLSSerializable
    IParagraphItem
    IOfficeRun
    IEntity
    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
    ShapeBase.HorizontalAlignment
    ShapeBase.HorizontalOrigin
    ShapeBase.HorizontalPosition
    ShapeBase.IsBelowText
    ShapeBase.LockAnchor
    ShapeBase.VerticalAlignment
    ShapeBase.VerticalOrigin
    ShapeBase.VerticalPosition
    ShapeBase.Visible
    ShapeBase.WrapFormat
    ShapeCommon.AlternativeText
    ShapeCommon.Height
    ShapeCommon.HeightScale
    ShapeCommon.Item[Int32]
    ShapeCommon.Name
    ShapeCommon.Title
    ShapeCommon.Width
    ShapeCommon.WidthScale
    XDLSSerializableBase.InitXDLSHolder()
    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.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.XDLSHolder
    Namespace: Syncfusion.DocIO.DLS
    Assembly: Syncfusion.DocIO.UWP.dll
    Syntax
    public class WSmartArt : ShapeBase, IXDLSSerializable, IWidget, IParagraphItem, IOfficeRun, IEntity

    Properties

    Background

    Gets an IOfficeShapeFill object that represents the background fill of the SmartArt.

    Declaration
    public IOfficeShapeFill Background { get; }
    Property Value
    Type Description
    IOfficeShapeFill

    A value of the IOfficeShapeFill object that represents the background of the SmartArt.

    Examples
    //Create a Word document.
    using (WordDocument document = new WordDocument())
    {
        //Adds one section and one paragraph to the document.
        document.EnsureMinimal();
        //Appends a new SmartArt to the paragraph.
        WSmartArt smartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426);
        // Add a new node to SmartArt.
        IOfficeShapeFill background = smartArt.Background;
        //Set the fill type of the SmartArt.
        background.FillType = OfficeShapeFillType.Solid;
        //Set the fill color of SmartArt.
        background.SolidFill.Color = Color.Red;
        //Saves the Word document.
        document.Save("Result.docx", FormatType.Docx);
    }
    'Create a Word document.
    Using document As New WordDocument()
        'Adds one section and one paragraph to the document.
        document.EnsureMinimal()
        'Appends a new SmartArt to the paragraph.
        Dim smartArt As WSmartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426)
        'Add a new node to SmartArt.
        Dim background As IOfficeShapeFill = smartArt.Background
        'Set the fill type of the SmartArt.
        background.FillType = OfficeShapeFillType.Solid
        'Set the fill color of SmartArt.
        background.SolidFill.Color = Color.Red
        'Saves the Word document.
        document.Save("Result.docx", FormatType.Docx)
    End Using

    EntityType

    Gets the type of the entity, which is SmartArt in this case.

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

    A value of the EntityType enumeration that represents the entity type.

    Overrides
    Entity.EntityType

    Layout

    Gets an OfficeSmartArtType value that represents the layout type associated with the SmartArt. Read-only.

    Declaration
    public OfficeSmartArtType Layout { get; }
    Property Value
    Type Description
    OfficeSmartArtType

    A value of the OfficeSmartArtType enumeration that represents layout of the SmartArt.

    Examples
    //Create a Word document.
    using (WordDocument document = new WordDocument())
    {
        //Adds one section and one paragraph to the document.
        document.EnsureMinimal();
        //Appends a new SmartArt to the paragraph.
        WSmartArt smartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426);
        //Add a new node to SmartArt.
        IOfficeSmartArtNode newNode = smartArt.Nodes.Add();
        //Gets the SmartArt layout.
        OfficeSmartArtType smartArtType = smartArt.Layout;
        //Saves the Word document.
        document.Save("Result.docx", FormatType.Docx);
    }
    'Create a Word document.
    Using document As New WordDocument()
        'Adds one section and one paragraph to the document.
        document.EnsureMinimal()
        'Appends a new SmartArt to the paragraph.
        Dim smartArt As WSmartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426)
        'Add a new node to SmartArt.
        Dim newNode As IOfficeSmartArtNode = smartArt.Nodes.Add()
        'Gets the SmartArt layout.
        Dim smartArtType As OfficeSmartArtType = smartArt.Layout
        'Saves the Word document.
        document.Save("Result.docx", FormatType.Docx)
    End Using

    LineFormat

    Gets an IOfficeShapeLineFormat object that represents the line and arrowhead formatting of the SmartArt. Read-only.

    Declaration
    public IOfficeShapeLineFormat LineFormat { get; }
    Property Value
    Type Description
    IOfficeShapeLineFormat

    A value of the IOfficeShapeLineFormat object that represents the line format of the SmartArt.

    Examples
    //Create a Word document.
    using (WordDocument document = new WordDocument())
    {
        //Adds one section and one paragraph to the document.
        document.EnsureMinimal();
        //Appends a new SmartArt to the paragraph.
        WSmartArt smartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426);
        //Add a new node to SmartArt.
        IOfficeShapeLineFormat lineFormat = smartArt.LineFormat;
        //Set the fill type of the SmartArt.
        lineFormat.Fill.FillType = OfficeShapeFillType.Solid;
        //Set the fill color of SmartArt.
        lineFormat.Fill.SolidFill.Color = Color.Red;
        //Saves the Word document.
        document.Save("Result.docx", FormatType.Docx);
    }
    'Create a Word document.
    Using document As New WordDocument()
        'Adds one section and one paragraph to the document.
        document.EnsureMinimal()
        'Appends a new SmartArt to the paragraph.
        Dim smartArt As WSmartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426)
        'Add a new node to SmartArt.
        Dim lineFormat As IOfficeShapeLineFormat = smartArt.LineFormat
        'Set the fill type of the SmartArt.
        lineFormat.Fill.FillType = OfficeShapeFillType.Solid
        'Set the fill color of SmartArt.
        lineFormat.Fill.SolidFill.Color = Color.Red
        'Saves the Word document.
        document.Save("Result.docx", FormatType.Docx)
    End Using

    Nodes

    Gets an IOfficeSmartArtNodes object that contains all the nodes within the SmartArt graphic. Read-only.

    Declaration
    public IOfficeSmartArtNodes Nodes { get; }
    Property Value
    Type Description
    IOfficeSmartArtNodes

    A value of the IOfficeSmartArtNodes object that represents the nodes of the SmartArt.

    Examples
    //Create a Word document.
    using (WordDocument document = new WordDocument())
    {
        //Adds one section and one paragraph to the document.
        document.EnsureMinimal();
        //Appends a new SmartArt to the paragraph.
        WSmartArt smartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426);
        // Add a new node to SmartArt.
        IOfficeSmartArtNode newNode = smartArt.Nodes.Add();
        // Set the text to the newly added node.
        newNode.TextBody.AddParagraph("New main node added.");
        //Saves the Word document.
        document.Save("Result.docx", FormatType.Docx);
    }
    'Create a Word document.
    Using document As New WordDocument()
        'Adds one section and one paragraph to the document.
        document.EnsureMinimal()
        'Appends a new SmartArt to the paragraph.
        Dim smartArt As WSmartArt = document.LastParagraph.AppendSmartArt(OfficeSmartArtType.BasicBlockList, 640, 426)
        'Add a new node to SmartArt.
        Dim newNode As IOfficeSmartArtNode = smartArt.Nodes.Add()
        'Set the text to the newly added node.
        newNode.TextBody.AddParagraph("New main node added.")
        'Saves the Word document.
        document.Save("Result.docx", FormatType.Docx)
    End Using

    Methods

    CloneImpl()

    Creates a duplicate copy of the entity.

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

    A reference to the newly created object.

    Overrides
    ShapeBase.CloneImpl()

    Implements

    IXDLSSerializable
    IParagraphItem
    IOfficeRun
    IEntity

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved