List.Decoration Property
Gets or sets the type of decoration used for items. The default value is None. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.
Assembly: System.Web.Mobile (in System.Web.Mobile.dll)
Property Value
Type: System.Web.UI.MobileControls.ListDecorationAn enumerated value representing the type of decoration used for items.
Where the target device permits, list items can be undecorated, or decorated with bullets or numbers. The ListDecoration enumeration has the following values:
Name | Description |
|---|---|
No decoration. | |
List items are decorated with a bullet. | |
List items are decorated with a number. |
The following code example demonstrates how to use the Decoration property to change the list to a numbered list. The property is set in the last line of the Page_Load method. This example is part of a larger example for the List overview.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) If Not IsPostBack Then ' Set the DataMembers of the List List1.DataValueField = "Status" List1.DataTextField = "TaskName" ' Create an ArrayList of task data Dim arr As ArrayList = New ArrayList() arr.Add(New Task("Define transactions", "scheduled")) arr.Add(New Task("Verify transactions", "scheduled")) arr.Add(New Task("Check balance sheet", "scheduled")) arr.Add(New Task("Compile balance sheet", "scheduled")) arr.Add(New Task("Prepare report", "scheduled")) arr.Add(New Task("Send report", "scheduled")) ' Bind the array to the list List1.DataSource = arr List1.DataBind() Const spec As String = "Start: {0} tasks are done, {1} " & _ "tasks are scheduled, and {2} tasks are pending." Label2.Text = String.Format(spec, doneCount, _ schedCount, pendCount) List1.Decoration = ListDecoration.Bulleted End If End Sub
Available since 1.1
List Class
System.Web.UI.MobileControls Namespace
Introduction to the List Control