WrapPanel doesn't wrap in WPF ListView

Posted by Joan Venge on Stack Overflow See other posts from Stack Overflow or by Joan Venge
Published on 2010-04-04T02:38:08Z Indexed on 2010/04/04 2:43 UTC
Read the original article Hit count: 945

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET