Multiple Paths In Path ListBox In Silverlight 4
In this article we will see how multiple paths can be used in PathListBox control in Silverlight 4.
Creating Silverlight Project
Fire up Visual Studio 2010 and create a new Silverlight Application Project. Name it as MultiplePathSample.
Let’s draw some paths.
I have used Expression Designer to draw paths, as it’s kind of difficult to draw better paths in Blend.
Copy the path design from Expression Designer and paste in Blend.
I have created 3 different paths as displayed below.
Now let’s add a PathListBox to the Layoutroot.
As I said in earlier post. Don’t think about it’s position of the PathListBox control. Wherever the paths would be the that is it’s position.
Now let’s add these 3 paths to the PathListBox.
Once you add paths to the PathListBox, the paths would be named automatically, such as in our case path, path1 and path2.
You can even name the paths first and then add, there is no conflict in that.
Now let’s add some sample data to the PathListBox.
Now let’s run the application and here it is all the items are added to the paths automatically.
Hope this article helps.