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

  • Home
  • SEARCH
  • 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 706725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:11:53+00:00 2026-05-14T04:11:53+00:00

I am using a ListView with an ItemTemplate like this: <Window.Resources> <DataTemplate x:Key=ItemTemplate> <WrapPanel

  • 0

I am using a ListView with an ItemTemplate like this:

<Window.Resources>
    <DataTemplate x:Key="ItemTemplate">
        <WrapPanel Orientation="Horizontal">
            <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cover}"/>
            <Label Content="{Binding Title}" />
        </WrapPanel>
    </DataTemplate>
</Window.Resources>

But the Covers do not fill the screen like windows explorer windows.

How do I do this? They just get stacked vertically in my version.

alt text
(source: functionx.com)

  • 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-14T04:11:54+00:00Added an answer on May 14, 2026 at 4:11 am

    Try using a WrapPanel as your ListView’s item panel and disable the horizontal scrollbar:

    <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled">
      <ListView.ItemsPanel>
        <ItemsPanelTemplate>
          <WrapPanel Orientation="Horizontal" />
        </ItemsPanelTemplate>
      </ListView.ItemsPanel>
      ...
    </ListView>
    

    Update: itowlson suggests this explanation to make things more clear: ItemTemplate specifies how each item should be rendered. It has no effect on how items are laid out. ItemsPanel, by contrast, does specify the layout.

    Also, you may want all items to be displayed the same size. You can find out how to do that from this article: http://joshsmithonwpf.wordpress.com/2008/09/06/synchronizing-the-width-of-elements-in-an-itemscontrol/

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

Sidebar

Related Questions

I have a ListView in my WPF UserControl using an ItemTemplate to display the
I'm using listview control with the following parameters set: this.listView1.BackColor = System.Drawing.Color.Gainsboro; this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[]
Hi I have next XAML markup (just a piece of course): <Window.Resources> <GridView x:Key=gridview>
I'm using a ListView in an instance where I'd like to have two Item
How can I create alternating background colors for listview rows while only using ItemTemplate?
I have been following the following post on using multiple ItemTemplates in a ListView
I am using ListView/DataPager. For performance reasons I page my results at database, using
I am using listview to display three textviews(values for these text views where come
What are the advantages of using listview over gridview? I need pagination, editing rows,
How do I do pagination using ListView. For an example, I have 12 records

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.