This is a migrated thread and some comments may be shown as answers.

List Integration example with Horizontal Listbox

2 Answers 158 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 15 Dec 2011, 04:42 PM
Hey guys,

As the title states, would it be possible to get some example code similar to the "Listbox Integration" demo, but with a horizontal listbox. I am very keen on using similar functionallity to the demo, but due to sizing requirements need to implement a horizontal list.

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 16 Dec 2011, 01:45 PM
Hello Tom,

You can make a horizontal listbox like this:

<ListBox x:Name="cityList" Style="{StaticResource ListBoxStyle}" ItemsSource="{Binding}"
            SelectedIndex="{Binding SelectedIndex, ElementName=coverFlow, Mode=TwoWay}" Height="200">
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
</ListBox>

Also note that you should change the Width property of the listbox.

Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tom
Top achievements
Rank 1
answered on 18 Dec 2011, 02:46 PM
This works perfectly.

Thanks very much.
Tags
CoverFlow
Asked by
Tom
Top achievements
Rank 1
Answers by
Yana
Telerik team
Tom
Top achievements
Rank 1
Share this question
or