Outline Class

Represents a Outline.
Inheritance Hierarchy
SystemObject
  Aspose.NoteNode
    Aspose.NoteCompositeNodeBase
      Aspose.NoteCompositeNodeIOutlineChildNode
        Aspose.NoteOutline

Namespace:  Aspose.Note
Assembly:  Aspose.Note (in Aspose.Note.dll) Version: 21.7
Syntax
public sealed class Outline : CompositeNode<IOutlineChildNode>, 
	IPageChildNode, INode

The Outline type exposes the following members.

Constructors
  NameDescription
Public methodOutline
Initializes a new instance of the Outline class.
Properties
  NameDescription
Public propertyChildren
Gets all child nodes of this node as an enumerable collection.
(Inherited from CompositeNodeT.)
Public propertyDescendantsCannotBeMoved
Gets whether descendants of the outline can be moved.
Public propertyDocument
Gets the document of the node.
(Inherited from Node.)
Public propertyCode exampleFirstChild
Gets the first child node of this node.
(Inherited from CompositeNodeT.)
Public propertyHorizontalOffset
Gets or sets the horizontal offset.
Public propertyIndentPosition
Gets or sets the indent position.
Public propertyIsComposite
Checks whether the node is composite. If true then the node can have child nodes.
(Inherited from CompositeNodeT.)
Public propertyLastChild
Gets the last child node of this node.
(Inherited from CompositeNodeT.)
Public propertyLastModifiedTime
Gets or sets the last modified time.
Public propertyMaxHeight
Gets or sets the max height.
Public propertyMaxWidth
Gets or sets the max width.
Public propertyMinWidth
Gets or sets the min width.
Public propertyNextSibling
Gets the next node at the same node tree level.
(Inherited from Node.)
Public propertyNodeType
Gets the node type.
(Inherited from Node.)
Public propertyParentNode
Gets the parent node.
(Inherited from Node.)
Public propertyPreviousSibling
Gets the previous node at the same node tree level.
(Inherited from Node.)
Public propertyReservedWidth
Gets or sets the reserved width.
Public propertyVerticalOffset
Gets or sets the vertical offset.
Methods
  NameDescription
Public methodAccept
Accepts the visitor of the node.
(Overrides CompositeNodeTAccept(DocumentVisitor).)
Public methodAppendChildFirst
Adds the node to the front of the list of child nodes for this node.
(Inherited from CompositeNodeT.)
Public methodAppendChildLast
Adds the node to the end of the list of child nodes for this node.
(Inherited from CompositeNodeT.)
Public methodEquals (Inherited from Object.)
Public methodGetChildNodes(NodeType) Obsolete.
Get all child nodes by node type.
(Inherited from CompositeNodeT.)
Public methodCode exampleGetChildNodesT1
Get all child nodes by the node type.
(Inherited from CompositeNodeT.)
Public methodGetEnumerator (Inherited from CompositeNodeT.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInsertChild
Inserts the node to the specified position in the list of child nodes for this node.
(Inherited from CompositeNodeT.)
Public methodInsertChildrenRange(Int32, IEnumerableT)
Inserts the node's sequence starting from specified position in the list of child nodes for this node.
(Inherited from CompositeNodeT.)
Public methodInsertChildrenRange(Int32, T)
Inserts the node's sequence starting from specified position in the list of child nodes for this node.
(Inherited from CompositeNodeT.)
Public methodRemoveChild
Removes the child node.
(Inherited from CompositeNodeT.)
Public methodToString (Inherited from Object.)
Examples
Shows how to add new image with tag.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Tags();

// Create an object of the Document class
Document doc = new Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize Outline class object
Outline outline = new Outline(doc);

// Initialize OutlineElement class object
OutlineElement outlineElem = new OutlineElement(doc);

// Load an image
Aspose.Note.Image image = new Aspose.Note.Image(doc, dataDir + "icon.jpg");

// Insert image in the document node
outlineElem.AppendChildLast(image);
image.Tags.Add(new NoteTag
                    {
                        Icon = TagIcon.YellowStar,
                    });

// Add outline element node
outline.AppendChildLast(outlineElem);

// Add outline node
page.AppendChildLast(outline);

// Add page node
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "AddImageNodeWithTag_out.one";
doc.Save(dataDir);
Examples
Shows how to insert new list with chinese numbering.
string dataDir = RunExamples.GetDataDir_Text();

// Initialize OneNote document
Aspose.Note.Document doc = new Aspose.Note.Document();

// Initialize OneNote page
Aspose.Note.Page page = new Aspose.Note.Page(doc);
Outline outline = new Outline(doc);

// Apply text style settings
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

// Numbers in the same outline are automatically incremented.
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);

//------------------------
OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);

//------------------------
OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.ChineseCounting, "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);

//------------------------
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);
page.AppendChildLast(outline);
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "InsertChineseNumberList_out.one"; 
doc.Save(dataDir);
Examples
Shows how to insert new bulleted lis.
string dataDir = RunExamples.GetDataDir_Text();

// Create an object of the Document class
Aspose.Note.Document doc = new Aspose.Note.Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize Outline class object
Outline outline = new Outline(doc);

// Initialize TextStyle class object and set formatting properties
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

// Initialize OutlineElement class objects and apply bullets
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };

// Initialize RichText class object and apply text style
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);

OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);

OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("*", "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);

// Add outline elements
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);

// Add Outline node
page.AppendChildLast(outline);
// Add Page node
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "ApplyBulletsOnText_out.one"; 
doc.Save(dataDir);
Examples
Shows how to insert new list with numbering.
string dataDir = RunExamples.GetDataDir_Text();

// Create an object of the Document class
Document doc = new Document();

// Initialize Page class object
Aspose.Note.Page page = new Aspose.Note.Page(doc);

// Initialize Outline class object
Outline outline = new Outline(doc);

// Initialize TextStyle class object and set formatting properties
ParagraphStyle defaultStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 };

// Initialize OutlineElement class objects and apply numbering
// Numbers in the same outline are automatically incremented.
OutlineElement outlineElem1 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text1 = new RichText(doc) { Text = "First", ParagraphStyle = defaultStyle };
outlineElem1.AppendChildLast(text1);

OutlineElement outlineElem2 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text2 = new RichText(doc) { Text = "Second", ParagraphStyle = defaultStyle };
outlineElem2.AppendChildLast(text2);

OutlineElement outlineElem3 = new OutlineElement(doc) { NumberList = new NumberList("{0})", NumberFormat.DecimalNumbers, "Arial", 10) };
RichText text3 = new RichText(doc) { Text = "Third", ParagraphStyle = defaultStyle };
outlineElem3.AppendChildLast(text3);

// Add outline elements
outline.AppendChildLast(outlineElem1);
outline.AppendChildLast(outlineElem2);
outline.AppendChildLast(outlineElem3);

// Add Outline node
page.AppendChildLast(outline);

// Add Page node
doc.AppendChildLast(page);

// Save OneNote document
dataDir = dataDir + "ApplyNumberingOnText_out.one"; 
doc.Save(dataDir);
See Also