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

Horizontal items in a listview

2 Answers 356 Views
ListView
This is a migrated thread and some comments may be shown as answers.
RR
Top achievements
Rank 1
RR asked on 28 Sep 2017, 08:45 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Stefan Nenchev
Telerik team
answered on 28 Sep 2017, 10:34 AM
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
0
RR
Top achievements
Rank 1
answered on 03 Oct 2017, 06:29 AM
Thank you. this is great
Tags
ListView
Asked by
RR
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
RR
Top achievements
Rank 1
Share this question
or