Step 2 of 3: Adding Data to the ListBox

In the last step, you added the C1ListBox control to the application. In this step, you will add code to display images from a photo stream.

Complete the following steps to add data to the control programmatically:

1.   Right-click the Window and select View Code to switch to the Code Editor.

2.   Add the following imports statements to the top of the page:

      Visual Basic

      C#

3.   Add the following code inside the initial event handler:

      Visual Basic

      C#

4.   Add the following code below within the MainWindow class:

      Visual Basic

      C#

5.   The code above pulls images from Flickr's public photo stream and binds the C1ListBox to the list of images.

6.   Add the following code just below the MainPage class:

      Visual Basic

      C#

What You've Accomplished

You have successfully added data to C1TileListBox. In the next step, Step 3 of 3: Running the ListBox Application, you'll examine the ListBox for WPF features.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.