none
listview in winrt throws exception Element is already the child of another element

    Question

  • Code :

    internal void AddItemsListView()
            {
                if (PART_ListView != null)
                {
                    PART_ListView.Items.Clear();
                    foreach (var item in Items)
                    {
                        if (item.Visibility == Visibility.Visible)
                            PART_ListView.Items.Add(item);
                    }
                }
            }

    Even if i clear the list view collection before going to add the items to the collection. Could you help me please?

    Thanks for advance.

    Tuesday, September 15, 2015 5:37 AM