<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Designer Silverlight &#187; listview</title>
	<atom:link href="http://www.designersilverlight.com/category/listview/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designersilverlight.com</link>
	<description>Matthias Shapiro's Silverlight &#38; WPF Blog - Because Developers Get All The Good Blogs</description>
	<lastBuildDate>Thu, 26 Jan 2012 06:45:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How To Use a ListView or DataGrid In a ComboBox Drop Down (Without A Line Of Code)</title>
		<link>http://www.designersilverlight.com/2008/10/01/how-to-use-a-listview-or-datagrid-in-a-combobox-drop-down-without-a-line-of-code/</link>
		<comments>http://www.designersilverlight.com/2008/10/01/how-to-use-a-listview-or-datagrid-in-a-combobox-drop-down-without-a-line-of-code/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 00:30:00 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[combobox]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/10/01/how-to-use-a-listview-or-datagrid-in-a-combobox-drop-down-without-a-line-of-code/</guid>
		<description><![CDATA[Super cool new thing I learned today. In WPF, we can make it so that the drop down (popup) on a ComboBox displays the data in a ListView. Because of the fact that I believe the DataGrid will eventually overtake the ListView as the gold standard for data display in WPF, we’ll do it both [...]]]></description>
			<content:encoded><![CDATA[<p>Super cool new thing I learned today. In WPF, we can make it so that the drop down (popup) on a ComboBox displays the data in a ListView. Because of the fact that I believe the DataGrid will eventually overtake the ListView as the gold standard for data display in WPF, we’ll do it both ways.</p>
<p>This tutorial is done entirely in Blend and without a line of code.</p>
<p><strong>Step 0)</strong> (for the DataGrid only)</p>
<p>Go to Code Plex and <a href="http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=14963">download the WPF Toolkit</a>. Extract to a convenient location.</p>
<p>Right-Click on the References folder in your project tab and click “Add Reference…”</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image001.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image001-thumb.png" title="clip_image001" style="border-width: 0px; display: inline" alt="clip_image001" border="0" height="85" width="238" /></a></p>
<p>Navigate to the location you extracted the WPFToolkit.dll file, select it and hit OK.<br />
<a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0016.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0016-thumb.png" title="clip_image001[6]" style="border-width: 0px; display: inline" alt="clip_image001[6]" border="0" height="205" width="177" /></a></p>
<p>Step 1) Select the ComboBox you wish to change and edit the ControlTemplate by right-clicking and selecting “Edit Control Parts (Template) –&gt; Edit a Copy…”</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0011.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0011-thumb.png" title="clip_image001[1]" style="border: 0px none ; display: inline" alt="clip_image001[1]" border="0" height="55" width="328" /></a></p>
<p>Step 2) Find the ItemsPresenter. This is what would normally display our ItemsSource.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0013.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0013-thumb.png" title="clip_image001[3]" style="border: 0px none ; display: inline" alt="clip_image001[3]" border="0" height="187" width="252" /></a></p>
<p>We’re going to get rid of it. And the ScrollViewer for good measure.</p>
<p>Step 3) Where the ScrollViewer is, put in a ListView or a DataGrid, whichever one you’re using.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0015.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0015-thumb.png" title="clip_image001[5]" style="border: 0px none ; display: inline" alt="clip_image001[5]" border="0" height="132" width="255" /></a></p>
<p>Now, go the properties of that ListView or DataGrid and click on the box to the right of “ItemsSource”</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image00111.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image00111-thumb.png" title="clip_image001[11]" style="border: 0px none ; display: inline" alt="clip_image001[11]" border="0" height="60" width="168" /></a></p>
<p>and, in the resulting menu, select “Template Binding –&gt; ItemsSource”.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0017.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image0017-thumb.png" title="clip_image001[7]" style="border: 0px none ; display: inline" alt="clip_image001[7]" border="0" height="294" width="438" /></a></p>
<p>Set the DataContext of the ListView or DataGrid to the DataContext of the parent ComboBox using the same process.</p>
<p>And… you’re done! Open the ComboBox and you will see that you can select items in the ListView or DataGrid in the ComboBox dropdown and see those items change the selection of the ComboBox.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image00113.png"><img src="http://www.designersilverlight.com/wp-content/uploads/2008/10/clip-image00113-thumb.png" title="clip_image001[13]" style="border: 0px none ; display: inline" alt="clip_image001[13]" border="0" height="193" width="545" /></a></p>
<p>You’ll notice that this is probably not yet an ideal solution. For example, when we select an item, the dropdown doesn’t automatically close. Your best bet is to use the SelectionChanged event to trigger some logic to close the ComboBox dropdown.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/10/01/how-to-use-a-listview-or-datagrid-in-a-combobox-drop-down-without-a-line-of-code/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+To+Use+a+ListView+or+DataGrid+In+a+ComboBox+Drop+Down+%28Without+A+Line+Of+Code%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D365" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+To+Use+a+ListView+or+DataGrid+In+a+ComboBox+Drop+Down+%28Without+A+Line+Of+Code%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D365" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/10/01/how-to-use-a-listview-or-datagrid-in-a-combobox-drop-down-without-a-line-of-code/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tip For Finding Resources for a Control in generic.xaml</title>
		<link>http://www.designersilverlight.com/2008/08/26/tip-for-finding-resources-for-a-control-in-genericxaml/</link>
		<comments>http://www.designersilverlight.com/2008/08/26/tip-for-finding-resources-for-a-control-in-genericxaml/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 00:39:42 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Advanced Tutorial]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/08/26/tip-for-finding-resources-for-a-control-in-genericxaml/</guid>
		<description><![CDATA[I&#8217;ve recently be working on changing the ControlTemplate of a GridViewColumnHeader in a custom ListView that we&#8217;ve been working on. (The ListView was rewritten for sorting, so that&#8217;s why it had to be custom.) One of the things we had to do was swap out ControlTemplates so that we could display a caret to indicate [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently be working on changing the ControlTemplate of a GridViewColumnHeader in a custom ListView that we&#8217;ve been working on. (The ListView was rewritten for sorting, so that&#8217;s why it had to be custom.)</p>
<p>One of the things we had to do was swap out ControlTemplates so that we could display a caret to indicate ascending or descending lists. We ended up deciding on ControlTemplates over DataTemplates because the DataTemplates would only work for ListViews that had no custom DataTemplates for the headers. We&#8217;re doing all sorts of crazy stuff with our headers and we need to preserve our DataTemplates, so this wasn&#8217;t an option. </p>
<p>In any case, I was having no luck finding the resource when I named it this way:</p>
<blockquote><p><span style="color: blue">&lt;</span><span style="color: #a31515">ControlTemplate </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Key</span><span style="color: blue">=&quot;MyCustomControlTemplate&quot; <span style="color: red">TargetType</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">x</span><span style="color: blue">:</span><span style="color: #a31515">Type </span><span style="color: red">GridViewColumnHeader</span><span style="color: blue">}&quot;&gt;</span></span></p>
</blockquote>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>I was using the following code to try and find the resource.</p>
<blockquote><p><span style="color: #2b91af">ControlTemplate </span>myNewTemplate = (<span style="color: #2b91af">ControlTemplate</span>)Resources[<span style="color: #a31515">&quot;MyCustomTemplate&quot;</span>];</p>
</blockquote>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>However, we were able to solve the problem by naming the resource this way</p>
<blockquote><p><span style="color: blue">&lt;</span><span style="color: #a31515">ControlTemplate </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Key</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">ComponentResourceKey </span><span style="color: red">TypeInTargetAssembly</span><span style="color: blue">={</span><span style="color: #a31515">x</span><span style="color: blue">:</span><span style="color: #a31515">Type </span><span style="color: red">local</span><span style="color: blue">:</span><span style="color: red">MyCustomListView</span><span style="color: blue">}, </span><span style="color: red">ResourceId</span><span style="color: blue">=MyCustomControlTemplate}&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue"><span style="color: red">TargetType</span><span style="color: blue">=&quot;{</span><span style="color: #a31515">x</span><span style="color: blue">:</span><span style="color: #a31515">Type </span><span style="color: red">GridViewColumnHeader</span><span style="color: blue">}&quot;&gt;</span></span></p>
<p>   <a href="http://11011.net/software/vspaste"></a></p></blockquote>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>And then using this code to access it.</p>
<blockquote><p><span style="color: #2b91af">ComponentResourceKey </span>myCustomTemplateKey = <span style="color: blue">new </span><span style="color: #2b91af">ComponentResourceKey</span>(<span style="color: blue">typeof</span>(<span style="color: #2b91af">SortableListView</span>), <span style="color: #a31515">&quot;MyCustomControlTemplate&quot;</span>);      <br /><span style="color: #2b91af">ControlTemplate </span>myNewTemplate = (<span style="color: #2b91af">ControlTemplate</span>)<span style="color: blue">this</span>.TryFindResource(myCustomTemplateKey);</p>
</blockquote>
<p> <a href="http://11011.net/software/vspaste"></a>
<p>Just thought I&#8217;d pass it along.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/08/26/tip-for-finding-resources-for-a-control-in-genericxaml/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Tip+For+Finding+Resources+for+a+Control+in+generic.xaml+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D267" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Tip+For+Finding+Resources+for+a+Control+in+generic.xaml+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D267" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/08/26/tip-for-finding-resources-for-a-control-in-genericxaml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Assign ColumnHeaderContainerStyle and ColumnHeaderTemplate to a ListView Style</title>
		<link>http://www.designersilverlight.com/2008/08/15/how-to-assign-columnheadercontainerstyle-and-columnheadertemplate-to-a-listview-style/</link>
		<comments>http://www.designersilverlight.com/2008/08/15/how-to-assign-columnheadercontainerstyle-and-columnheadertemplate-to-a-listview-style/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 23:06:06 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[columnheadercontainerstyle]]></category>
		<category><![CDATA[columnheadertemplate]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/08/15/how-to-assign-columnheadercontainerstyle-and-columnheadertemplate-to-a-listview-style/</guid>
		<description><![CDATA[This is just a quick note on creating a ListView style with the appropriate GridView style and template assignments. Normally, I&#8217;ve been creating listviews that look like this: &#60;ListView x:Name=&#8221;MyListView&#8221;                ItemContainerStyle=&#8221;{DynamicResource MyListViewItemContainerStyle}&#8221;&#62;     &#60;ListView.View&#62;          &#60;GridView ColumnHeaderContainerStyle=&#8221;{DynamicResource MyListViewHeaderStyle}&#8221;                          ColumnHeaderTemplate=&#8221;{DynamicResource MyGridColumnHeaderTemplate}&#8221;&#62;  I did this because I didn&#8217;t know exactly how to assign these styles [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick note on creating a ListView style with the appropriate GridView style and template assignments.</p>
<p>Normally, I&#8217;ve been creating listviews that look like this:</p>
<blockquote>
<pre class="code"><span style="color: blue"></span></pre>
<p><span style="color: blue">&lt;</span><span style="color: #a31515">ListView </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&#8221;MyListView&#8221;</span><span style="color: red"><br />
               ItemContainerStyle</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyListViewItemContainerStyle</span><span style="color: blue">}&#8221;&gt;<br />
    </span><span style="color: blue">&lt;</span><span style="color: #a31515">ListView.View</span><span style="color: blue">&gt;<br />
         </span><span style="color: blue"><span style="color: blue">&lt;</span><span style="color: #a31515">GridView </span><span style="color: red">ColumnHeaderContainerStyle</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyListViewHeaderStyle</span><span style="color: blue">}&#8221;<br />
                         </span></span><span style="color: blue"><span style="color: red">ColumnHeaderTemplate</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyGridColumnHeaderTemplate</span><span style="color: blue">}&#8221;&gt;</span></span><span style="color: blue"> </span></p></blockquote>
<p><span style="color: blue"><font color="#000000">I did this because I didn&#8217;t know exactly how to assign these styles and templates to the ListView Style. In the style, ColumnHeaderContainerStyle and ColumnHeaderTemplate are not properties of the ListView, they are properties of the GridView&#8230; which you can&#8217;t create a style for.</font></span></p>
<p><span style="color: blue"><font color="#000000">Instead, you can encapsulate all the information above in the following style.</font></span></p>
<blockquote><p><span style="color: blue">&lt;</span><span style="color: #a31515">Style </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Key</span><span style="color: blue">=&#8221;CustomListViewStyle&#8221; </span><span style="color: red">TargetType</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">x</span><span style="color: blue">:</span><span style="color: #a31515">Type </span><span style="color: red">ListView</span><span style="color: blue">}&#8221;&gt;<br />
      &lt;</span><span style="color: #a31515">Setter </span><span style="color: red">Property</span><span style="color: blue">=&#8221;GridView.ColumnHeaderContainerStyle&#8221; </span><span style="color: red">Value</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyListViewHeaderStyle</span><span style="color: blue">}&#8221; /&gt;<br />
      </span><span style="color: blue">&lt;</span><span style="color: #a31515">Setter </span><span style="color: red">Property</span><span style="color: blue">=&#8221;GridView.ColumnHeaderTemplate&#8221; </span><span style="color: red">Value</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyGridColumnHeaderTemplate</span><span style="color: blue">}&#8221; /&gt;<br />
      </span><span style="color: blue">&lt;</span><span style="color: #a31515">Setter </span><span style="color: red">Property</span><span style="color: blue">=&#8221;ItemContainerStyle&#8221; </span><span style="color: red">Value</span><span style="color: blue">=&#8221;{</span><span style="color: #a31515">DynamicResource </span><span style="color: red">MyListViewItemContainerStyle</span><span style="color: blue">}&#8221; /&gt;<br />
<span style="color: blue">&lt;/</span><span style="color: #a31515">Style&gt;</span></span></p></blockquote>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="color: blue"><font color="#000000">Problem solved.</font></span></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/08/15/how-to-assign-columnheadercontainerstyle-and-columnheadertemplate-to-a-listview-style/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+to+Assign+ColumnHeaderContainerStyle+and+ColumnHeaderTemplate+to+a+ListView+Style+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D266" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+to+Assign+ColumnHeaderContainerStyle+and+ColumnHeaderTemplate+to+a+ListView+Style+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D266" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/08/15/how-to-assign-columnheadercontainerstyle-and-columnheadertemplate-to-a-listview-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How Do I Make a ListView or a ScrollViewer Left Handed?</title>
		<link>http://www.designersilverlight.com/2008/04/18/how-do-i-make-a-listview-or-a-scrollviewer-left-handed/</link>
		<comments>http://www.designersilverlight.com/2008/04/18/how-do-i-make-a-listview-or-a-scrollviewer-left-handed/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 05:40:32 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[ScrollViewer]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[left handed]]></category>
		<category><![CDATA[lefty]]></category>
		<category><![CDATA[scrollbar]]></category>
		<category><![CDATA[Triggers]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/04/18/how-do-i-make-a-listview-or-a-scrollviewer-left-handed/</guid>
		<description><![CDATA[Several months back, I was doing some work for a company that was using WPF for a stylus based application. One of the things that they found they needed was a scrollbar that could be used by left handed people who would have to cover the entire screen with their left hand in order to [...]]]></description>
			<content:encoded><![CDATA[<p>Several months back, I was doing some work for a company that was using WPF for a stylus based application. One of the things that they found they needed was a scrollbar that could be used by left handed people who would have to cover the entire screen with their left hand in order to scroll a traditional scroll viewer.</p>
<p>The solution ended up being so easy in WPF that I thought I&#8217;d post it here.</p>
<p>I&#8217;m in a two-birds-one-stone mood, so we&#8217;ll do this for both the listview, which will also cover a more traditional scrollviewer. Let&#8217;s start with our ever friendly listview.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/normallistview.png" alt="NormalListView" />At the very sight of this thing, with a stylus in hand, your average lefty is thinking to him or herself &#8220;I wonder if I can do my work upside down?&#8221; Let&#8217;s show them that we love and accept them just as they are.</p>
<p>The first thing we&#8217;re going to do is create a new template for this sucker, so right click on your listview and go to &#8220;<strong>Edit Control Parts (Template) -&gt; Edit a Copy…</strong>&#8221;</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/lefty_editcontrolparts.png" alt="Lefty_EditControlParts" /></p>
<p>Now we&#8217;re looking at the standard listview template. Mine looks like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/lefty_listviewtemplate.png" alt="ListViewTemplate" />Let&#8217;s dig right into the ScrollViewer. If you&#8217;re doing this from the listview (like I am) then creating a template for the listview has already created a template for the scrollviewer. If you&#8217;re starting from a basic scrollviewer, you can pretty much start right here.</p>
<p>For the purposes of making this thing easy to work with in Blend, go ahead and set the HorizontalScrollBarVisibility and VerticalScrollBarVisibility to Visible.</p>
<p> <img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/scrollbarvisibiltiy.png" alt="ScrollBar_Visibility" /></p>
<p>And then &#8220;<strong>Edit Control Parts (Template) -&gt; Edit a Copy…</strong>&#8221; (or &#8220;<strong>Edit Control Parts (Template) -&gt; Edit Template</strong>&#8221; if it is available).</p>
<p>We are now looking at the guts of the ScrollViewer Control.</p>
<p>ListView ScrollViewer will look like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/listviewscrolltemplate.png" alt="ListViewScrollTemplate" />The normal ScrollViewer will look like this:</p>
<p> <img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/lefty_normalscrollviewer.png" alt="NormalScrollViewer" /></p>
<p>For our purposes, they&#8217;re functionally the same. It is actually a fairly simple control… basically just a Grid panel with the columns and rows set up like so:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">*</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">Auto</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid.RowDefinitions</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">RowDefinition</font> <font color="#ff0000">Height</font>=&#8221;<font color="#0000ff">*</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">RowDefinition</font> <font color="#ff0000">Height</font>=&#8221;<font color="#0000ff">Auto</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Grid.RowDefinitions</font><font color="#0000ff">&gt;</font></p>
<p>The scrollBars are set up so that their visibility is tied to (duh) the visibility that is set on the control. But what this does is it means that when they are collapsed… they Grid reclaims the space that they were taking up.</p>
<p>Now… here&#8217;s the hilarious part… in order to make this ScrollViewer left handed, all you have to do is swap the Grid.Columns:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">Auto</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">*</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font></p>
<p>You&#8217;ve now switched the columns so that the left handed column is auto. Here&#8217;s a list of the Grid.Column realignments you&#8217;ll need to make:</p>
<p><strong>Change Column to &#8220;1&#8243;:</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/lefty_columnswitch1.png" alt="Lefty_Column1" /></p>
<ul>
<li>PART_HorizontalScrollBar</li>
<li>All DockPanels (ListView only)</li>
<li>PART_ScrollContentPresenter (ScrollViewer only)</li>
<li>Corner (ScrollViewer only)</li>
</ul>
<p><strong>Change Column to &#8220;0&#8243;:</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/lefty_columnswitch0.png" alt="Lefty_Column0" /></p>
<ul>
<li>PART_VerticalScrollBar</li>
</ul>
<p>Basically, swap everything from in the two columns.</p>
<p>Done.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/04/finalleftyproduct.png" alt="FinalLeftyListView" />If you want to make this a more robust control, I recommend creating a ScrollViewer with an additional dependency property (IsSouthPaw or something). Make it so that your Grid has three columns:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">Auto</font>&#8220;<font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">ColumnDefinition</font> <font color="#ff0000">Width</font>=&#8221;<font color="#0000ff">*</font>&#8220;<font color="#0000ff">/&gt;<br />
      &lt;<font color="#800000">ColumnDefinition</font><font color="#000000"> </font><font color="#ff0000">Width</font><font color="#000000">=&#8221;</font><font color="#0000ff">Auto</font><font color="#000000">&#8220;</font><font color="#0000ff">/&gt;</font></font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Grid.ColumnDefinitions</font><font color="#0000ff">&gt;</font></p>
<p>And then you can just create a trigger that swaps the column placement of your PART_VerticalScrollBar. Such a trigger will look something like this. And by &#8220;something&#8221;, I mean &#8220;exactly&#8221;.</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Trigger</font> <font color="#ff0000">Property</font>=&#8221;<font color="#0000ff">IsSouthPaw</font>&#8221; <font color="#ff0000">Value</font>=&#8221;<font color="#0000ff">True</font>&#8220;<font color="#0000ff">&gt;</font><br />
      <font color="#0000ff">&lt;</font><font color="#800000">Setter</font> <font color="#ff0000">Property</font>=&#8221;<font color="#0000ff">Grid.Column</font>&#8221; <font color="#ff0000">TargetName</font>=&#8221;<font color="#0000ff">PART_VerticalScrollBar</font>&#8220;  <font color="#ff0000">Value</font>=&#8221;<font color="#0000ff">0</font>&#8221; <font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Trigger</font><font color="#0000ff">&gt;</font></p>
<p>Go forth and make Ned Flanders proud.</p>
<p>By the way, I listen to pop punk whenever I write my tutorials and I just thought I should let <a href="http://en.wikipedia.org/wiki/Senses_Fail">Senses Fail </a>know that they can probably get away with about 80% less &#8220;dying cat&#8221; screaming and still put out good music. You know&#8230; because they&#8217;re probably WPF programmers on the side and they&#8217;ll probably read this to solve all their left-handed scrollbar needs.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/04/18/how-do-i-make-a-listview-or-a-scrollviewer-left-handed/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+Do+I+Make+a+ListView+or+a+ScrollViewer+Left+Handed%3F+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D212" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+Do+I+Make+a+ListView+or+a+ScrollViewer+Left+Handed%3F+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D212" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/04/18/how-do-i-make-a-listview-or-a-scrollviewer-left-handed/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ListView (and ListBox) Performance Issues</title>
		<link>http://www.designersilverlight.com/2008/02/12/listview-and-listbox-performance-issues/</link>
		<comments>http://www.designersilverlight.com/2008/02/12/listview-and-listbox-performance-issues/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 23:46:02 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[listview]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPF Performance]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Mark Shurmer]]></category>
		<category><![CDATA[VirtualizingStackPanel]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/02/12/listview-and-listbox-performance-issues/</guid>
		<description><![CDATA[I was working on one of my projects today and I noticed that one of our popups displaying search results in a ListBox was having really serious performance problems.  After determining that the problem was, in fact, on the WPF side of things, I was somewhat baffled. I wasn&#8217;t doing anything that I could think of that should be [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on one of my projects today and I noticed that one of our popups displaying search results in a ListBox was having really serious performance problems.  After determining that the problem was, in fact, on the WPF side of things, I was somewhat baffled. I wasn&#8217;t doing anything that I could think of that should be pushing the limit of what WPF could do.</p>
<p> Finally, I went looking online for an answer and discovered a list of possible <a href="http://itknowledgeexchange.techtarget.com/wpf/listview-is-it-really-too-slow/">performance killers for the ListView (and ListBox) on Mark Shurmer&#8217;s blog</a>. Chief among his no-no&#8217;s:</p>
<blockquote><p>Embedding the ListView inside a StackPanel</p></blockquote>
<p>Which is exactly what I was doing.</p>
<p>Why is this a problem? To answer that question, let&#8217;s take a look at the ItemsPanel at runtime using <a href="http://www.designersilverlight.com/2007/12/27/designers-guide-to-debugging-wpf-applications-with-snoop/">Snoop</a>. When I place my ListBox into a Grid, here is what my ItemsPanel looks like:</p>
<p><span id="more-162"></span></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/gooditemspanel.png" alt="goodItemsPanel" /></p>
<p>If I change back to what I originally had (my ListBox in a StackPanel), here is what my ItemsPanel looks like:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/baditemspanel.png" alt="BadItemsPanel1" /><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/baditemspanel2.png" alt="badItemsPanel2" />             <img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/baditemspanel3.png" alt="BadItemsPanel3" /></p>
<p>That&#8217;s actually not even the end of it. That&#8217;s about half.</p>
<p>As far as I can tell, all of Mark&#8217;s suggestions have to do with making sure that the VirtualizingStackPanel can do what it needs to do in order to keep your program running at a reasonable rate. Good stuff.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/02/12/listview-and-listbox-performance-issues/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=ListView+%28and+ListBox%29+Performance+Issues+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D162" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=ListView+%28and+ListBox%29+Performance+Issues+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D162" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/02/12/listview-and-listbox-performance-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How Do I Wrap Text in a ListView Header?</title>
		<link>http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/</link>
		<comments>http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 07:23:20 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[column header styling]]></category>
		<category><![CDATA[DataTemplate]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[GridViewColumnHeader]]></category>
		<category><![CDATA[header styling]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/</guid>
		<description><![CDATA[OK, it&#8217;s really late and I want to get this done, so we&#8217;re going to go through the easy way, which will require some XAML, but I&#8217;ll try to keep it as Blend-y as possible. So you have a column header and you want the text inside to wrap when the header space gets too [...]]]></description>
			<content:encoded><![CDATA[<p>OK, it&#8217;s really late and I want to get this done, so we&#8217;re going to go through the easy way, which will require some XAML, but I&#8217;ll try to keep it as Blend-y as possible.</p>
<p>So you have a column header and you want the text inside to wrap when the header space gets too short for the content. Your header probably looks something like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/headerbegin.png" alt="OriginalHeader" /></p>
<p>First, go to wherever your resources are being held and type the following in:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Style</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">CustomHeaderStyle</font>&#8220; <font color="#ff0000">TargetType</font>=&#8221;<font color="#cc9436">{x:Type GridViewColumnHeader}</font>&#8220;<font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Style</font><font color="#0000ff">&gt;</font></p>
<p><span id="more-115"></span>Now, go over to your resources tab (usually on the far right) and click on your <strong>&#8220;CustomHeaderStyle&#8221;</strong>:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/headerresources.png" alt="Opening_Header_Resources" /></p>
<p>Blend will take you into the Design mode for your style. Go to the <strong>&#8220;Layout&#8221; </strong>section and expand the advanced properties. You&#8217;ll see that the HorizontalContentAlignment is, by default, set to <strong>&#8220;Center&#8221;</strong>. Let&#8217;s go ahead and change that to <strong>&#8220;Stretch&#8221;</strong>.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/horizontalcontentalignment.png" alt="Header Content Alignment" /></p>
<p>Now go to your ListView in the XAML and find your GridView. Assign the following property to your GridView:</p>
<p><font color="#ff0000"><font color="#0000ff">&lt;</font><font color="#800000">GridView</font><font color="#000000"> </font>ColumnHeaderContainerStyle</font>=&#8221;<font color="#cc9436">{DynamicResource CustomHeaderStyle}</font>&#8221; <font color="#0000ff">&gt;</font></p>
<p>Now, your header looks like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/wrapheader2.png" alt="Wrap_Header_Part_2" /></p>
<p>Now we just need to tell the DataTemplate holding the actual text that it is OK to let that text wrap. In your resources, create a DataTemplate like the one below.</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">DataTemplate</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">WrappingHeaderTemplate</font>&#8220;<font color="#0000ff">&gt;<br />
      </font><font color="#0000ff">&lt;</font><font color="#800000">Grid</font><font color="#0000ff">&gt;<br />
            </font><font color="#0000ff">&lt;</font><font color="#800000">TextBlock</font> <font color="#ff0000">Text</font>=&#8221;<font color="#cc9436">{Binding}</font>&#8221; <font color="#ff0000">TextWrapping</font>=&#8221;<font color="#0000ff">Wrap</font>&#8221; <font color="#0000ff">/&gt;<br />
      </font><font color="#0000ff">&lt;/</font><font color="#800000">Grid</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">DataTemplate</font><font color="#0000ff">&gt;</font></p>
<p>Highlight your target ListView in the Objects and Timeline window and scroll all the way down in the properties window, expanding the <strong>&#8220;View (GridView)&#8221;</strong> section at the bottom.</p>
<p>Click on the box to the right of the ColumnHeaderTemplate property, expand the <strong>&#8220;Local Resource&#8221;</strong> section and select your new data template.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/select_header_in_blend.png" alt="SelectHeaderInBlend" /></p>
<p>Your GridView will look like this:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">GridView</font><font color="#000000"> </font><font color="#ff0000">ColumnHeaderContainerStyle</font>=&#8221;<font color="#cc9436">{DynamicResource CustomHeaderStyle}</font>&#8220; <br />
<font color="#0000ff"><font color="#000000">      </font><font color="#ff0000">ColumnHeaderTemplate<font color="#000000">=&#8221;</font><font color="#cc9436">{DynamicResource WrappingHeaderTemplate}</font></font><font color="#000000">&#8220;</font>&gt;</font></p>
<p>and your listview header should now look like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/wrapheader3.png" alt="Wrap_Header_Part_3" /></p>
<p>If you&#8217;re really picky and you want your header to be centered (see how &#8220;Title&#8221; is left aligned?) , go back into your DataTemplate (as seen above) and set your Grid to the following:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid</font> <font color="#ff0000">HorizontalAlignment</font>=&#8221;<font color="#0000ff">Center</font>&#8220;<font color="#0000ff">&gt;</font></p>
<p>Your header should now look like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/wrapheader4.png" alt="Wrap_Header_Part_4" /></p>
<p>You&#8217;re awesome.</p>
<p>I&#8217;m going to sleep.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+Do+I+Wrap+Text+in+a+ListView+Header%3F+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D115" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+Do+I+Wrap+Text+in+a+ListView+Header%3F+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D115" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Embedded ListView Columns (Columns Within Columns)</title>
		<link>http://www.designersilverlight.com/2008/01/25/embedded-listview-columns-columns-within-columns/</link>
		<comments>http://www.designersilverlight.com/2008/01/25/embedded-listview-columns-columns-within-columns/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 03:58:08 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Advanced Tutorial]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[Data Template]]></category>
		<category><![CDATA[embedded columns]]></category>
		<category><![CDATA[GridViewColumnHeader]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/25/embedded-listview-columns-columns-within-columns/</guid>
		<description><![CDATA[Please Read: Strangely, when you do a Google search for &#8220;wpf&#8221; and &#8220;listview&#8221;, this is one of the top links. This is odd because this particular post is kind of an advanced tutorial. If you&#8217;re looking for more general information on styling the wpf listview, check out this post. It is probably much closer to what you&#8217;re looking [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Please Read:</strong> Strangely, when you do a Google search for &#8220;wpf&#8221; and &#8220;listview&#8221;, this is one of the top links. This is odd because this particular post is kind of an advanced tutorial. If you&#8217;re looking for more general information on styling the wpf listview, check out <a href="http://www.designersilverlight.com/2007/12/06/the-wpf-designers-guide-to-styling-the-your-favorite-adjectival-swear-word-here-listview/">this post</a>. It is probably much closer to what you&#8217;re looking for.</p>
<p>This is a bit of an advanced tutorial. I&#8217;m putting it up because I just figured out how to do it and I want to share. You can also <a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/listviewembeddedcolumns.zip" title="Embedded Columns Project Files">download the project files for this tutorial</a> (in zip format&#8230; requires .Net 3.5).</p>
<p>Recently, I received from my user experience designers a wireframe that looked something like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/embededwireframe.png" alt="EmbeddedWireframe" /></p>
<p>As you can see, there are embedded categories (categories within categories) here. I considered many solutions (hacks), but I found that a deeper understanding of the ListView and how it works would allow me to resolve this issue very simply (and without even touching the code behind).<span id="more-82"></span></p>
<h2>&lt;Exposition&gt;</h2>
<p>So… within every ListView, there is a Gridview that holds a set of GridViewColumns. What I didn&#8217;t realize until a couple days ago was that when you put the GridViewColumns into the GridView, you&#8217;re implicitly handing the GridView a GridViewColumnCollection.This collection is then referenced by the GridViewHeaderRowPresenter (located deep inside the ListView Template) and the GridViewRowPresenter, which is located inside the ListViewItem template (which I usually get to through the ItemContainerStyle… see here for more details).</p>
<p>Anyway, these two presenters databind back up to the GridView to grab the GridViewColumns that we&#8217;ve defined.</p>
<p>Once I understood that, I realized that I could create a GridViewColumnCollection as a resource and the reference it inside some custom templates.</p>
<p>At this point, I get the feeling that some readers are just hearing &#8220;blah blah blah&#8221;. It&#8217;s actually easier to demonstrate than it is to explain. So let&#8217;s get to it.</p>
<h2>&lt;/Exposition&gt;</h2>
<p>We&#8217;re going to grab the header image from the New York Times RSS feed and display it in its own column while displaying all the accompanying header data under a broad Images header with sub-columns called Title, URL, and Link. It will look like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/embededfinal.png" alt="EmbeddedFinalScreen" /></p>
<h2>Resources</h2>
<p>First, lets deal with all the resources we need. Take note that this part will be pretty XAML heavy.</p>
<p>Create a resources section. If mine isn&#8217;t in a separate resource dictionary, I usually just create it at the top of the window as seen below.</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Window.Resources</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Window.Resources</font><font color="#0000ff">&gt;</font></p>
<p>All your resources stuff will go in between those two tags. </p>
<p>Create a GridViewColumnCollection in the resources:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">GridViewColumnCollection</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">ImageColumnCollection</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">GridViewColumn </font><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Title</font>&#8221; <font color="#0000ff">/&gt;<br />
      </font><font color="#0000ff">&lt;</font><font color="#800000">GridViewColumn </font><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">URL</font>&#8221; <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff"><font color="#000000">      </font>&lt;</font><font color="#800000">GridViewColumn</font> <font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Link</font>&#8221; <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff">&lt;/</font><font color="#800000">GridViewColumnCollection</font><font color="#0000ff">&gt;</font></p>
<p>Now, go through the motions to getting your RSS feed. Follow the steps I lay out in <a href="http://www.designersilverlight.com/2007/12/13/how-do-i-connect-an-rss-feed-to-my-listviewlistboxwhatever/">my post on getting the New York Times RSS feeds</a>, except that, instead of clicking on the <strong>item(Array)</strong>, click on the <strong>image </strong>section. Continue on with the <strong>&#8220;Create Data Template&#8221;</strong> option to get your RSS bindings automated.</p>
<p>Grab the bindings in this template and put them into the DisplayMemberBinding property in the GridViewColumns. Your GridViewColumnCollection should now look like this:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">GridViewColumnCollection</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">ImageColumnCollection</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">GridViewColumn </font><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Title</font>&#8221;<br />
            <font color="#ff0000">DisplayMemberBinding</font>=&#8221;<font color="#b8860b">{Binding Mode=OneWay, XPath=title}</font>&#8220;  <font color="#0000ff">/&gt;<br />
      </font><font color="#0000ff">&lt;</font><font color="#800000">GridViewColumn </font><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">URL</font>&#8221;<br />
            <font color="#ff0000">DisplayMemberBinding</font>=&#8221;<font color="#b8860b">{Binding Mode=OneWay, XPath=url}</font>&#8220;   <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff"><font color="#000000">      </font>&lt;</font><font color="#800000">GridViewColumn</font> <font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Link</font>&#8221;<br />
            <font color="#ff0000">DisplayMemberBinding</font>=&#8221;<font color="#b8860b">{Binding Mode=OneWay, XPath=link}</font>&#8220;   <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff">&lt;/</font><font color="#800000">GridViewColumnCollection</font><font color="#0000ff">&gt;</font></p>
<p>Now that we have our GridViewColumnCollection in place, let&#8217;s create some stuff that will actually use it.</p>
<p>Create a new empty Data Template. If you&#8217;re still uncomfortable digging into the XAML itself, you can just type the following in:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">DataTemplate</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">MultiColumnHeaderTemplate</font>&#8220;<font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">DataTemplate</font><font color="#0000ff">&gt;</font></p>
<p>And then go to your resources tab and double click on it to make it accessible in the design mode.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/embededresources.png" alt="ResourcesTab" /></p>
<p>The way I set this up was very simple. I put in a grid with two rows set to auto, put a TextBlock in the top one and a GridViewHeaderRowPresenter into the other one. The TextBlock at the top is bound to the Header Content with a simple binding:</p>
<p><font color="#ff0000">Text</font>=&#8221;<font color="#b8860b">{Binding}</font>&#8221;</p>
<p>The real trick is that the GridViewHeaderRowPresenter is bound to our Columns resource by simply entering the following property:</p>
<p><font color="#ff0000">Columns</font>=&#8221;<font color="#b8860b">{DynamicResource ImageColumnCollection}</font>&#8221;</p>
<p>Now, each column in that collection will send its header information to be handled by this particular GridViewHeaderRowPresenter.</p>
<p>Our final header data template looks something like this:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">DataTemplate</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">MultiColumnHeaderTemplate</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">Grid</font><font color="#0000ff">&gt;<br />
            &lt;</font><font color="#800000">Grid.RowDefinitions</font><font color="#0000ff">&gt;<br />
                  &lt;</font><font color="#800000">RowDefinition</font> <font color="#ff0000">Height</font>=&#8221;<font color="#0000ff">Auto</font>&#8221; <font color="#0000ff">/&gt;<br />
                  &lt;</font><font color="#800000">RowDefinition</font> <font color="#ff0000">Height</font>=&#8221;<font color="#0000ff">Auto</font>&#8221; <font color="#0000ff">/&gt;<br />
            &lt;/</font><font color="#800000">Grid.RowDefinitions</font><font color="#0000ff">&gt;<br />
            &lt;</font><font color="#800000">TextBlock</font> <font color="#ff0000">Text</font>=&#8221;<font color="#b8860b">{Binding}</font>&#8221;<br />
                  <font color="#ff0000">HorizontalAlignment</font>=&#8221;<font color="#0000ff">Center</font>&#8220;<font color="#0000ff">/&gt;<br />
            &lt;</font><font color="#800000">GridViewHeaderRowPresenter</font> <font color="#ff0000">Grid.Row</font>=&#8221;<font color="#0000ff">1</font>&#8221;<br />
                  <font color="#ff0000">HorizontalAlignment</font>=&#8221;<font color="#0000ff">Stretch</font>&#8221;<br />
                  <font color="#ff0000">Columns</font>=&#8221;<font color="#b8860b">{DynamicResource ImageColumnCollection}</font>&#8221; <font color="#0000ff">/&gt;                                       <br />
      &lt;/</font><font color="#800000">Grid</font><font color="#0000ff">&gt;<br />
&lt;/</font><font color="#800000">DataTemplate</font><font color="#0000ff">&gt;</font></p>
<p>That takes care of our headers… what about our item data? How do I get this data to fit into the proper columns? This was a problem I struggled with for quite some time until a friend of mine pointed out that the GridViewRowPresenter in the ItemTemplate could be extracted and used where ever I wanted to use it. Resultingly, I could place it into the CellTemplate of my Image Information column to compliment the placement of the GridViewHeaderRowPresenter in the Header of that same column.</p>
<p>If you&#8217;re following along and trying hard to learn, create a new DataTemplate and just toss a GridViewRowPresenter into it, binding it to the same column collection. Or you can just copy and paste the XAML below. Your choice.</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">DataTemplate</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">MultiColumnCellTemplate</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">Grid</font><font color="#0000ff">&gt;<br />
</font><font color="#0000ff">            &lt;</font><font color="#800000">GridViewRowPresenter</font> <font color="#ff0000">HorizontalAlignment</font>=&#8221;<font color="#0000ff">Stretch</font>&#8221;<br />
                  <font color="#ff0000">Columns</font>=&#8221;<font color="#b8860b">{DynamicResource ImageColumnCollection}</font>&#8221; <font color="#0000ff">/&gt;                                       <br />
      &lt;/</font><font color="#800000">Grid</font><font color="#0000ff">&gt;<br />
&lt;/</font><font color="#800000">DataTemplate</font><font color="#0000ff">&gt;</font> </p>
<p>This will be the basis of our embedded column design. We&#8217;re almost there, let&#8217;s just tie up some resources loose ends.</p>
<p>In order to get the image to show up in the &#8220;Image&#8221; column, we need to create a handy little DataTemplate to display that image. Simply have an image in the Data Template and have the Source property point to the url binding for the image like so:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">DataTemplate</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">ImageTemplate</font>&#8220;<font color="#0000ff">&gt;<br />
      </font><font color="#0000ff">&lt;</font><font color="#800000">Image</font> <font color="#ff0000">Source</font>=&#8221;<font color="#b8860b">{Binding Mode=OneWay, XPath=url}</font>&#8221; <font color="#0000ff">/&gt;                                       <br />
</font><font color="#0000ff">&lt;/</font><font color="#800000">DataTemplate</font><font color="#0000ff">&gt;</font> </p>
<p>OK… we are now ready to actually do something outside of our resources. Don&#8217;t worry, this will be fast.</p>
<h2>Main XAML Composition</h2>
<p>If you haven&#8217;t already drawn a ListView in your main window, do so now.  Right click on the ListView and  go to <strong>Bind ItemSource to Data…</strong></p>
<p> <img src="http://www.designersilverlight.com/wp-content/uploads/2007/12/itemsourcemenu.png" alt="ItemSourceMenu" /></p>
<p>In the resulting pop-up choose your RSS Feed (mine is called NYTTech) and select the image option from it.  (If you haven&#8217;t added the RSS feed, just copy and paste the line below to the top of your resources.)</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">XmlDataProvider</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">NYTTech</font>&#8221;<br />
      <font color="#ff0000">d:IsDataSource</font>=&#8221;<font color="#0000ff">True</font>&#8221;<br />
      <font color="#ff0000">Source</font>=&#8221;<font color="#0000ff">http://www.nytimes.com/services/xml/rss/nyt/Technology.xml</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p>Now, in the interest of time, we&#8217;re going to go right into the XAML. If you&#8217;re interested in seeing how to do this using Blend only, <a href="http://www.designersilverlight.com/2007/12/13/styling-a-listview-column-using-blend/">check this post out</a>. Trust me, it&#8217;s not worth it.</p>
<p>Because we&#8217;ve already constructed most of what we need in the resources, we only need to do a couple things here. First, create two GridViewColumns, one with</p>
<p><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Image</font>&#8220; </p>
<p>and another with</p>
<p><font color="#ff0000">Header</font>=&#8221;<font color="#0000ff">Image Information</font>&#8221;</p>
<p>In the Image column, set</p>
<p><font color="#ff0000">CellTemplate</font>=&#8221;{StaticResource ImageTemplate}&#8221;</p>
<p>In the Image Information column (which is our column with embedded columns), we just need to point to our already constructed templates like so:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">GridViewColumnHeader <font color="#ff0000">Header<font color="#000000">=&#8221;</font><font color="#0000ff">Image Information</font><font color="#000000">&#8220;</font> <br />
      HeaderTemplate<font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource MultiColumnHeaderTemplate}</font><font color="#000000">&#8220; <br />
      </font></font></font><font color="#0000ff"><font color="#800000"><font color="#ff0000">CellTemplate</font><font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource MultiColumnCellTemplate}</font><font color="#000000">&#8221; </font></font><font color="#0000ff">&gt;</font></font></p>
<p>Go ahead and run the project and you&#8217;ll see that we have one tiny little problem left.</p>
<p>Because the default content alignment of the header style is to center everything, all of our columns are misaligned. To solve this problem, copy the following style into your resources:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Style </font><font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">StretchHeaderStyle</font>&#8221; <font color="#ff0000">TargetType</font>=&#8221;<font color="#b8860b">{x:Type GridViewColumnHeader}</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">Setter</font><font color="#ff0000"> Property</font>=&#8221;<font color="#0000ff">HorizontalContentAlignment</font>&#8221; <font color="#ff0000">Value</font>=&#8221;<font color="#0000ff">Stretch</font>&#8220;<font color="#0000ff">/&gt;<br />
&lt;/</font><font color="#800000">Style</font><font color="#0000ff">&gt;</font></p>
<p>And point to it in your ListView GridView with a :</p>
<p><font color="#ff0000">ColumnHeaderContainerStyle</font>=&#8221;<font color="#b8860b">{StaticResource StretchHeaderStyle}</font>&#8221;</p>
<p>At the end, your ListView should look like this:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">ListView</font> <font color="#ff0000">IsSynchonizedWithCurrentItem</font>=&#8221;<font color="#0000ff">True</font>&#8220;<font color="#0000ff">&gt;<br />
      &lt;</font><font color="#800000">ListView.View</font><font color="#0000ff">&gt;<br />
            &lt;</font><font color="#800000">GridView <font color="#ff0000">ColumnHeaderContainerStyle</font><font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource StretchHeaderStyle}</font><font color="#000000">&#8221; </font></font><font color="#0000ff">&gt;<br />
                  &lt;<font color="#800000">GridViewColumn <font color="#ff0000">Header<font color="#000000">=&#8221;</font><font color="#0000ff">Image</font><font color="#000000">&#8220;</font><br />
                        </font></font></font><font color="#0000ff"><font color="#800000"><font color="#ff0000">CellTemplate</font><font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource ImageTemplate}</font><font color="#000000">&#8221; </font></font><font color="#0000ff">&gt;<br />
                   &lt;<font color="#800000">GridViewColumn <font color="#ff0000">Header<font color="#000000">=&#8221;</font><font color="#0000ff">Image Information</font><font color="#000000">&#8220;</font> <br />
                        HeaderTemplate<font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource MultiColumnHeaderTemplate}</font><font color="#000000">&#8221;<br />
                        </font></font></font><font color="#0000ff"><font color="#800000"><font color="#ff0000">CellTemplate</font><font color="#000000">=&#8221;</font><font color="#b8860b">{StaticResource MultiColumnCellTemplate}</font><font color="#000000">&#8221; </font></font><font color="#0000ff">&gt;</font></font><font color="#0000ff"> <br />
            </font></font></font><font color="#0000ff">&lt;/</font><font color="#800000">GridView</font><font color="#0000ff">&gt;<br />
      </font><font color="#0000ff">&lt;<font color="#800000">ListView.View</font><font color="#0000ff">&gt;</font><br />
&lt;/</font><font color="#800000">ListView</font><font color="#0000ff">&gt;</font></p>
<p>And if you hate writing XAML, you notice with a grateful heart that I&#8217;ve posted every bit of XAML you need right here. Additionally (and this is a first for this site), because of the complexity of this post, I&#8217;m offering this project as a downloadable zip file so you can tweak it or futz with it at your convenience.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/listviewembeddedcolumns.zip" title="Embedded Columns Project Files">Embedded Columns Project Files</a> (in zip format&#8230; requires .Net 3.5)</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/25/embedded-listview-columns-columns-within-columns/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Embedded+ListView+Columns+%28Columns+Within+Columns%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D82" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Embedded+ListView+Columns+%28Columns+Within+Columns%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D82" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/25/embedded-listview-columns-columns-within-columns/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How do I style the ListView column gripper (also known as a &#8220;splitter&#8221; or a &#8220;seperator&#8221;)</title>
		<link>http://www.designersilverlight.com/2008/01/23/how-do-i-style-the-listview-column-gripper-also-known-as-a-splitter-or-a-seperator/</link>
		<comments>http://www.designersilverlight.com/2008/01/23/how-do-i-style-the-listview-column-gripper-also-known-as-a-splitter-or-a-seperator/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 19:15:18 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[column seperator]]></category>
		<category><![CDATA[column splitter]]></category>
		<category><![CDATA[GridColumnHeader]]></category>
		<category><![CDATA[gripper]]></category>
		<category><![CDATA[HeaderGripper]]></category>
		<category><![CDATA[PART_]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/23/how-do-i-style-the-listview-column-gripper-also-known-as-a-splitter-or-a-seperator/</guid>
		<description><![CDATA[I had a question from a reader in an earlier post on how to resize the ListView Gripper (seen below) so I wanted to address that in this quick post.  Styling the gripper is actually pretty easy. First, take a look at my Styling the ListView Column Header post. Follow that along until you get [...]]]></description>
			<content:encoded><![CDATA[<p>I had a question from a reader in an earlier post on how to resize the ListView Gripper (seen below) so I wanted to address that in this quick post.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/headergripperexample.png" alt="GripperExample" /></p>
<p> Styling the gripper is actually pretty easy. First, take a look at my <a href="http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/">Styling the ListView Column Header post</a>. Follow that along until you get to the template for the ColumnHeader (by the fifth image down).</p>
<p>You should have something that looks like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/columnheadertemplate.png" alt="Column_Header_Template" /></p>
<p>Now we&#8217;re going to ignore everything here except that little part at the bottom the &#8220;PART_HeaderGripper&#8221;</p>
<p><span id="more-75"></span></p>
<p>A point of note: Perhaps I&#8217;ll go over this more some day, but we&#8217;ll just mention it in passing:</p>
<p>Do NOT change the name of that thing.</p>
<p>When you see something in a template with the prefix &#8220;PART&#8221;… Well, <a href="http://notstatic.com/archives/48">Robby Ingebretsen talks about it here</a>:</p>
<blockquote><p>“PART_” is just a naming convention.  It means that the control expects an element with that name to exist in the template and will be looking for it.  Think of it as a way to flag that element as important and an indication that the name shouldn’t change. The control could be looking for that element for a variety of reasons.</p></blockquote>
<p>So this gripper is essential to the proper functionality of the column header.</p>
<p>But that doesn&#8217;t mean we can&#8217;t futz with it right?</p>
<p>The thing about the gripper is that its parent template (the GridViewColumnHeader template) holds all the triggers that control the IsMouseOver and IsPressed state. If you want to alter those, make sure that you either:</p>
<ul>
<li>Do it in the GridViewColumnHeader template (just change the triggers as they currently are)</li>
<li>Get rid of the triggers in the GridViewColumnHeader template so they don&#8217;t interfere with your own triggers.</li>
</ul>
<p>The difference of course is that if you use the second option, your gripper will only perform the triggers when the user is directly over the gripper itself while in the first option, the triggers will fire off when the user is over any part of the column header. The user design side of me loves the second option because it is a much clearer indication to the user that they are about to do something with the gripper itself.</p>
<p>Besides, when I decide to mess with the gripper, I&#8217;m usually doing a major overhaul of the thing. So lets go into the guts of the gripper by right clicking on the gripper in the Object and go to:</p>
<p><strong>Edit Control Parts (Template) -&gt; Edit Template</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/thumb_gripper_template_menu.png" alt="ThumbGripperMenu" /></p>
<p>The Gripper is a &#8220;Thumb&#8221; control. You can also see more examples of Thumb controls acting as the scrollbars in the ScrollViewer template. Unlike the ScrollViewer, this Thumb control is the most boring template you&#8217;ve ever seen… it&#8217;s Border with a Rectangle in it.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/listviewheadergripper.png" alt="ListViewHeaderGripper" /></p>
<p>But boring is good because we can go in and change everything we need really easily. The rectangle is the piece you can see and the border defines the clickable area. From here, you could make the gripper a smiley face if you wanted.</p>
<p>Such is the power of WPF…</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/23/how-do-i-style-the-listview-column-gripper-also-known-as-a-splitter-or-a-seperator/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+do+I+style+the+ListView+column+gripper+%28also+known+as+a+%E2%80%9Csplitter%E2%80%9D+or+a+%E2%80%9Cseperator%E2%80%9D%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D75" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=How+do+I+style+the+ListView+column+gripper+%28also+known+as+a+%E2%80%9Csplitter%E2%80%9D+or+a+%E2%80%9Cseperator%E2%80%9D%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D75" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/23/how-do-i-style-the-listview-column-gripper-also-known-as-a-splitter-or-a-seperator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Styling the ListView Column Header</title>
		<link>http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/</link>
		<comments>http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 06:37:12 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[column header]]></category>
		<category><![CDATA[columnheadercontainerstyle]]></category>
		<category><![CDATA[GridViewColumnHeader]]></category>
		<category><![CDATA[GridViewHeaderRowPresenter]]></category>
		<category><![CDATA[listview header]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/</guid>
		<description><![CDATA[ListView header Styling is one of the most difficult styling pieces I&#8217;ve had to deal with. Part of this is because it is just another part of the seemingly endlessly complex listview. The other part is just because of the way the styling for the listview is put together in WPF. In this post, we&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>ListView header Styling is one of the most difficult styling pieces I&#8217;ve had to deal with. Part of this is because it is just another part of the seemingly endlessly complex listview. The other part is just because of the way the styling for the listview is put together in WPF.</p>
<p>In this post, we&#8217;re going to change the default color of the header (background and foreground) and make the headers look more like bubbles. Why? Because we can! (Everytime I say that, somewhere a usability expert loses a little bit of their soul.)</p>
<p>Take note that anything done in this will affect the <em>whole header</em>. If you&#8217;re looking to do something to one individual column in the header, you need to go to this post on ColumnHeaders (coming soon). See the bottom of this post for more details.</p>
<p>As a point of note, the easy way in this particular case involves going directly into the XAML and the hard way involves going through the steps in Blend. The easy way is posted at the bottom.</p>
<p>Now for the hard way. First, go to your listview, right click on it and go to:</p>
<p><strong>Edit Control Parts (Template) -&gt; Edit a Copy&#8230;</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/1_controlparts.png" alt="1_ControlParts" /><br />
<span id="more-61"></span><br />
You&#8217;ll be given the basic template of your listview. Right-click on the scrollviewer and go to:</p>
<p><strong>Edit Control Parts (Template) -&gt; Edit Template</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/2_controltemplate2.png" alt="2_ControlTemplate" /></p>
<p>You&#8217;ll be given the default scrollViewer template for the specialized scrollViewer used in the ListView. In addition to the normal scrollviewer parts, it has a control that acts as the holder for the header called the &#8220;GridViewHeaderRowPresenter&#8221;. </p>
<p>Highlight the GridViewHeaderRowPresenter (which I am renaming &#8220;steve&#8221; so I don&#8217;t have to write that anymore) and, in the menu, go to:</p>
<p><strong>Object -&gt; Edit Other Styles -&gt; Edit ColumnHeaderContainerStyle -&gt; Edit a Copy…</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/3_columnheadercontainerstyle.png" alt="3_ColumnHeaderContainerStyle" /></p>
<p>This is where we are going to want to change the foreground and background.</p>
<p>Go over to the Properties panel to the right and click on foreground, giving it a solid color brush (I&#8217;m going to use a dark blue). Do the same thing with the background (light blue)and the BorderBrush (blue gradient) (you&#8217;ll see why in a moment).</p>
<p>Now my style looks like this in the XAML:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Style</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">CustomHeaderStyle</font>&#8221; <font color="#ff0000">TargetType</font>=&#8221;<font color="#cb860b">{x:Type GridViewColumnHeader}</font>&#8220;<font color="#0000ff">&gt;</font><br />
      <font color="#0000ff">&lt;</font><font color="#800000">Setter</font> <font color="#ff0000">Property</font>=&#8221;<font color="#0000ff">Background</font>&#8221; <font color="#ff0000">Value</font>=&#8221;<font color="#0000ff">#FFCDE7F4</font>&#8221; <font color="#0000ff">/&gt;</font><br />
      <font color="#0000ff">&lt;</font><font color="#800000">Setter</font> <font color="#ff0000">Property</font>=&#8221;<font color="#0000ff">Foreground</font>&#8221; <font color="#ff0000">Value</font>=&#8221;<font color="#0000ff">#FF07034B</font>&#8220;<font color="#0000ff">/&gt;</font><br />
      <font color="#0000ff">&lt;</font><font color="#800000">Setter</font> <font color="#ff0000">Property</font>=&#8221;<font color="#0000ff">BorderBrush</font>&#8220;<font color="#0000ff">&gt;</font><br />
            <font color="#0000ff">&lt;</font><font color="#800000">Setter.Value</font>&gt;<br />
                  <font color="#0000ff">&lt;</font><font color="#800000">LinearGradientBrush</font> <font color="#ff0000">EndPoint</font>=&#8221;<font color="#0000ff">0.5,1</font>&#8221; <font color="#ff0000">StartPoint</font>=&#8221;<font color="#0000ff">0.5,0</font>&#8220;<font color="#0000ff">&gt;</font><br />
                        <font color="#0000ff">&lt;</font><font color="#800000">GradientStop</font> <font color="#ff0000">Color</font>=&#8221;<font color="#0000ff">#FFA1CCE0</font>&#8221; <font color="#ff0000">Offset</font>=&#8221;<font color="#0000ff">0</font>&#8220;<font color="#0000ff">/&gt;</font><br />
                        <font color="#0000ff">&lt;</font><font color="#800000">GradientStop</font> <font color="#ff0000">Color</font>=&#8221;<font color="#0000ff">#FFABD5EA</font>&#8221; <font color="#ff0000">Offset</font>=&#8221;<font color="#0000ff">1.0</font>&#8220;<font color="#0000ff">/&gt;</font><br />
                  <font color="#0000ff">&lt;/</font><font color="#800000">LinearGradientBrush</font><font color="#0000ff">&gt;</font><br />
            <font color="#0000ff">&lt;/</font><font color="#800000">Setter.Value</font><font color="#0000ff">&gt;</font><br />
         <font color="#0000ff">&lt;/</font><font color="#800000">Setter</font><font color="#0000ff">&gt;<br />
   &lt;<font color="#800000">Sette</font><font color="#800000">r</font> <font color="#ff0000">Property</font><font color="#000000">=&#8221;</font>Template<font color="#000000">&#8220;</font>&gt;<br />
      &#8230;<br />
&lt;/<font color="#800000">Style</font>&gt;</font></p>
<p> and my column headers look like this in the composition (zoomed in to 200%):</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/4_zoomedincolumnpic.png" alt="4_ZoomedInColumnPic" /></p>
<p>But wait&#8230; there&#8217;s more. Right click on your ColumnHeaderContainerStyle in the Objects and Timeline panel and select:</p>
<p><strong>Edit Control Parts (Template) -&gt; Edit Template…</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/5_edittemplate.png" alt="5_EditTemplate" /></p>
<p>Finally, we are in the real guts of the header template, which means we have all the bits and pieces to make it work.</p>
<p>Note: I&#8217;ve recently had a comment on how to style the header gripper (the part of the column header that allows you to resize the column), but this post is already getting way too long, so I deal with it in this post over here (coming soon).</p>
<p>OK, so now we can really get at the look of this sucker. If you&#8217;re using Vista, you probably have some Borders with names like &#8220;UpperHighlight&#8221;, &#8220;HeaderHoverBorder&#8221;, and &#8220;HeaderPressBorder&#8221;. These are borders that alter the look of the headers when certain triggers are active. We&#8217;ll be ignoring them for the sake of simplicity.</p>
<p>(At this point, my readers are saying to themselves, &#8220;Simplicity? SIMPLICITY? At what juncture in this entire post have we even approached simplicity.&#8221; To which I reply &#8220;Hey, don&#8217;t kill the messenger.&#8221;)</p>
<p>So go to the highest border (in my case, it&#8217;s called the &#8220;HeaderBorder&#8221;) and do the following:</p>
<ul>
<li><font color="#ff0000">BorderThickness</font>=&#8221;<font color="#0000ff">1,1,1,1</font>&#8220;</li>
<li><font color="#ff0000">CornerRadius</font>= &#8220;<font color="#0000ff">6,6,6,6</font>&#8220;</li>
<li><font color="#ff0000">Margin</font>=&#8221;<font color="#0000ff">2,0,2,0</font>&#8220;</li>
</ul>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/6_borderthicknesscorner.png" alt="6_BorderThicknessCorner" /><br />
<img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/7_margins.png" alt="7_Margins" /></p>
<p>The header now looks like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/8_headerview2.png" alt="8_HeaderView2" /></p>
<p>This is the hard way because it uses Blend exclusively without touching the XAML.</p>
<h2>The Easy Way</h2>
<p>The easy way is also the better way from a XAML perspective. Simply create a  create a Style like so:</p>
<p> <font color="#0000ff">&lt;</font><font color="#800000">Style</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">CustomHeaderStyle</font>&#8221; <font color="#ff0000">TargetType</font>=&#8221;<font color="#cb860b">{x:Type GridViewColumnHeader}</font>&#8220;<font color="#0000ff">&gt;</font><br />
&lt;/Style&gt;</p>
<p>and add it to your ListView like this:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">ListView</font><font color="#0000ff">&gt;</font><br />
      <font color="#0000ff">&lt;</font><font color="#800000">ListView.View</font><font color="#0000ff">&gt;<br />
</font>            <font color="#0000ff">&lt;</font><font color="#800000">GridView</font> <font color="#ff0000">ColumnHeaderContainerStyle</font>=&#8221;<font color="#cb860b">{DynamicResource CustomHeaderStyle}</font>&#8220;<font color="#0000ff">&gt;</font><br />
            &#8230;.</p>
<p>Access it though your resources tab to get to the visual designer interface for your new style:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/11_resourcesscreen.png" alt="11_resourcesScreen" /></p>
<p>Once you&#8217;ve done this, you can skip directly to the part of the tutorial where you start changing the foreground and background.</p>
<p>Hopefully, at this point you feel like you have a pretty decent handle on the basics of styling your header section. Because it&#8217;s getting really late and I&#8217;m getting really tired.</p>
<p>But before I go, let&#8217;s get one thing absolutely clear: When it comes to ListView headers, you can technically do most of this in the data template, but if you do, you&#8217;ll make baby Jesus cry.</p>
<p>Here is why. By doing things as we have done them above, we get the following:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/9_headerview3.png" alt="9_HeaderView3" /></p>
<p>If we do all this work in the data template, we instead get this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/10_headerview4.png" alt="10_HeaderView4" /></p>
<p>Which brings about the aforementioned consequences. You&#8217;ve been warned.</p>
<p>Questions about column headers:</p>
<ul>
<li><a href="http://www.designersilverlight.com/2008/02/02/how-do-i-wrap-text-in-a-listview-header/">How do I wrap text in a header?</a></li>
<li>How do I make headers sort columns (and how do I style for that)? (coming soon)</li>
<li>How do I make one header look different than the other headers? (coming soon)</li>
</ul>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Styling+the+ListView+Column+Header+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D61" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Styling+the+ListView+Column+Header+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D61" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/16/styling-the-listview-column-header/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Styling ListView Items Using Blend</title>
		<link>http://www.designersilverlight.com/2008/01/15/styling-listview-items-using-blend/</link>
		<comments>http://www.designersilverlight.com/2008/01/15/styling-listview-items-using-blend/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 06:17:13 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Blend]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[listview]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[itemcontainerstyle]]></category>
		<category><![CDATA[items]]></category>
		<category><![CDATA[listviewitem template]]></category>
		<category><![CDATA[styles]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/15/styling-listview-items-using-blend/</guid>
		<description><![CDATA[So&#8230; you&#8217;ve got your listview and you want your items to look a certain way. In this post, we&#8217;ll look at changing as many things as we can inside the ListView ItemContainerStyle.  First things first&#8230; getting to the ItemContainerStyle using Blend. With the ListView selected, go to the top menu and click:  Edit Other Styles -&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>So&#8230; you&#8217;ve got your listview and you want your items to look a certain way. In this post, we&#8217;ll look at changing as many things as we can inside the ListView ItemContainerStyle.</p>
<p> First things first&#8230; getting to the ItemContainerStyle using Blend. With the ListView selected, go to the top menu and click:</p>
<p> <strong>Edit Other Styles -&gt; Edit ItemContainerStyle -&gt; Create Empty&#8230;</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/itemcontainerstylemenu.png" alt="ItemContainerStyleMenu" /></p>
<p>Name your Style and you get tossed into Style editing. Here, you can do all sorts of great things, like&#8230; um&#8230; changing the background or something.</p>
<p><span id="more-47"></span></p>
<p> OK, I&#8217;ll fess up, I&#8217;ve found the ItemContainerStyle to be good for the following things (and not too much else):</p>
<ul>
<li>Giving your items a nice border.</li>
<li>Changing up and down margins (how far apart your  items are from one another)</li>
<li>Changing the HorizontalContentAlignment (<a href="http://www.designersilverlight.com/2007/12/17/how-do-i-center-something-in-my-listview-column/">like in this post on centering items in a column</a>)</li>
<li>Changing the VerticalContentAlignment (if you have a thick item, you can get your data to align to the top or center or whatever)</li>
</ul>
<p>However, in order to get to the real fun stuff with ListView items, we want to go into the ItemContainerStyle template. So right-click on the &#8220;ItemContainerStyle&#8221; in your &#8220;Objects and Timeline&#8221; panel and go to:</p>
<p><strong>Edit Control Parts (Template) -&gt; Edit a Copy&#8230;</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/itemcontainerstyletemplate.png" alt="ItemContainerStyleTemplate" /></p>
<p>And now you have a copy of your default ListViewItemTemplate. If you want a good example of how a lookless control is constructed, head here. You&#8217;ll see how they use split grids and transparent gradients to get a look that maintains it&#8217;s feel even when the base background is changed. I&#8217;m working inside Vista, so this is what the visual tree of my ListViewItemTemplate looks like:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/listviewitemtemplatetree.png" alt="ListViewTemplateTree" /></p>
<p>But if you&#8217;re like me, what is interesting about this particular template is not the visual tree&#8230; it is the triggers that the template hands to you. Lets look at these triggers one by one.</p>
<p>(If you don&#8217;t know where the triggers are, they&#8217;re above the Objects and Timeline pane and they look like this:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/listviewitemtemplateevents.png" alt="ItemEvents" /></p>
<p>Clicking on a trigger will give you a preview of what that trigger looks like and will also allow you to change the properties of anything inside the template that will implement when the trigger is active.</p>
<p>You <em>can</em> put these same triggers into your ItemContainerStyle and, as a general rule, I would recommend it. As a general rule, I would recommend putting as much into the style and staying out of the template for the sake of simplicity. However, the style does have some pretty significant limitations, especially in this case. So, for the meantime, we&#8217;re just going to futz with it as it has been given to us.)</p>
<p><strong>IsMouseOver = True</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/ismouseover.png" alt="IsMouseOver_ListViewItem" /></p>
<p>Kind of obvious what this does.</p>
<p><strong>IsSelected = True</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/isselected.png" alt="IsSelected_ListView" /></p>
<p>Again, kind of self-explanitory. When an item is selected, this is what you get.</p>
<p><strong>IsSelected = True and IsSelectionActive = False</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/isselected_isselectionactive.png" alt="IsSelected_IsSelectionActive" /></p>
<p>This is the default state of the first item in your listview before you&#8217;ve done anything to it. I have to admit, it took me quite some time to figure that out. The designers I was working with thought this style would confuse users and so we got rid of it. If you want to get rid of it, just delete this trigger and you&#8217;re golden.</p>
<p><strong>IsSelected = True and IsMouseOver = True</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/isselected_ismouseover.png" alt="IsSelected_IsMouseOver_ListView" /></p>
<p>In this example, it is subltly different than the IsMouseOver alone, but you can see the difference.</p>
<p><strong>IsEnabled = False</strong></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/isenabled.png" alt="IsEnabled" /></p>
<p>I vaugely recall working on a project in which I tried to get individual items to unenable and I vaugely recall it not working very well. It could be because I was trying to do it in XAML, but the example you&#8217;re seeing here is when the entire ListView has IsEnabled set to &#8220;False&#8221;</p>
<p>A couple of suggestion for getting a good feel of the ItemContainerStyle triggers:</p>
<ul>
<li>change the background when the user selects an item</li>
<li>change the height when the user selects AND mouses over an item.</li>
<li>change the visibility to &#8220;Collapsed&#8221; when the user mouses over an item. (This one is sure to make your users roll on the floor with laughter&#8230; shortly before they come after you with torch and pitchfork in hand.)</li>
</ul>
<p>All of these triggers are property triggers, so they are not (as they stand) suitible for triggering any animations. If you&#8217;re interested in seeing animations in your ListView items, check out this post (coming soon).</p>
<p>If you&#8217;re more interested in what you can do with triggers, check out this post (coming soon).</p>
<p>If you&#8217;d like to have that nifty &#8220;every-other-item-is-gray&#8221; thing going on, <a href="http://www.beacosta.com/blog/?cat=9">here&#8217;s a post for you </a>while I try to whip up something of my own.</p>
<p>Please sound off with any more comments if you have additional questions.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/15/styling-listview-items-using-blend/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Styling+ListView+Items+Using+Blend+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D47" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Styling+ListView+Items+Using+Blend+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D47" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/15/styling-listview-items-using-blend/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

