I have a data bound ListView that uses a rather strange heights for every ListViewItem
after I start using an ItemTemplate
.
<ListView ItemsSource="{Binding Path=AllTvShows}">
<ListView.ItemTemplate>
<DataTemplate>
<Label FontStretch="Normal" VerticalAlignment="Center" Content="{Binding Path=Name}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
This is how it looks like:
Without the ItemTemplate
the labels have the normal height (more adjacent). How should I specify the Label
so that it would render normal?
Use a TextBlock instead of a Label:
<ListView ItemsSource="{Binding Path=AllTvShows}">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>