ListView not displaying the ItemTemplates correctly

4 posts, 0 answers
  1. Sergio
    Sergio avatar
    18 posts
    Member since:
    May 2014

    Posted 24 Oct 2015 Link to this post


    I'm working with the ListView and I'm having some problems, I was wondering if I was just missing a simple Property to set or if there's some sort of problem with the control itself.

    What's happening is that the ListView is adding some margins to the left and the right of the ItemTemplates (even though in the XAML designer I can see that the ListView itself covers the full width of the page), and is somehow scaling up the TextBlocks inside each template, so as a result the whole UI of the templates is messed up.

    I attached a screen to show you the difference and result I'd like to get.

    This is the code of the ListView:  

    <telerik:RadListView EmptyContentDisplayMode="DataSourceEmpty"
                  ItemsSource="{x:Bind ViewModel.ItemGroups, Mode=OneWay}"
        <Grid Height="48"/>
        <TextBlock Text="This folder is empty :'("
          <DataTemplate x:DataType="dataModels:ItemsGroupWithOptionalSectionModel">

     I already tried setting the Padding and the Margin properties to 0, or to set HorizontalAlignment="Stretch", but I didn't solve the issue.

     Is there a way to prevent the ListView to behave this way and to have it render its content without any type of modifications, just like a simple StackPanel?


    Thank you in advance for your help.

    Best regards,


  2. Sergio
    Sergio avatar
    18 posts
    Member since:
    May 2014

    Posted 26 Oct 2015 in reply to Sergio Link to this post

    EDIT: I had a similar problem with the new UWP ListView (I mean the built in ListView) and I managed to solve it, see the StackOverflow question here ListView item template

     I forgot to add that I also don't want any additional VisualStates, I want to be able to manually set everything within my templates. So I just want my RadListView to display the item templates with their original UI, without scaling anything, without any kind of visual states (pointer animations, background color changes on mouse over etc...) or other additional UI elements.


    I mean, I just wish the new UWP RadListView worked like the RadDataBoundListBox in WP8.1, which displayed its content exactly as it was, without any visual state or modification.

    I really like the ability to add custom item added/removed animations, the reorder mode and everything else, I just wish the items themselves were rendered without any visual change.


    Thank you again for your help!


  3. DevCraft R3 2016 release webinar banner
  4. Ivaylo Gergov
    Ivaylo Gergov avatar
    661 posts

    Posted 29 Oct 2015 Link to this post

    Hello Sergio,

    Sorry for the late response.

    We will further investigate this and we will get back to you with more information.

    I apologize for any inconvenience caused.

    Ivaylo Gergov
    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
  5. Sergio
    Sergio avatar
    18 posts
    Member since:
    May 2014

    Posted 29 Oct 2015 Link to this post

    Hello Ivalyo,

    no problems at all, thank you for your answer.

    For the time being, I switched back to the default ListView, as I could edit the default ItemContainerStyle to achieve what I wanted. Here is the Style I came up with: it removes any VisualState on the contained items as well as other unwanted UI elements:


    I was wondering whether it'd be possible to do something like that with the RadListView as well.

    Anyways, I'm still using all your other controls in the app, so that's definitely not a problem and I'll keep working with your UWP library for sure :)


    Best regards, have a nice day!



Back to Top
DevCraft R3 2016 release webinar banner