Horizontal items in a listview

3 posts, 1 answers
  1. Roshan
    Roshan avatar
    20 posts
    Member since:
    Apr 2012

    Posted 28 Sep Link to this post

    I have a list view, where each item should show a list of labels. My implementation is 
    <telerikDataControls:RadListView ItemsSource="{Binding EventLableList,Mode=TwoWay}">
          <telerikDataControls:RadListView.ItemTemplate>
                 <DataTemplate>
                    <telerikListView:ListViewTemplateCell>
                          <telerikListView:ListViewTemplateCell.View >
                             <StackLayout Orientation="Horizontal">
                                 <BoxView BackgroundColor="{Binding HexColor, Converter={StaticResource ArgbToColorConverter}" VerticalOptions="Fill"/>                           
                             </StackLayout>
                        </telerikListView:ListViewTemplateCell.View>
                    </telerikListView:ListViewTemplateCell>
                </DataTemplate>
         </telerikDataControls:RadListView.ItemTemplate>
    </telerikDataControls:RadListView>

     

    The color Boxes are stacked vertically. I want the to view them horizontaly. Is this possible?

     

     

  2. Answer
    Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    503 posts

    Posted 28 Sep Link to this post

    Hello, Roshan,

    You can try the following:

    <telerikDataControls:RadListView.LayoutDefinition>
        <telerikListView:ListViewLinearLayout ItemLength="40"
                             Orientation="Horizontal"
                             HorizontalItemSpacing="2" />
    </telerikDataControls:RadListView.LayoutDefinition>

    I have added an example for your reference.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Roshan
    Roshan avatar
    20 posts
    Member since:
    Apr 2012

    Posted 03 Oct in reply to Stefan Nenchev Link to this post

    Thank you. this is great
Back to Top