<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Super Easy Animated Layout in Silverlight</title>
	<atom:link href="http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight</link>
	<description>inspiration for xaml nerds</description>
	<lastBuildDate>Mon, 08 Feb 2010 10:11:50 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christian Heger</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-32494</link>
		<dc:creator>Christian Heger</dc:creator>
		<pubDate>Fri, 20 Nov 2009 15:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-32494</guid>
		<description>Hello Robby, I used the to build myself a custom panel that moves around items in a vertical stack - I needed it for a larger project. Thank you so much! My mod is here:
http://greenicicle.wordpress.com/2009/11/14/my-new-favourite-silverlight-panel/</description>
		<content:encoded><![CDATA[<p>Hello Robby, I used the to build myself a custom panel that moves around items in a vertical stack &#8211; I needed it for a larger project. Thank you so much! My mod is here:<br />
<a href="http://greenicicle.wordpress.com/2009/11/14/my-new-favourite-silverlight-panel/" rel="nofollow">http://greenicicle.wordpress.com/2009/11/14/my-new-favourite-silverlight-panel/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My new favourite Silverlight Panel &#171; Greenicicle</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-32379</link>
		<dc:creator>My new favourite Silverlight Panel &#171; Greenicicle</dc:creator>
		<pubDate>Sat, 14 Nov 2009 16:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-32379</guid>
		<description>[...] that was it for the ordered panel! For the animation part, I stumbled across this excellent article  by Robby Ingebretsen. He&#8217;s created a great base class for animated panels; all I needed to do [...]</description>
		<content:encoded><![CDATA[<p>[...] that was it for the ordered panel! For the animation part, I stumbled across this excellent article  by Robby Ingebretsen. He&#8217;s created a great base class for animated panels; all I needed to do [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Burke</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-985</link>
		<dc:creator>Rob Burke</dc:creator>
		<pubDate>Wed, 15 Oct 2008 22:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-985</guid>
		<description>Robby, this rocks. But I can&#039;t get it to play nice with RTW. Is there any chance at all you&#039;ll be updating it?</description>
		<content:encoded><![CDATA[<p>Robby, this rocks. But I can&#8217;t get it to play nice with RTW. Is there any chance at all you&#8217;ll be updating it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-590</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Thu, 31 Jul 2008 16:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-590</guid>
		<description>Robby, 

I remember you demoing this (or some variation of this) at MIX08 with some version of the Newegg website search. Is that available for public viewing? If not, do you have a video of it that we could see? I&#039;m trying to describe it to some co-workers of mine and the visual is worth a thousand words in this case.</description>
		<content:encoded><![CDATA[<p>Robby, </p>
<p>I remember you demoing this (or some variation of this) at MIX08 with some version of the Newegg website search. Is that available for public viewing? If not, do you have a video of it that we could see? I&#8217;m trying to describe it to some co-workers of mine and the visual is worth a thousand words in this case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hüseyin Tüfekçilerli</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-571</link>
		<dc:creator>Hüseyin Tüfekçilerli</dc:creator>
		<pubDate>Wed, 23 Jul 2008 15:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-571</guid>
		<description>I didn&#039;t know that Vector.cs was redundant for WPF, deleted it and still works! (I am a newbie on WPF, have only 2-3 weeks of experience.)

I don&#039;t know how performant it is but the following code seems to be working to calculate the Size on MeasureOverride method:


protected override Size MeasureOverride(Size availableSize)
{
    Size s = new Size(this.CellWidth, this.CellHeight);

    foreach (UIElement element in this.Children)
    {
        element.Measure(s);
    }

    double width = availableSize.Width;

    int elsPerRow = (int)(width / this.CellWidth);
    double rowCount = Math.Ceiling((double)this.Children.Count / elsPerRow);

    return new Size(width, rowCount * this.CellHeight);
}
</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t know that Vector.cs was redundant for WPF, deleted it and still works! (I am a newbie on WPF, have only 2-3 weeks of experience.)</p>
<p>I don&#8217;t know how performant it is but the following code seems to be working to calculate the Size on MeasureOverride method:</p>
<p>protected override Size MeasureOverride(Size availableSize)<br />
{<br />
    Size s = new Size(this.CellWidth, this.CellHeight);</p>
<p>    foreach (UIElement element in this.Children)<br />
    {<br />
        element.Measure(s);<br />
    }</p>
<p>    double width = availableSize.Width;</p>
<p>    int elsPerRow = (int)(width / this.CellWidth);<br />
    double rowCount = Math.Ceiling((double)this.Children.Count / elsPerRow);</p>
<p>    return new Size(width, rowCount * this.CellHeight);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robby Ingebretsen</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-570</link>
		<dc:creator>Robby Ingebretsen</dc:creator>
		<pubDate>Wed, 23 Jul 2008 14:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-570</guid>
		<description>@Hüseyin: I&#039;m glad that you were able to port this over to WPF.  You may have discovered this, but you don&#039;t actually need the Vector.cs class if you&#039;re working with this in WPF since there&#039;s a one built in.

The scrolling issue is a result of the &quot;simplicity&quot; vs. &quot;completeness&quot; tradeoff that I mentioned in the post.  Basically, I took the easy way out in the MeasureOverride method.  That method is supposed to return a Size that represents the amount of space that the panel needs to &quot;lay out&quot; all of its children.  Scrollviewer, for example, depends on that size to know whether or not scrolling is needed.  

In UniformWrapPanel, I don&#039;t keep that part of the contract.  Instead, I just return a new Size() ojbect (which is a size of 0x0).  Other panels do this (like Canvas), but a solid implementation of WrapPanel should be more robust.

So, to fix it, you need to use the MeasureOverride method to calculate the amount of space needed to lay out all of the panels children and then return that instead of the new Size().  This should not be difficult code to write, but can be tough to optimize because a lot of times you end up doing the same calculations in both MeasureOverride and ArrangeOverride.</description>
		<content:encoded><![CDATA[<p>@Hüseyin: I&#8217;m glad that you were able to port this over to WPF.  You may have discovered this, but you don&#8217;t actually need the Vector.cs class if you&#8217;re working with this in WPF since there&#8217;s a one built in.</p>
<p>The scrolling issue is a result of the &#8220;simplicity&#8221; vs. &#8220;completeness&#8221; tradeoff that I mentioned in the post.  Basically, I took the easy way out in the MeasureOverride method.  That method is supposed to return a Size that represents the amount of space that the panel needs to &#8220;lay out&#8221; all of its children.  Scrollviewer, for example, depends on that size to know whether or not scrolling is needed.  </p>
<p>In UniformWrapPanel, I don&#8217;t keep that part of the contract.  Instead, I just return a new Size() ojbect (which is a size of 0&#215;0).  Other panels do this (like Canvas), but a solid implementation of WrapPanel should be more robust.</p>
<p>So, to fix it, you need to use the MeasureOverride method to calculate the amount of space needed to lay out all of the panels children and then return that instead of the new Size().  This should not be difficult code to write, but can be tough to optimize because a lot of times you end up doing the same calculations in both MeasureOverride and ArrangeOverride.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hüseyin Tüfekçilerli</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-569</link>
		<dc:creator>Hüseyin Tüfekçilerli</dc:creator>
		<pubDate>Wed, 23 Jul 2008 07:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-569</guid>
		<description>Thanks for the code, worked like a charm on my WPF application. One thing though, my ListBox lost the ability to vertically scroll items. Before, I was using a WrapPanel as my ListBox.ItemsPanel and setting ScrollViewer.HorizontalScrollBarVisibility=&quot;Disabled&quot; on ListBox which causes only a vertical scroll bar to be shown. After using UniformWrapPanel instead of built-in WrapPanel, vertical scroll bar is gone. Is this a known issue? Can be fixed easily?</description>
		<content:encoded><![CDATA[<p>Thanks for the code, worked like a charm on my WPF application. One thing though, my ListBox lost the ability to vertically scroll items. Before, I was using a WrapPanel as my ListBox.ItemsPanel and setting ScrollViewer.HorizontalScrollBarVisibility=&#8221;Disabled&#8221; on ListBox which causes only a vertical scroll bar to be shown. After using UniformWrapPanel instead of built-in WrapPanel, vertical scroll bar is gone. Is this a known issue? Can be fixed easily?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faisal</title>
		<link>http://blog.nerdplusart.com/archives/super-easy-animated-layout-in-silverlight/comment-page-1#comment-568</link>
		<dc:creator>Faisal</dc:creator>
		<pubDate>Tue, 22 Jul 2008 22:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nerdplusart.com/?p=259#comment-568</guid>
		<description>Excellent Robby, I like your work very much.</description>
		<content:encoded><![CDATA[<p>Excellent Robby, I like your work very much.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
