我有这个 Pivot 控件,加载了 PivotItems。除了我希望能够动态地重新排序 PivotItems而不克隆 PivotItems 之外,这一切都很好。
问题是 Pivot 控件的 ItemCollection 似乎无法做到这一点。我可以插入一个不同的 PivotItem,但不能插入一个已经存在于不同索引 ( System.ArgumentException: Value does not fall within the expected range
) 的 PivotItem。
我也尝试过myPivot.Items.RemoveAt(currentIndex)
, myPivot.Items.Insert(targetIndex, tabToMove)
但这有时会产生System.Runtime.InteropServices.COMException (0x800F1000): No installed components were detected. Element is already the child of another element
.
想法?