<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx</link><description>A customer recently asked how to implement a simple "grouped ListBox " experience in Silverlight (now available in desktop , mobile , and extra crispy flavor!), so I dashed off this sample to show one way that's pretty easy to work with. 
 Well, actually</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10380459</link><pubDate>Mon, 24 Dec 2012 05:20:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10380459</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;Kishore Joshi,&lt;/p&gt;
&lt;p&gt;You *might* be able to use the Silverlight Toolkit&amp;#39;s Expander control for this, but I kind of doubt it because that would break the ListBox metaphor. The technique I show here is more of a hack than anything else and trying to go further with it could be more trouble than it&amp;#39;s worth... :) Maybe consider using a TreeView instead as that supports expand/collapse natively..&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10380459" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10380151</link><pubDate>Fri, 21 Dec 2012 17:43:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10380151</guid><dc:creator>Kishore Joshi</dc:creator><description>&lt;p&gt;Thanks for the suggestion. there was a custom class in middle I changed it and not its working good.&lt;/p&gt;
&lt;p&gt;David,&lt;/p&gt;
&lt;p&gt;Can you suggest how can I implement a expand collapse feature on the group headers.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10380151" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10380014</link><pubDate>Fri, 21 Dec 2012 05:53:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10380014</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;Kishore Joshi,&lt;/p&gt;
&lt;p&gt;Set a breakpoint on the first line of GroupingItemsControlConverter.Convert. If the value parameter has the data you expect, then the problem could be in GroupingItemsControlConverter and you can step through the code there. If it&amp;#39;s not called or the value parameter is null (which is what I&amp;#39;m guessing will happen), then the issue is probably that the data change isn&amp;#39;t propagating through the Binding to get into the converter in the first place. The most common reason for this is changing a property on a model object and not firing the PropertyChanged event for it. If you&amp;#39;re setting DataContext directly, the change should flow through automatically, but if you have a custom class in the middle, I&amp;#39;d look there for a problem like this.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10380014" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10379932</link><pubDate>Thu, 20 Dec 2012 22:26:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10379932</guid><dc:creator>Kishore Joshi</dc:creator><description>&lt;p&gt;Great post. thanks for source code and explanation.&lt;/p&gt;
&lt;p&gt;David, I implemented the GroupConverter and have one issue.&lt;/p&gt;
&lt;p&gt;The point were you set the data context, your ex it was a static array. In my case a async job returns an object and I parse throw to make an array of similar structure. But the groupconverter do not wait for the object and fails to show anything. Can you suggest something in this case.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10379932" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10178451</link><pubDate>Fri, 24 Jun 2011 04:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178451</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;Brandon,&lt;/p&gt;
&lt;p&gt;No worries - glad you&amp;#39;ve got it working! :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178451" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10178418</link><pubDate>Fri, 24 Jun 2011 01:20:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178418</guid><dc:creator>Brandon</dc:creator><description>&lt;p&gt;Wow, seriously, I completely left out the field I&amp;#39;m grouping on from my test data, sorry for wasting your time! &amp;nbsp;Thank you very much for your help though!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178418" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10178406</link><pubDate>Fri, 24 Jun 2011 00:34:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178406</guid><dc:creator>Brandon</dc:creator><description>&lt;p&gt;Thanks David, I&amp;#39;ll give it a shot, it works beautifully runtime, but I&amp;#39;d just like to get Blend to show it to tweak my interface. &amp;nbsp;I&amp;#39;ll try out your suggestions right now.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178406" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10178263</link><pubDate>Thu, 23 Jun 2011 16:43:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178263</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;Brandon,&lt;/p&gt;
&lt;p&gt;I *think* Blend runs IValueConverters on the design surface, so I&amp;#39;d expect this to work. What I&amp;#39;d recommend is removing the GroupingItemsControlConverter to be sure everything else is hooked up right in order to show the test data at design-time; sometimes that can be a little tricky to get right. Once that&amp;#39;s working, drop in the GroupingItemsControlConverter and things should work. If not, then try running the app to verify that the run-time behavior is correct - if that doesn&amp;#39;t work, then something&amp;#39;s not hooked up right which is probably why it&amp;#39;s not working.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178263" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10178145</link><pubDate>Thu, 23 Jun 2011 12:07:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10178145</guid><dc:creator>Brandon</dc:creator><description>&lt;p&gt;Will generating the listbox in this way allow for Blendability? &amp;nbsp;I can&amp;#39;t seem to get my test data to show up in my grid and I&amp;#39;m wondering if Blend just can&amp;#39;t put the logic together for this one, or if I&amp;#39;ve missed something else I&amp;#39;d need to statically define.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10178145" width="1" height="1"&gt;</description></item><item><title>re: Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly]</title><link>http://blogs.msdn.com/b/delay/archive/2010/03/17/confessions-of-a-listbox-groupie-using-ivalueconverter-to-create-a-grouped-list-of-items-simply-and-flexibly.aspx#10167395</link><pubDate>Mon, 23 May 2011 16:48:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10167395</guid><dc:creator>David Anson</dc:creator><description>&lt;p&gt;Veri,&lt;/p&gt;
&lt;p&gt;Yes, you can use this idea/code on Windows Phone - and I know of others who have done so. :) The sample is a Silverlight 4 project, but the file you really want to reuse is GroupingItemsControlConverter.cs and it doesn&amp;#39;t contain any references to AssemblyPart. It sounds like maybe you tried to reuse a part of the sample that was specific to desktop Silverlight - if you add only GroupingItemsControlConverter.cs to your Windows Phone project, you should be fine.&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10167395" width="1" height="1"&gt;</description></item></channel></rss>