tags:

views:

104

answers:

2

Hi, Is it possible to show specified number of rows in the listview. This is because my whole listview area looks empty, but after values are binded it is ok. So is it possible to show rows before binding.

Thanks,

A: 

See if you can use the AddChild method or just use myListView.Items.Add(new ListViewItem()).

Just an educated guess, I can't try this out right now.

Peter
A: 

In the XAML you could do something like this:

<ListView name="myListView">
    <ListViewItem>test1</ListViewItem>
    <ListViewItem>test2</ListViewItem>
</ListView>

That would populate some test items in the list view to be displayed. You would need to clear the listview's items collection before you bound to it though or you'll get an exception:

myListView.Items.Clear()
Simon P Stevens