UWP: ListView Row Height
Notes
[07/19/2018] Note: This post refers to the library
Microsoft.NETCore.UniversalWindowsPlatform
, version
6.2.0-Preview1-26502-02
.
ListView Row Height
When dealing with ListViews in UWP, sometimes more information density is desired, and the quickest way to get that density is to adjust the row height of each item in the ListView.
By default in a new ListView, information density is low and look like this:
Any control that inherits from
ItemsPanel
in UWP Xaml must have their row heights adjusted by overriding the style parameter in the parent object:
<ListView>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="MinHeight" Value="1"/>
<Setter Property="Height" Value="15"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="Hello" FontSize="10"/>