This is a migrated thread and some comments may be shown as answers.
SpanCount
2 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
N Mackay
Top achievements
Rank 1
N Mackay asked on 07 Jan 2016, 11:39 AM

Is there anyway to change the SpanCount in the Xaml if your  using a tablet instead of a handset?

 

<telerikListView:ListViewGridLayout Orientation="Vertical" SpanCount="3" GroupHeaderLength="40">

 

3 is fine for mobile devices but for tablet 6 would make more sence. I tried OnIdiom but I don't think you can use that approach.

 

        <OnIdiom x:TypeArguments="View">
            <OnIdiom.Phone>

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosy Topchiyska
Telerik team
answered on 11 Jan 2016, 03:29 PM
Hi Norman,

I tested this approach and it seems to work fine:
<telerik:RadListView ItemsSource="{Binding Items}">
  <telerik:RadListView.LayoutDefinition>
    <telerikListView:ListViewGridLayout>
      <telerikListView:ListViewGridLayout.SpanCount>
        <OnIdiom x:TypeArguments="x:Int32">
          <OnIdiom.Phone>3</OnIdiom.Phone>
          <OnIdiom.Tablet>6</OnIdiom.Tablet>
        </OnIdiom>
      </telerikListView:ListViewGridLayout.SpanCount>
    </telerikListView:ListViewGridLayout>
  </telerik:RadListView.LayoutDefinition>
</telerik:RadListView>

Please, let us know if you have any issues with this setup.

Regards,
Rosy Topchiyska
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
N Mackay
Top achievements
Rank 1
answered on 12 Jan 2016, 10:07 AM

Hi Rosy,

This solution works.

Thanks.

Asked by
N Mackay
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
N Mackay
Top achievements
Rank 1
Share this question
or