Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Numbered And Bulleted Lists for Silverlight

, 8 Jun 2008 CPOL
Counterpart of HTML's ol and ul tags for Silverlight
orderedlist_silverlight.zip
Example1
ClientBin
ja
Example1.csproj.user
obj
Debug
TempPE
Properties
Example2
ClientBin
ja
Example2.csproj.user
obj
Debug
TempPE
Properties
Example3
ClientBin
images
ja
Example3.csproj.user
images
greentick.png
redcross.png
Thumbs.db
obj
Debug
TempPE
Properties
Thumbs.db
Example4
ClientBin
ja
Example4.csproj.user
obj
Debug
Refactor
TempPE
Properties
Example5
ClientBin
ja
Example5.csproj.user
obj
Debug
TempPE
Properties
Example6
ClientBin
Example6.dll
Example6.pdb
Example6.xap
ja
System.Windows.Controls.Extended.resources.dll
System.Windows.Controls.resources.dll
OrderedList.dll
OrderedList.pdb
System.Windows.Controls.dll
System.Windows.Controls.Extended.dll
Example6.csproj.user
obj
Debug
Example6.dll
Example6.g.resources
Example6.pdb
TempPE
Properties
OrderedList
ClientBin
ja
obj
Debug
Refactor
OrderedList.dll
TempPE
OrderedList.csproj.user
Properties
Test
ClientBin
ja
images
greentick.png
redcross.png
obj
Debug
TempPE
Properties
Test.csproj.user
Test_Web
App_Data
Bin
de
System.Web.Silverlight.resources.dll
es
System.Web.Silverlight.resources.dll
fr
System.Web.Silverlight.resources.dll
it
System.Web.Silverlight.resources.dll
ja
System.Web.Silverlight.resources.dll
ko
System.Web.Silverlight.resources.dll
System.Web.Silverlight.dll
System.Web.Silverlight.dll.refresh
zh-Hans
System.Web.Silverlight.resources.dll
zh-Hant
System.Web.Silverlight.resources.dll
ClientBin
Example1.xap
Example2.xap
Example3.xap
Example4.xap
Example5.xap
Test.xap
images
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace Example2
{
    public partial class Page : UserControl
    {
        // -------------------------------
        // Define Book class
        public class Book
        {
            public Book()
            {
            }

            public Book(string isbn, string title, DateTime publishdate, double price)
            {
                this.ISBN = isbn;
                this.Title = title;
                this.PublishDate = publishdate;
                this.Price = price;
            }

            public string ISBN { get; set; }
            public string Title { get; set; }
            public DateTime PublishDate { get; set; }
            public double Price { get; set; }
        }

        // -------------------------------
        //Create a collection to store data items
        public ObservableCollection<Book> _AllBooks;

        // -------------------------------

        public Page()
        {
            InitializeComponent();

            // Create collection with books
            _AllBooks = new ObservableCollection<Book>();
            _AllBooks.Add(new Book("3390092284", "All About Dogs", new DateTime(2004, 3, 4), 12.99));
            _AllBooks.Add(new Book("4458907683", "Training Your Dog", new DateTime(2000, 2, 8), 44.25));
            _AllBooks.Add(new Book("1258907683", "Training Your Cat", new DateTime(2000, 2, 8), 44.25));
            _AllBooks.Add(new Book("8456586489", "Kids and Dogs", new DateTime(2007, 5, 18), 10.50));

            // Show the _AllBooks list in the MyBooks ListBox
            MyBooks.DataContext = _AllBooks;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Matt Perdeck
Web Developer
Australia Australia
Twitter: @MattPerdeck
Blog: mattperdeck.com
Current project: JSNLog JavaScript Logging Package
 
Matt has over 6 years .NET and SQL Server development experience. Before getting into .Net, he worked on a number of systems, ranging from the largest ATM network in The Netherlands to embedded software in advanced Wide Area Networks and the largest ticketing web site in Australia. He has lived and worked in Australia, The Netherlands, Slovakia and Thailand.
 
He recently wrote a book, ASP.NET Performance Secrets (www.packtpub.com/asp-net-site-performance-secrets/book) in which he shows in clear and practical terms how to quickly find the biggest bottlenecks holding back the performance of your web site, and how to then remove those bottlenecks. The book deals with all environments affecting a web site - the web server, the database server and the browser.
 
Matt currently lives in Sydney, Australia. After 2 years at Readify, he now works at the global professional services company PwC. His current contract ends at 29 June 2014.
Follow on   Twitter   Google+

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 8 Jun 2008
Article Copyright 2008 by Matt Perdeck
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid