{"id":5257,"date":"2014-03-30T20:03:04","date_gmt":"2014-03-30T20:03:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/smooth-scroll-within-stackpanel-in-wpf-collection-of-common-programming-errors\/"},"modified":"2014-03-30T20:03:04","modified_gmt":"2014-03-30T20:03:04","slug":"smooth-scroll-within-stackpanel-in-wpf-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/smooth-scroll-within-stackpanel-in-wpf-collection-of-common-programming-errors\/","title":{"rendered":"Smooth scroll within stackpanel in wpf-Collection of common programming errors"},"content":{"rendered":"<p>Wrap your <code>StackPanel<\/code> in another panel<\/p>\n<p>WPF&#8217;s ScrollViewer tries to scroll entire elements into view at a time, which is why you see the jumpy scroll behavior. By nesting the StackPanel in another Panel, the ScrollViewer will try and scroll the entire StackPanel into view, which is too big so it will use smooth scrolling.<\/p>\n<p>Here&#8217;s an example &#8211; Removing the DockPanel will give you a jumpy scroll, but with it you&#8217;ll get smooth scrolling behavior<\/p>\n<pre><code>\n    \n        \n            \n            \n            \n            \n            \n            \n        \n    \n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Wrap your StackPanel in another panel WPF&#8217;s ScrollViewer tries to scroll entire elements into view at a time, which is why you see the jumpy scroll behavior. By nesting the StackPanel in another Panel, the ScrollViewer will try and scroll the entire StackPanel into view, which is too big so it will use smooth scrolling. [&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-5257","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5257","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=5257"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5257\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}