I have a ListView, that is defined very simply in my XAML like so
<ListView Name="myListVew" MaxHeight="200" Visibility="Collapsed">
<ListView.View>
<GridView>
<GridViewColumn Header="Line" Width="Auto" DisplayMemberBinding="{Binding Line}" />
<GridViewColumn Header="Error" Width="Auto" DisplayMemberBinding="{Binding Error}" />
</GridView>
</ListView.View>
</ListView>
When I want the ListView to appear, I want to animate the height of the list view from 0. The problem is, I don’t know the final height of the ListView since it will depend on how many items are shown inside it. Is there anyway of doing this?
Don’t you hate it when you search for hours for a solution, post a question to a forum and then find the answer yourself 10 minutes later?
Anyway, I got it working by applying a layout scale transform like so