Modify Path Specific Properties in PathListBox in Silverlight 4


Introduction

In this article we will see the LayoutPath properties that help in displaying the items in the path in PathListBox in Silverlight 4.

PathListBox1.gif

PathListBox2.gif

The above image shows the behaviour of paths in a PathListBox when default properties of the path(s) are selected.

Let's discuss some of the properties.

Capacity

This is a number that is referred to how many items would be displayed on the path.

In the above example we had seen default of 0 which is Auto. Now let's fix this value for first path.

PathListBox3.gif

Now we can see the following change in the output.

PathListBox4.gif

Start

This is a property which gets or sets the distance from the start of the LayoutPath to place the first item.

Now let's change the Start property of the 2nd path in the PathListBox.

Orientation

This is a property which gets or sets the orientation of the items in the path.

There are two kinds: None (default), and OrientToPath.

Let's set the first path's orientation to OrientToPath

PathListBox5.gif


And the output is as below.

PathListBox6.gif

Span

This is a property which gets or sets, the percentage of the Layoutpath that would participate in the layout.

Let's make the 3rd path's span as 50%.

PathListBox7.gif

The following is the output of the above change.

PathListBox8.gif
And 50% of the 3rd path is not participated in the layout.

Hope this article helps.
 

Up Next
    Ebook Download
    View all
    Learn
    View all