Search code examples
wpflistviewlayoutrow-height

How to set WPF ListView row height?


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.


Solution

  • 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>