3

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,

2 Answers 2

1

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()
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.