Hi, I add item o TreeView using "_treeView.Items.Add()", then I add child item to this item.
When I remove the first item using _treeView.Items.Remove() the error occurs:
"Error HRESULT E_FAIL has been returned from a call to a COM component."
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Collection_RemoveAt[T](PresentationFrameworkCollection`1 collection, UInt32 index)
at System.Windows.PresentationFrameworkCollection`1.RemoveAtImpl(Int32 index)
at System.Windows.Controls.ItemCollection.RemoveAtImpl(Int32 index)
at System.Windows.Controls.ItemCollection.RemoveImpl(Object value)
at System.Windows.Controls.ItemCollection.RemoveInternal(Object value)
at System.Windows.PresentationFrameworkCollection`1.Remove(T value)
Can you help me please? Thanks.