List Integration example with Horizontal Listbox

3 posts, 0 answers
  1. Tom
    Tom avatar
    3 posts
    Member since:
    Jul 2011

    Posted 15 Dec 2011 Link to this post

    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. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 16 Dec 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Tom
    Tom avatar
    3 posts
    Member since:
    Jul 2011

    Posted 18 Dec 2011 Link to this post

    This works perfectly.

    Thanks very much.
Back to Top