ListView not working in Unity v2.2.1?
Posted: 13 Apr 2019, 21:09
I have a relatively simple ListView declaration:
<ListView FontSize="20"
Width="300"
Height="300">
<ListView.Items>
<ListViewItem Content="Item 1" />
<ListViewItem Content="Item 2" />
<ListViewItem Content="Item 3" />
<ListViewItem Content="Item 4" />
<ListViewItem Content="Item 5" />
</ListView.Items>
</ListView>
The items show up correctly in Blend (both in the editor and when I run the program). When I run the program in Unity, I can see that the ListView has been populated, but the contents of the ListViewItems are not showing.
If I change "ListView*" to "ListBox*" everything works correctly.
I've also tried this using a data template, with the same result (works with ListBox, but not ListView).
Thanks,
Chris
<ListView FontSize="20"
Width="300"
Height="300">
<ListView.Items>
<ListViewItem Content="Item 1" />
<ListViewItem Content="Item 2" />
<ListViewItem Content="Item 3" />
<ListViewItem Content="Item 4" />
<ListViewItem Content="Item 5" />
</ListView.Items>
</ListView>
The items show up correctly in Blend (both in the editor and when I run the program). When I run the program in Unity, I can see that the ListView has been populated, but the contents of the ListViewItems are not showing.
If I change "ListView*" to "ListBox*" everything works correctly.
I've also tried this using a data template, with the same result (works with ListBox, but not ListView).
Thanks,
Chris