I am using a custom control that has an ItemsSource. I have bound the ItemsSource to a CollectionViewSource in XAML. That CollectionViewSource is bound to a List.
Now I want to get all the Items from the ItemsSource but that control doesn't have a property Items (like GridView or ListView has). So I have to manually get the items from the ItemsSource.
The ItemsSource is an object, but when I put a breakpoint to check what value is stored in the ItemsSource i get this: Windows Runtime Object. So my question again: How to get the Items from this ItemsSource?
I got the solution:
valueList = (myControl.ItemsSource as ICollectionView).ToList();
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加