{"id":4996,"date":"2014-03-30T17:41:25","date_gmt":"2014-03-30T17:41:25","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-use-array-collection-in-wpf-collection-of-common-programming-errors\/"},"modified":"2014-03-30T17:41:25","modified_gmt":"2014-03-30T17:41:25","slug":"how-to-use-array-collection-in-wpf-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-use-array-collection-in-wpf-collection-of-common-programming-errors\/","title":{"rendered":"How to use Array \/ Collection in WPF?-Collection of common programming errors"},"content":{"rendered":"<p>I have a program which has some Textareas \/ Labels these can be anywhere on the Window and in any order &#8211; however I want to assign them values from a List, Collection or Array so I want one label to read MyCollection(1) and another MyCollection(2) and so on &#8211; they are not always together or in the same order so a ListBox is no good &#8211; how do you build a collection in code e.g. VB.NET and then give each label the reference for the Item index I want it to show.<\/p>\n<p>Main questions are:<\/p>\n<ol>\n<li>How to use a run-time collection with the XAML code<\/li>\n<li>How to reference the collection item in the XAML<\/li>\n<li>List item<\/li>\n<\/ol>\n<p>How to do this so can read in any order eg read index 4, then 2 then 1<\/p>\n<p>I am stuck on how to proceed!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a program which has some Textareas \/ Labels these can be anywhere on the Window and in any order &#8211; however I want to assign them values from a List, Collection or Array so I want one label to read MyCollection(1) and another MyCollection(2) and so on &#8211; they are not always together [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4996","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4996"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4996\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}