How to set WPF ListView row height?

JohnIdol picture JohnIdol · Aug 7, 2009 · Viewed 41.7k times · Source

I've got a listView displaying a few text records. I need to increase the height of rows (working on a touch screen so I need thicker rows) without increasing the font size.

This is probably pretty trivial but I have no clue and can't find much on google.

Any help appreciated.

Answer

Andy picture Andy · Aug 7, 2009

You can set the height of all ListViewItems in a ListView by using ItemContainerStyle:

<ListView>
    <ListView.ItemContainerStyle>
        <Style TargetType="ListViewItem">
            <Setter Property="Height" Value="50" />
        </Style>
    </ListView.ItemContainerStyle>
</ListView>