{"id":5155,"date":"2014-03-30T19:16:23","date_gmt":"2014-03-30T19:16:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/add-transition-to-dynamically-created-object-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:16:23","modified_gmt":"2014-03-30T19:16:23","slug":"add-transition-to-dynamically-created-object-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/add-transition-to-dynamically-created-object-collection-of-common-programming-errors\/","title":{"rendered":"Add transition to dynamically created object-Collection of common programming errors"},"content":{"rendered":"<p>I would like to assign a transition to a dynamically created button, but it didn&#8217;t happen.<\/p>\n<pre><code>Button btn = new Button();\nGrid.SetRow(btn, j);\nGrid.SetColumn(btn, i);\nbtn.Transitions.Add(new Windows.UI.Xaml.Media.Animation.RepositionThemeTransition());                    \nmyGrig.Children.Add(btn);\n<\/code><\/pre>\n<p>I get a runtime errror, a NullReference exception, on the btn.Transition&#8230; line. Object reference not set to an instance of an object.<\/p>\n<p>How can I solve this?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I would like to assign a transition to a dynamically created button, but it didn&#8217;t happen. Button btn = new Button(); Grid.SetRow(btn, j); Grid.SetColumn(btn, i); btn.Transitions.Add(new Windows.UI.Xaml.Media.Animation.RepositionThemeTransition()); myGrig.Children.Add(btn); I get a runtime errror, a NullReference exception, on the btn.Transition&#8230; line. Object reference not set to an instance of an object. How can I solve this?<\/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-5155","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5155","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=5155"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5155\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}