<?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: ItemsControl:  &#039;R&#039; is for Rob has a Customer</title>
	<atom:link href="http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/feed/" rel="self" type="application/rss+xml" />
	<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/</link>
	<description>Drinking (and serving) the WPF Kool-Aid since 2002</description>
	<lastBuildDate>Mon, 30 Aug 2010 18:54:01 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Amit Shaw</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-324</link>
		<dc:creator>Amit Shaw</dc:creator>
		<pubDate>Thu, 16 Jul 2009 14:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-324</guid>
		<description>Cool but i need more tutorial of wpf with c sharp.&lt;br&gt;&lt;br&gt;thanks</description>
		<content:encoded><![CDATA[<p>Cool but i need more tutorial of wpf with c sharp.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-321</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Mon, 20 Apr 2009 22:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-321</guid>
		<description>Rohit, &lt;br&gt;&lt;br&gt;The easiest way to get at the Character is to look at the DataContext of the framework element that was clicked. If that is not working or if I am misunderstanding the issue, please send me a repro offline.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Rohit, </p>
<p>The easiest way to get at the Character is to look at the DataContext of the framework element that was clicked. If that is not working or if I am misunderstanding the issue, please send me a repro offline.</p>
<p>Thanks,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EK</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-320</link>
		<dc:creator>EK</dc:creator>
		<pubDate>Wed, 08 Apr 2009 18:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-320</guid>
		<description>Cool.. thanks to Dr. WPF</description>
		<content:encoded><![CDATA[<p>Cool.. thanks to Dr. WPF</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-319</link>
		<dc:creator>Rohit</dc:creator>
		<pubDate>Wed, 08 Apr 2009 18:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-319</guid>
		<description>Hello Dr WPF, &lt;br&gt;Great series! &lt;br&gt;I was trying to implement a similar concept of selecting views. I have one additional view, TreeView. In this i take my flat observable collection of items and show it in a treeview. To show my collections in a treeview, i add group descriptions to my collection View.&lt;br&gt;For example in your case:&lt;br&gt;Tree might look like Gender-&gt;Age-&gt;Name&lt;br&gt;My problem is once i apply the group description. On Clicking TreeViewItem I do not know which Character item it is? Can you please guide me how to do this.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Rohit</description>
		<content:encoded><![CDATA[<p>Hello Dr WPF, <br />Great series! <br />I was trying to implement a similar concept of selecting views. I have one additional view, TreeView. In this i take my flat observable collection of items and show it in a treeview. To show my collections in a treeview, i add group descriptions to my collection View.<br />For example in your case:<br />Tree might look like Gender->Age->Name<br />My problem is once i apply the group description. On Clicking TreeViewItem I do not know which Character item it is? Can you please guide me how to do this.</p>
<p>Thanks<br />Rohit</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Henrique</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-318</link>
		<dc:creator>Tony Henrique</dc:creator>
		<pubDate>Sun, 07 Dec 2008 01:46:16 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-318</guid>
		<description>This was an inspiring sample. Great.</description>
		<content:encoded><![CDATA[<p>This was an inspiring sample. Great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-316</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Thu, 04 Sep 2008 00:36:59 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-316</guid>
		<description>&lt;div class=&quot;jbr&quot;&gt;Hi Frank,&lt;br&gt;&lt;br&gt;My sample actually uses a WrapPanel as the items host for most views. If you want virtualization, you can implement a virtualizing wrap panel (or find a third-party virtualizing wrap panel) to use as the items host. Yes, you would want to do that for a scalable solution. I will cover virtualization in a future episode of this series. In the meantime, there are other blogs that cover how to implement a virtualizing panel (like &lt;a href=&quot;http://blogs.msdn.com/dancre/archive/2006/02/06/526310.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://jerryclin.wordpress.com/2008/02/06/making-a-virtualizing-wrappanel/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;).&lt;br&gt;&lt;br&gt;For me, the selection works pretty much the same as in Vista (except maybe the small icons view, where I intentionally switch to vertical wrapping). It should be a familiar keyboard experience to most users. Shift+Arrows can be used to extend selection and Ctrl+Arrows along with Ctrl+Space can be used to individually select items.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw&lt;/div&gt;</description>
		<content:encoded><![CDATA[<div class="jbr">Hi Frank,</p>
<p>My sample actually uses a WrapPanel as the items host for most views. If you want virtualization, you can implement a virtualizing wrap panel (or find a third-party virtualizing wrap panel) to use as the items host. Yes, you would want to do that for a scalable solution. I will cover virtualization in a future episode of this series. In the meantime, there are other blogs that cover how to implement a virtualizing panel (like <a href="http://blogs.msdn.com/dancre/archive/2006/02/06/526310.aspx" target="_blank">here</a> and <a href="http://jerryclin.wordpress.com/2008/02/06/making-a-virtualizing-wrappanel/" target="_blank">here</a>).</p>
<p>For me, the selection works pretty much the same as in Vista (except maybe the small icons view, where I intentionally switch to vertical wrapping). It should be a familiar keyboard experience to most users. Shift+Arrows can be used to extend selection and Ctrl+Arrows along with Ctrl+Space can be used to individually select items.</p>
<p>Cheers,<br />-dw</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-315</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Sun, 24 Aug 2008 15:43:05 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-315</guid>
		<description>Hi Dr,&lt;br&gt;&lt;br&gt;nice sample. But I have 2 problems with it: &lt;br&gt;- performance: because you use StackPanels (that support no virtualization) performance is very bad for larger numbers of items. Any suggestions to get vurtualization back?&lt;br&gt;&lt;br&gt;- selection: when you select items using keyboard every view selections like the list view (so if you select from left to right everything below the current item will be selected). Any suggestions to solve this?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Frank</description>
		<content:encoded><![CDATA[<p>Hi Dr,</p>
<p>nice sample. But I have 2 problems with it: <br />- performance: because you use StackPanels (that support no virtualization) performance is very bad for larger numbers of items. Any suggestions to get vurtualization back?</p>
<p>- selection: when you select items using keyboard every view selections like the list view (so if you select from left to right everything below the current item will be selected). Any suggestions to solve this?</p>
<p>Thanks,<br />Frank</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-314</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Wed, 06 Aug 2008 01:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-314</guid>
		<description>Hi again M1ke,&lt;br&gt;&lt;br&gt;You can get the desired effect by setting MaxWidth and MaxHeight on the TextBlock in addition to TextWrapping (Wrap) and TextTrimming (WordEllipsis).  Try setting MaxHeight to 40 and then bind the MaxWidth property to the ActualWidth property of the Image element.  You will probably also want to use the existing DataTrigger in the template to set the TextAlignment property to Left when the scale is less than 2.5.&lt;br&gt;&lt;br&gt;Hope this all makes sense.  You&#039;ll have to tweak the template to meet your actual needs, but the above approach should give you the general idea.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Hi again M1ke,</p>
<p>You can get the desired effect by setting MaxWidth and MaxHeight on the TextBlock in addition to TextWrapping (Wrap) and TextTrimming (WordEllipsis).  Try setting MaxHeight to 40 and then bind the MaxWidth property to the ActualWidth property of the Image element.  You will probably also want to use the existing DataTrigger in the template to set the TextAlignment property to Left when the scale is less than 2.5.</p>
<p>Hope this all makes sense.  You&#8217;ll have to tweak the template to meet your actual needs, but the above approach should give you the general idea.</p>
<p>Cheers,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M1ke</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-313</link>
		<dc:creator>M1ke</dc:creator>
		<pubDate>Wed, 06 Aug 2008 01:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-313</guid>
		<description>Hello Again! Sorry for being lazy in my previous post! :)&lt;br&gt;&lt;br&gt;I have another question for you, which is straightly binded to my lack of WPF experience...&lt;br&gt;&lt;br&gt;When I set the CurrentView to Icons (Medium+) the ListViewItem gets the width of the Textblock.Text, which messes up with the &quot;proper&quot; alignment of the list (The Monk way)..&lt;br&gt;I tried changing the TextWrap value of the Textblock but it wouldn&#039;t obey... I&#039;m trying to make a file explorer, so the exact behaviour of the Windows Explorer would be nice! (you know, the one with the 2-line name and the &quot;...&quot;).&lt;br&gt;&lt;br&gt;Any ideas?</description>
		<content:encoded><![CDATA[<p>Hello Again! Sorry for being lazy in my previous post! <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have another question for you, which is straightly binded to my lack of WPF experience&#8230;</p>
<p>When I set the CurrentView to Icons (Medium+) the ListViewItem gets the width of the Textblock.Text, which messes up with the &quot;proper&quot; alignment of the list (The Monk way)..<br />I tried changing the TextWrap value of the Textblock but it wouldn&#8217;t obey&#8230; I&#8217;m trying to make a file explorer, so the exact behaviour of the Windows Explorer would be nice! (you know, the one with the 2-line name and the &quot;&#8230;&quot;).</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2008/03/28/itemscontrol-r-is-for-rob-has-a-customer/comment-page-1/#comment-312</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Mon, 28 Jul 2008 00:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=33#comment-312</guid>
		<description>&lt;div class=&quot;jbr&quot;&gt;Hi M1ke, I actually cover this in &lt;a href=&quot;http://drwpf.com/blog/?p=37&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;&#039;G&#039; is for Generator&lt;/em&gt;&lt;/a&gt; in the section entitled &lt;em&gt;Finding the Container Associated with a Template Element&lt;/em&gt;. :)&lt;br&gt;&lt;br&gt;The basic approach is to look at the original source of the routed event (e.OriginalSource).  If you cast it to a FrameworkElement (most likely your template only contains hittable framework elements, so this should be safe) and then look at its DataContext, you will know which item was clicked.  Then you can use this along with the ContainerFromItem method on the ListView&#039;s ItemContainerGenerator to get the ListViewItem.  Another option is to simply walk ancestors using the GetAncestorByType() routine included in the &#039;G&#039; article.&lt;br&gt;&lt;br&gt;Hope this helps!&lt;br&gt;-dw&lt;/div&gt;</description>
		<content:encoded><![CDATA[<div class="jbr">Hi M1ke, I actually cover this in <a href="http://drwpf.com/blog/?p=37" target="_blank"><em>&#8216;G&#8217; is for Generator</em></a> in the section entitled <em>Finding the Container Associated with a Template Element</em>. <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The basic approach is to look at the original source of the routed event (e.OriginalSource).  If you cast it to a FrameworkElement (most likely your template only contains hittable framework elements, so this should be safe) and then look at its DataContext, you will know which item was clicked.  Then you can use this along with the ContainerFromItem method on the ListView&#8217;s ItemContainerGenerator to get the ListViewItem.  Another option is to simply walk ancestors using the GetAncestorByType() routine included in the &#8216;G&#8217; article.</p>
<p>Hope this helps!<br />-dw</div>
]]></content:encoded>
	</item>
</channel>
</rss>

