How to get Items from ItemsSource?

Emir Ahmetović

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?

Emir Ahmetović

I got the solution:

valueList = (myControl.ItemsSource as ICollectionView).ToList();

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to bind to a source inside a ListBox different from the ItemsSource already specified

分類Dev

How to get items from cart at homepage when there is NO API

分類Dev

BeautifulSoup: How do I get different items from a <div>

分類Dev

How to get value from all selected dropdownlist items

分類Dev

How to set ItemsSource value of ColumnSeries?

分類Dev

How to separate items from array?

分類Dev

How to concatenate items from loop

分類Dev

How do I get my search function work to filter searched items from table?

分類Dev

How to get onItemHoverListener behavior with listView items to catch event from Explore by touch?

分類Dev

Swift - How to get indexes of filtered items of array

分類Dev

Swift - How to get indexes of filtered items of array

分類Dev

How to get cart line items in spree?

分類Dev

How to get Click event on MvxLinearLayout items\childeren?

分類Dev

How to delete items from array in .txt C

分類Dev

How to get order items ids to get some product meta data?

分類Dev

ionic- $ http.get items from Json

分類Dev

Get custom values of variations from order items in WooCommerce

分類Dev

Get the person type name from cart items in Woocommerce Bookings

分類Dev

C# TFS SDK Get Items from changeset

分類Dev

Get all items of a certain type from a List of abstract type

分類Dev

(Swift/iOS) Is it possible to get user purchased items from In app purchases?

分類Dev

Get items from Ruby Array that occur 2 or more times

分類Dev

How to get items for both LHS and RHS for only specific columns in arules?

分類Dev

Python: How to get items that appear in only one set of a list of sets?

分類Dev

how to get list of items in a class based on their attribute value

分類Dev

How to get items out of a list and create a new one in Ansible

分類Dev

How to get string items with exponential increase index locations

分類Dev

How can I get nth child in array of items retrieved by class?

分類Dev

How to prevent ActionBar items get hidden when Navigation Drawer opens?

Related 関連記事

  1. 1

    How to bind to a source inside a ListBox different from the ItemsSource already specified

  2. 2

    How to get items from cart at homepage when there is NO API

  3. 3

    BeautifulSoup: How do I get different items from a <div>

  4. 4

    How to get value from all selected dropdownlist items

  5. 5

    How to set ItemsSource value of ColumnSeries?

  6. 6

    How to separate items from array?

  7. 7

    How to concatenate items from loop

  8. 8

    How do I get my search function work to filter searched items from table?

  9. 9

    How to get onItemHoverListener behavior with listView items to catch event from Explore by touch?

  10. 10

    Swift - How to get indexes of filtered items of array

  11. 11

    Swift - How to get indexes of filtered items of array

  12. 12

    How to get cart line items in spree?

  13. 13

    How to get Click event on MvxLinearLayout items\childeren?

  14. 14

    How to delete items from array in .txt C

  15. 15

    How to get order items ids to get some product meta data?

  16. 16

    ionic- $ http.get items from Json

  17. 17

    Get custom values of variations from order items in WooCommerce

  18. 18

    Get the person type name from cart items in Woocommerce Bookings

  19. 19

    C# TFS SDK Get Items from changeset

  20. 20

    Get all items of a certain type from a List of abstract type

  21. 21

    (Swift/iOS) Is it possible to get user purchased items from In app purchases?

  22. 22

    Get items from Ruby Array that occur 2 or more times

  23. 23

    How to get items for both LHS and RHS for only specific columns in arules?

  24. 24

    Python: How to get items that appear in only one set of a list of sets?

  25. 25

    how to get list of items in a class based on their attribute value

  26. 26

    How to get items out of a list and create a new one in Ansible

  27. 27

    How to get string items with exponential increase index locations

  28. 28

    How can I get nth child in array of items retrieved by class?

  29. 29

    How to prevent ActionBar items get hidden when Navigation Drawer opens?

ホットタグ

アーカイブ