<?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: How do I sort groups of data items?</title>
	<atom:link href="http://bea.stollnitz.com/blog/?feed=rss2&#038;p=17" rel="self" type="application/rss+xml" />
	<link>http://bea.stollnitz.com/blog/?p=17</link>
	<description>on Silverlight and WPF</description>
	<lastBuildDate>Thu, 22 Jul 2010 20:56:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kit West</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-186321</link>
		<dc:creator>Kit West</dc:creator>
		<pubDate>Wed, 27 Jan 2010 19:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-186321</guid>
		<description>For others who try to use this info ...
xmlns:scm=&quot;clr-namespace:System.ComponentModel;assembly=WindowsBase&quot;</description>
		<content:encoded><![CDATA[<p>For others who try to use this info &#8230;<br />
xmlns:scm=&#8221;clr-namespace:System.ComponentModel;assembly=WindowsBase&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-170163</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Fri, 20 Nov 2009 04:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-170163</guid>
		<description>Hi Alex,

Once you opt to have grouping, all your items will belong to some group - you can&#039;t have &quot;ungrouped&quot; items. You can accomplish what you describe by providing different styles for the groups depending on the number of items within the group. Within the template for the group header, you can have a binding with Path=Items.Count to get the number of items within that group. Then you can use a trigger to control the look of the template  (e.g. you may control the visibility of sections of your template).

Bea</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>Once you opt to have grouping, all your items will belong to some group &#8211; you can&#8217;t have &#8220;ungrouped&#8221; items. You can accomplish what you describe by providing different styles for the groups depending on the number of items within the group. Within the template for the group header, you can have a binding with Path=Items.Count to get the number of items within that group. Then you can use a trigger to control the look of the template  (e.g. you may control the visibility of sections of your template).</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-170161</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Fri, 20 Nov 2009 04:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-170161</guid>
		<description>Hi Vanja,

It seems to me that you&#039;re looking for custom sorting. I have a &lt;a href=&quot;http://bea.stollnitz.com/blog/?p=24&quot; rel=&quot;nofollow&quot;&gt;blog post&lt;/a&gt; that explains how you can do that.

Yes, it&#039;s possible to recalculate/refresh the view. If you&#039;re using CollectionViewSource, you can do that using cvs.View.Refresh().

Bea</description>
		<content:encoded><![CDATA[<p>Hi Vanja,</p>
<p>It seems to me that you&#8217;re looking for custom sorting. I have a <a href="http://bea.stollnitz.com/blog/?p=24" rel="nofollow">blog post</a> that explains how you can do that.</p>
<p>Yes, it&#8217;s possible to recalculate/refresh the view. If you&#8217;re using CollectionViewSource, you can do that using cvs.View.Refresh().</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-170152</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Fri, 20 Nov 2009 02:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-170152</guid>
		<description>Hi Bjørnar,

Sorry I didn&#039;t have a chance to get to your question earlier. I&#039;m glad you found a solution.

Bea</description>
		<content:encoded><![CDATA[<p>Hi Bjørnar,</p>
<p>Sorry I didn&#8217;t have a chance to get to your question earlier. I&#8217;m glad you found a solution.</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-170001</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Thu, 19 Nov 2009 00:38:41 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-170001</guid>
		<description>It seems like someone has already provided a complete solution to your problem.</description>
		<content:encoded><![CDATA[<p>It seems like someone has already provided a complete solution to your problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DavidO</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-168637</link>
		<dc:creator>DavidO</dc:creator>
		<pubDate>Tue, 03 Nov 2009 16:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-168637</guid>
		<description>Hi Bea,

This is somewhat related to your post above...I have 2 problems and I&#039;m not sure what is causing them. I have explained them here http://forums.silverlight.net/forums/t/140407.aspx 
From reading your blog I imagine you would well able to explain what is happening.

I hope you have the time to look!

DavidO</description>
		<content:encoded><![CDATA[<p>Hi Bea,</p>
<p>This is somewhat related to your post above&#8230;I have 2 problems and I&#8217;m not sure what is causing them. I have explained them here <a href="http://forums.silverlight.net/forums/t/140407.aspx" rel="nofollow">http://forums.silverlight.net/forums/t/140407.aspx</a><br />
From reading your blog I imagine you would well able to explain what is happening.</p>
<p>I hope you have the time to look!</p>
<p>DavidO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexd</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-166525</link>
		<dc:creator>Alexd</dc:creator>
		<pubDate>Mon, 12 Oct 2009 09:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-166525</guid>
		<description>Hi Bea
 Thanks for the great blog posts. i always find answers to my WPF questions here.
 
Regarding the collection groupings, is it possible to have items that do not belong to a group ? In my case I use an expander for the categoryTemplate allowing me to expand/collapse the groups. I would like that groups with a single element in them don&#039;t have an expander associated (so they won&#039;t show the group element). Is this even possible?

Alex.</description>
		<content:encoded><![CDATA[<p>Hi Bea<br />
 Thanks for the great blog posts. i always find answers to my WPF questions here.</p>
<p>Regarding the collection groupings, is it possible to have items that do not belong to a group ? In my case I use an expander for the categoryTemplate allowing me to expand/collapse the groups. I would like that groups with a single element in them don&#8217;t have an expander associated (so they won&#8217;t show the group element). Is this even possible?</p>
<p>Alex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-166489</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Mon, 12 Oct 2009 02:25:03 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-166489</guid>
		<description>Hi Steve,

I replied to that question in the comment you left on another post: &lt;a href=&quot;http://bea.stollnitz.com/blog/?p=24&amp;cpage=1#comment-166488&quot; rel=&quot;nofollow&quot;&gt;http://bea.stollnitz.com/blog/?p=24&amp;cpage=1#comment-166488&lt;/a&gt;.

Bea</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>I replied to that question in the comment you left on another post: <a href="http://bea.stollnitz.com/blog/?p=24&#038;cpage=1#comment-166488" rel="nofollow">http://bea.stollnitz.com/blog/?p=24&#038;cpage=1#comment-166488</a>.</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vanja</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-164644</link>
		<dc:creator>Vanja</dc:creator>
		<pubDate>Wed, 23 Sep 2009 09:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-164644</guid>
		<description>Hi Bea,

I was wondering if there is a way to insert a converter in the SortDescription? I have a GroupDescription created from an IEnumerable (with a converter) and I would like the grouping to be sorted (ie. Group A always before Group Z). Is there a way to extend the SortDescription class to allow a Converter?

I&#039;d also like to know if its possible to delay grouping calculation or force a recalculation? I am using a CollectionViewSource on my ViewModel collection, but the grouped property is lazy loaded internally. I have found that when the real value is finally loaded the grouping is not updated. Can I force a recalculation?

Thanks for the help,

Vanja</description>
		<content:encoded><![CDATA[<p>Hi Bea,</p>
<p>I was wondering if there is a way to insert a converter in the SortDescription? I have a GroupDescription created from an IEnumerable (with a converter) and I would like the grouping to be sorted (ie. Group A always before Group Z). Is there a way to extend the SortDescription class to allow a Converter?</p>
<p>I&#8217;d also like to know if its possible to delay grouping calculation or force a recalculation? I am using a CollectionViewSource on my ViewModel collection, but the grouped property is lazy loaded internally. I have found that when the real value is finally loaded the grouping is not updated. Can I force a recalculation?</p>
<p>Thanks for the help,</p>
<p>Vanja</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjørnar</title>
		<link>http://bea.stollnitz.com/blog/?p=17&#038;cpage=1#comment-163217</link>
		<dc:creator>Bjørnar</dc:creator>
		<pubDate>Fri, 11 Sep 2009 14:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=17#comment-163217</guid>
		<description>I figured out one solution. Use GroupDescription and SortDescription as normal, and add GroupNames in the order I want. Then modify the GroupItem template to have Visibility=Collapsed if there are no items in the group.</description>
		<content:encoded><![CDATA[<p>I figured out one solution. Use GroupDescription and SortDescription as normal, and add GroupNames in the order I want. Then modify the GroupItem template to have Visibility=Collapsed if there are no items in the group.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
