Sign In|Join
Home/Silverlight.NET Forums/General Silverlight Programming/Programming with .NET - General/List box content in horrizontal
Last post Apr 08, 2008 12:53 PM by MattDrimo Xceed
Member
73 Points
122 Posts
Apr 08, 2008 10:40 AM | LINK
I created a List box and the datas been added......the normal allignment of listdata is displayed in vertical....is it possible to display mt list datas in horrizontal way...can any one solve this one...????????????
168 Points
28 Posts
Apr 08, 2008 12:53 PM | LINK
Yes, you need to set the itemsPannel property to a panel that supports horizontal layout :
<ListBox> <ListBoxItem> <Image Source="item1.jpg" /> </ListBoxItem> <ListBoxItem> <Image Source="item2.jpg" /> </ListBoxItem> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox>
pleaes mark this post as answered if it helped ! :)
vicraze
Member
73 Points
122 Posts
List box content in horrizontal
Apr 08, 2008 10:40 AM | LINK
I created a List box and the datas been added......the normal allignment of listdata is displayed in vertical....is it possible to display mt list datas in horrizontal way...can any one solve this one...????????????
MattDrimo Xceed
Member
168 Points
28 Posts
Re: List box content in horrizontal
Apr 08, 2008 12:53 PM | LINK
Yes, you need to set the itemsPannel property to a panel that supports horizontal layout :
<ListBox>
<ListBoxItem>
<Image Source="item1.jpg" />
</ListBoxItem>
<ListBoxItem>
<Image Source="item2.jpg" />
</ListBoxItem>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
pleaes mark this post as answered if it helped ! :)
Technical Designer
www.xceed.com