SpanCount

3 posts, 1 answers
  1. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 07 Jan Link to this post

    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. Answer
    Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 11 Jan Link to this post

    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
  3. DevCraft banner
  4. N Mackay
    N Mackay avatar
    228 posts
    Member since:
    Dec 2010

    Posted 12 Jan in reply to Rosy Topchiyska Link to this post

    Hi Rosy,

    This solution works.

    Thanks.

Back to Top