UnorderedList

Represents the unordered list.

public class UnorderedList : List, IArea, ICoordinate, ISerializable
Public Class UnorderedList
    Inherits List
    Implements IArea, ICoordinate, ISerializable

Inheritance: ObjectPageElementTaggablePageElementRotatingPageElementListUnorderedList

Implements: IArea, ICoordinate, ISerializable

Licensing Info

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example shows a UnorderedList text being displayed on the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
    
Module MyModule
    Sub Main()
    ' Create a PDF Document
    Dim MyDocument As Document = New Document
    
    ' Create a Page
    Dim MyPage As Page = New Page
    
    ' Create a OrderedList.
    Dim list As UnorderedList = New UnorderedList(50, 50, 300, 500)
    
    list.ListItemTopMargin = 5
    list.ListItemBottomMargin = 5
    list.TextColor = RgbColor.BlueViolet
    
    ' Add ListItem to the List.
    Dim item1 As ListItem = list.Items.Add("List item 1")
    item1.Underline = True
    Dim item2 As ListItem = list.Items.Add("List item 2")
    item2.Underline = True
    Dim item3 As ListItem = list.Items.Add("List item 3")
    item3.Underline = True
    Dim item4 As ListItem = list.Items.Add("List item 4")
    item4.Underline = True
    
    ' Add OrderedSubList under ListItem item1
    Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
    subList1.TextColor = RgbColor.HotPink
    Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
    Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")
    
    Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
    subList2.TextColor = RgbColor.DarkGoldenRod
    Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
    Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")
    
    Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
    subList3.TextColor = RgbColor.DarkGoldenRod
    Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
    Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")
    
    Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
    subList4.TextColor = RgbColor.HotPink
    Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
    Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")
    
    Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
    subList5.TextColor = RgbColor.DarkGoldenRod
    Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
    Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")
    
    Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
    subList6.TextColor = RgbColor.DarkGoldenRod
    Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
    Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")
    
    Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
    subList7.TextColor = RgbColor.HotPink
    Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
    Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")
    
    ' Add the OrderedList to the Page.
    MyPage.Elements.Add(list)
    
    'Add the Page to the Document.
    MyDocument.Pages.Add(MyPage)
    
    ' Save the PDF.
    MyDocument.Draw("C:\MyDocument.pdf")
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
		Document document = new Document();

        // Create a Page.
        Page page = new Page();

        // Create a UnorderedList.
        UnorderedList list = new UnorderedList(50, 50, 300, 500);

        list.ListItemTopMargin = 5;
        list.ListItemBottomMargin = 5;
        list.TextColor = RgbColor.BlueViolet;

        // Add ListItem to the List.
        ListItem item1 = list.Items.Add("List item 1");
        item1.Underline = true;
        ListItem item2 = list.Items.Add("List item 2");
        item2.Underline = true;
        ListItem item3 = list.Items.Add("List item 3");
        item3.Underline = true;
        ListItem item4 = list.Items.Add("List item 4");
        item4.Underline = true;

        // Add UnorderedSubList under ListItem item1
        UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
        subList1.TextColor = RgbColor.HotPink;
        ListItem item5 = subList1.Items.Add("Sub-list item 1");
        ListItem item6 = subList1.Items.Add("Sub-list item 2");

        UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
        subList2.TextColor = RgbColor.DarkGoldenRod;
        ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
        ListItem item8 = subList2.Items.Add("Second level sub-list item 2");

        UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
        subList3.TextColor = RgbColor.DarkGoldenRod;
        ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
        ListItem item10 = subList3.Items.Add("Second level sub-list item 2");

        UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
        subList4.TextColor = RgbColor.HotPink;
        ListItem item11 = subList4.Items.Add("Sub-list item 1");
        ListItem item12 = subList4.Items.Add("Sub-list item 2");

        UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
        subList5.TextColor = RgbColor.DarkGoldenRod;
        ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
        ListItem item14 = subList5.Items.Add("Second level sub-list item 2");

        UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
        subList6.TextColor = RgbColor.DarkGoldenRod;
        ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
        ListItem item16 = subList6.Items.Add("Second level sub-list item 2");

        UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
        subList7.TextColor = RgbColor.HotPink;
        ListItem item17 = subList7.Items.Add("Sub-list item 1");
        ListItem item18 = subList7.Items.Add("Sub-list item 2");

        // Add the UnorderedList to the page
        page.Elements.Add(list);

        // Add the Page to the Document.
        document.Pages.Add(page);

        // Save the PDF.
        document.Draw(outputPath);
    } 
}

Remarks

See the Lists topic for more on unordered lists.

NOTE: This page element cannot be used within a table cell, or transformation group.

Constructors

UnorderedList(Single, Single, Single, Single)Creating new Instance of the UnorderedList.
UnorderedList(Single, Single, Single, Single, Font, Single)Creating new Instance of the UnorderedList.
UnorderedList(Single, Single, Single, Single, Font, Single, UnorderedListStyle)Creating new Instance of the UnorderedList.

Properties

AngleGets or sets the heights of the angle element.
(Inherited from RotatingPageElement)
BulletAlignGets or sets the Align enumeration that specifies the Bullet alignment of the List.
(Inherited from List)
BulletAreaWidthGets or sets the Width in which bullets will be drawn, for each ListItem of the List.
(Inherited from List)
BulletSizeGets or Sets the bullet's size for the List .
(Inherited from List)
BulletStyleGets or Sets the BulletStyle of the List.
FontGets or sets the Font of the text for the List.
(Inherited from List)
FontSizeGets or Sets the Font size of the List.
(Inherited from List)
HeightGets or sets the Height of the List.
(Inherited from List)
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
ItemsGets the ListItemLists of the List.
(Inherited from List)
LeadingGets or Sets the leading for the text of the List.
(Inherited from List)
LeftIndentGets or Sets the LeftIndent of the whole List. Each ListItem may have his own LeftIndent.
(Inherited from List)
ListItemBottomMarginGets or Sets the BottomMargin of the ListItems in the List.
(Inherited from List)
ListItemTopMarginGets or Sets the TopMargin of the ListItems in the List.
(Inherited from List)
ParagraphIndentGets or Sets the paragraphIndent of the List.
(Inherited from List)
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
RightIndentGets or Sets the RightIndent of the whole List. Each ListItem may have his own RightIndent.
(Inherited from List)
RightToLeftGets or Sets a value indicating if the Text is in RighttoLeft language.
(Inherited from List)
StrikeThroughGets or Sets the text of each ListItem of the List as StrikeThrough.
(Inherited from List)
TagGets or sets the tag of the taggable element.
(Inherited from List)
TagOrderGets or sets the tag order of the taggable element.
(Inherited from List)
TextAlignGets or sets the TextAlign enumeration that specifies the text alignment of the List.
(Inherited from List)
TextColorGets or sets the Color of the Text for whole List.
(Inherited from List)
TextOutlineColorGets or sets the Color of the text outline for whole List.
(Inherited from List)
TextOutlineWidthGets or sets the line width to use for the text outline of the list.
(Inherited from List)
WidthGets or sets the Width of the List.
(Inherited from List)
XGets or sets the X coordinate of the page element.
(Inherited from RotatingPageElement)
YGets or sets the Y coordinate of the page element.
(Inherited from RotatingPageElement)

Methods

Draw(PageWriter)Draws the page element to the given PageWriter object.
(Inherited from RotatingPageElement)
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetOverFlowList()Gets a UnorderedList object containing the List Text.
GetOverFlowList(Single, Single)Gets a UnorderedList object containing the List Text.
GetRequiredHeight()Gets the height required to fit all of the text supplied.
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements

In this topic