Exemplo n.º 1
0
 void Page_Loaded(object sender, RoutedEventArgs e)
 {
     Book book = new Book();
     InitializeProgramming(book);
     LayoutRoot.DataContext = book;
     Title.Click += new RoutedEventHandler(Title_Click);
     Author.Click += new RoutedEventHandler(Author_Click);
     Chapters.MouseLeftButtonUp += new MouseButtonEventHandler(
           Chapters_MouseLeftButtonUp);
 }
Exemplo n.º 2
0
 private void InitializeProgramming(Book b)
 {
     b.Title = "Programming Silverlight";
     b.Author = "Jesse Liberty, Tim Heuer";
     b.MultipleAuthor = true;
     b.QuantityOnHand = 20;
     b.Chapters = new List<string>()
        {
        "Introduction", "Controls",
        "Events", "Data", "Styles and Templates",
     "Media", "Graphics", "Text", "Animation", "Custom Controls",
     "Network", "Web Services", "App Model"
        };
 }