Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1050577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:47:27+00:00 2026-05-16T16:47:27+00:00

I have a ListView with a lot of data (200+ items) so to save

  • 0

I have a ListView with a lot of data (200+ items) so to save space it’s making use of a UniformGrid to display 3 columns instead of 1

<ListView.ItemsPanel>
    <ItemsPanelTemplate>
        <UniformGrid Columns="3" />
    </ItemsPanelTemplate>
</ListView.ItemsPanel>

I also modify the style so that each item is aligned to the top

<ListView.Resources>
    <Style TargetType="{x:Type ListView}">
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="ListViewItem">
                    <Setter Property="VerticalContentAlignment" Value="Top"/>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
</ListView.Resources>

This works ok, however due to differences in the length of the data displayed, there is still wasted space in item groups because most of the data fits on a single line, but occasionally there is an item which takes up 2 or more rows. This means all rows in a group take up 2 or more rows when it’s only 1 row that needs the extra space

alt text

Does anyone know how to fix this, or can suggest another approach to avoid the uniformgrid? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:47:27+00:00Added an answer on May 16, 2026 at 4:47 pm

    You could use a vertical WrapPanel and disable vertical scrolling. That will cause the items to appear in columns with additional columns added on the right, similar to the list view in Windows Explorer. You can set Width or MaxWidth on the ListViewItems if you don’t want a single line of long text to expand the entire column.

    <ListView ScrollViewer.VerticalScrollBarVisibility="Disabled">
        <ListView.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapPanel Orientation="Vertical"/>
            </ItemsPanelTemplate>
        </ListView.ItemsPanel>
        <ListView.ItemContainerStyle>
            <Style TargetType="ListViewItem">
                <Setter Property="MaxWidth" Value="100"/>
            </Style>
        </ListView.ItemContainerStyle>
    

    You could use a normal Horizontal WrapPanel as well if you disable horizontal scrolling, although unless the elements are fixed width that will probably be awkward for the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ListView that uses a GridView to display several columns of data. Two
I have a ListView which might contains a lot of items, so it is
I would have listview and a lot of items inside. I want that user
I have listview control.There is an option to remove selected items.After the user removes
I have ListView which is saving all data to database. For adding i have
I am trying to programatically add items to a ListView in WPF. I have
I have a list (ListView) which which displays a lot of information, and what
I've been having a lot of trouble with this problem. I have a listview
I have a listview which displays a lot of info, but when it's empty
In an application that I'm writing I have to load a lot of data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.