<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Okoboji: a lake, a mythical university, Kevin Moore's blog : Longhorn</title><link>http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx</link><description>Tags: Longhorn</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Robby and Me on Channel 9</title><link>http://blogs.msdn.com/okoboji/archive/2006/02/19/535242.aspx</link><pubDate>Mon, 20 Feb 2006 06:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:535242</guid><dc:creator>okoboji</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/535242.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=535242</wfw:commentRss><description>&lt;P&gt;We're not nearly as &lt;A href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20051215WinFXCA/manifest.xml"&gt;entertaining&lt;/A&gt; as &lt;A href="http://pluralsight.com/blogs/dbox/"&gt;Don&lt;/A&gt; and &lt;A href="http://simplegeek.com/"&gt;Chris&lt;/A&gt;, but &lt;A href="http://notstatic.com/"&gt;Robby&lt;/A&gt; and I are in &lt;A href="http://channel9.msdn.com/Showpost.aspx?postid=163511"&gt;another video&lt;/A&gt; on &lt;A href="http://channel9.msdn.com/"&gt;Channel 9&lt;/A&gt; (our last one was on &lt;A HREF="/okoboji/archive/2006/02/02/523681.aspx"&gt;MSDN TV&lt;/A&gt;). This time we talk about our experiences with Windows programming, the web and the power/flexibility/extensibility of WPF. It was a fun conversation.&lt;/P&gt;
&lt;P&gt;Robby is giving a talk at &lt;A href="http://mix06.com/"&gt;MIX&lt;/A&gt; this year. His &lt;A href="http://microsoft.sitestream.com/PDC05/PRS/PRS317.zip"&gt;PDC talk&lt;/A&gt; [ZIP, 144MB] was amazing. (Only Robby could weave vegetable peelers and the power of design.) &lt;A href="http://mix06.com/Register.aspx"&gt;Sign up for Mix&lt;/A&gt; while you can!&lt;/P&gt;
&lt;P&gt;In the video we talk about &lt;A href="http://csszengarden.com/"&gt;CSS Zen Garden&lt;/A&gt; and a couple of panels I've written: &lt;A HREF="/okoboji/archive/2005/09/15/463500.aspx"&gt;TreeMapPanel&lt;/A&gt; (haven't tested it on the Jan CTP) and &lt;A HREF="/okoboji/archive/2005/11/18/494559.aspx"&gt;Animating Tile Panel&lt;/A&gt; (the latest update is in my &lt;A HREF="/okoboji/archive/2006/01/19/515081.aspx"&gt;Bag-O-Tricks&lt;/A&gt;).&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=535242" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Avalon/default.aspx">Avalon</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/WinFX/default.aspx">WinFX</category></item><item><title>In other news...</title><link>http://blogs.msdn.com/okoboji/archive/2006/02/16/533057.aspx</link><pubDate>Thu, 16 Feb 2006 11:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:533057</guid><dc:creator>okoboji</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/533057.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=533057</wfw:commentRss><description>&lt;p&gt;Our friends from &lt;a href="http://www.microsoft.com/max/"&gt;Max&lt;/a&gt; have been 
busy.&lt;/p&gt;
&lt;p&gt;Not only are they cranking away at a beautiful WinFX app, but they're taking 
time to blog about their adventures.&lt;/p&gt;
&lt;p&gt;&lt;a HREF="/bencon/"&gt;Ben&lt;/a&gt; has blogged about IScrollInfo 
[&lt;a HREF="/bencon/archive/2006/01/05/509991.aspx"&gt;Part 1&lt;/a&gt;,
&lt;a HREF="/bencon/archive/2006/01/06/510355.aspx"&gt;Part 2&lt;/a&gt;,
&lt;a HREF="/bencon/archive/2006/01/07/510530.aspx"&gt;Part 3&lt;/a&gt;]. 
If you are making your own panel and want a ScrollViewer to party over it, start 
here.&lt;/p&gt;
&lt;p&gt;&lt;a HREF="/dancre/"&gt;Dan&lt;/a&gt; is blogging about creating a 
virtualized panel (for putting lots of data in a list). [&lt;a HREF="/dancre/archive/2006/02/06/526310.aspx"&gt;Part 
1&lt;/a&gt;, &lt;a HREF="/dancre/archive/2006/02/13/531550.aspx"&gt;
Part 2&lt;/a&gt;,
&lt;a HREF="/dancre/archive/2006/02/14/532333.aspx"&gt;Part 3&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;If you haven't heard,
&lt;a href="http://www.microsoft.com/windows/ie/ie7/default.mspx"&gt;IE7 is beautiful&lt;/a&gt;. One of my
&lt;a HREF="/okoboji/archive/2003/10/15/54532.aspx"&gt;first blog 
posts&lt;/a&gt; was about Mozilla 1.5. About the same time the IE team was getting 
rolling again. They have done some amazing work.
&lt;a href="http://www.microsoft.com/windows/ie/ie7/ie7betaredirect.mspx"&gt;Check it 
out&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Today &lt;a href="http://www.beacosta.com/"&gt;Bea&lt;/a&gt;,
&lt;a HREF="/namitag/"&gt;Namita&lt;/a&gt;, and I met with some folks 
from the &lt;a HREF="/vbteam/default.aspx"&gt;VB team&lt;/a&gt; to chat 
about integrating their
&lt;a HREF="/vbteam/archive/2006/01/23/VB_LINQ_CTP_Now_live_on_MSDN.aspx"&gt;
new language features&lt;/a&gt; with WPF data binding. Wow! I know there are some C# 
guys out there laughing at VB. Guys and gals:
&lt;a href="http://msdn.microsoft.com/vbasic/future/"&gt;download the demo&lt;/a&gt;. You 
may soon forget your love of semicolons. Mmm...XML inline with code...*drool*. 
(Oh, and check out Bea's post on doing
&lt;a href="http://www.beacosta.com/2006/02/how-can-i-do-custom-grouping.html"&gt;
grouping with ItemsControl&lt;/a&gt;. Very cool.)&lt;/p&gt;
&lt;p&gt;Have you been reading about 
&lt;a href="http://msdn.microsoft.com/windowsvista/building/infocard/default.aspx"&gt;
InfoCard&lt;/a&gt;? You should be. &lt;a href="http://www.identityblog.com/"&gt;Kim&lt;/a&gt; is 
your man. Check out &lt;a href="http://www.identityblog.com/"&gt;his blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On a personal note, I've been having fun updating the
&lt;a HREF="/okoboji/archive/2006/01/19/515081.aspx"&gt;
Bag-O-Tricks&lt;/a&gt; for our next public release. I stayed up late on Valentines Day 
hacking away as a Valentines gift to you, my loyal readers. I've added some new 
things that I've been asked about. I've also put all of the controls in an 
external library which includes default styles. This is for control authors that 
want to ship a control with its template in a single library.&lt;/p&gt;
&lt;p&gt;Also, the team that built the WPF ListView has a bunch of samples that they 
should be posting very soon. People have been asking about a TreeView with 
columns. Let's just say the power of WPF composition will blow you away.&lt;/p&gt;
&lt;p&gt;Stay tuned.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=533057" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Random/default.aspx">Random</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Avalon/default.aspx">Avalon</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/WPF/default.aspx">WPF</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/WinFX/default.aspx">WinFX</category></item><item><title>Avalon Simple Tree View, Part 2</title><link>http://blogs.msdn.com/okoboji/archive/2005/04/01/avalon-simple-tree-view-part-2.aspx</link><pubDate>Sat, 02 Apr 2005 05:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404844</guid><dc:creator>okoboji</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/404844.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=404844</wfw:commentRss><description>
&lt;p&gt;In my &lt;a href="http://blogs.msdn.com/okoboji/archive/2005/03/31/404288.aspx" mce_href="http://blogs.msdn.com/okoboji/archive/2005/03/31/404288.aspx"&gt;last post&lt;/a&gt;, I walked through creating a simple hierarchy using styles. Now, let's bring it to life. We want to add expand/collapse to our TreeViewItem (HeaderedItemsControl), but IsExpanded is not a property on HIC. We need to add one.&lt;/p&gt;
 
&lt;p&gt;Let's go into the Window1.xaml.cs file and add two classes as peers to Window1. TreeView, which inherits from ItemsControl and TreeViewItem, which inherits from HeaderedItemsControl.&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt; &lt;span style="color: blue;"&gt;partial&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: teal;"&gt;Window1&lt;/span&gt; : &lt;span style="color: teal;"&gt;Window { ... &lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: teal;"&gt;TreeView&lt;/span&gt; : &lt;span style="color: teal;"&gt;ItemsControl&lt;/span&gt; { }&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: teal;"&gt;TreeViewItem&lt;/span&gt; : &lt;span style="color: teal;"&gt;HeaderedItemsControl&lt;br&gt;&lt;/span&gt;{&lt;br&gt;&lt;br&gt;}&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;Now things get fun. To enable expand/collapse we need to add a property to TreeViewItem...but not just a regular CLR property. To enable data binding and animation in Avalon, we need to create a DependencyProperty (DP). DPs are public, static, readonly. All DPs should follow the naming pattern [Property Name]Property. You register it with DependencyProperty.Register (clever, huh?). The first parameter is the name of the DP, in this case "IsExpanded". The second parameter is the type of the property, bool. The third is the owning class, TreeViewItem. And the fourth is FrameworkPropertyMetadata. The simplest override for this class just takes the default value of the property. In this case it's false.&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: teal;"&gt;TreeViewItem&lt;/span&gt; : &lt;span style="color: teal;"&gt;HeaderedItemsControl&lt;br&gt;&lt;/span&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; &lt;span style="color: teal;"&gt;DependencyProperty&lt;/span&gt; IsExpandedProperty =&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: teal;"&gt;DependencyProperty&lt;/span&gt;.Register(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: maroon;"&gt;"IsExpanded"&lt;/span&gt;, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue;"&gt;bool&lt;/span&gt;),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: teal;"&gt;TreeViewItem&lt;/span&gt;),&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: teal;"&gt;FrameworkPropertyMetadata&lt;/span&gt;(&lt;span style="color: blue;"&gt;false&lt;/span&gt;));&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; IsExpanded&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; (&lt;span style="color: blue;"&gt;bool&lt;/span&gt;)GetValue(&lt;span style="color: teal;"&gt;TreeViewItem&lt;/span&gt;.IsExpandedProperty); }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { SetValue(&lt;span style="color: teal;"&gt;TreeViewItem&lt;/span&gt;.IsExpandedProperty, &lt;span style="color: blue;"&gt;value&lt;/span&gt;); }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;Notice that we also create a regular CLR property for IsExpanded. While strictly speaking this is not required for XAML, it's a good idea for people who will use this control from code. Since the property engine in Avalon stores the value for us, we need to call a couple of functions to set/get the value.&lt;/p&gt;
 
&lt;p&gt;Now back to the XAML.&lt;/p&gt;
 
&lt;p&gt;We want to refer to our classes in XAML, but they are not part of the default control set in Avalon. We need to add an XML mapping and an associated XML namespace. The mapping goes at the top of the file. Notice it refers to the CLR namespace of the project "AvalonApplication1". We also define the XML namespace to map to, in this case "app". We also need to define another mapping that we will use in our controls. This goes in the Window element.&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Mapping&lt;/span&gt;&lt;span style="font-size: 10pt; color: gray; font-family: Courier New;"&gt; XmlNamespace="app" ClrNamespace="AvalonApplication1" &lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;?&amp;gt;&lt;br&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Window&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;x:Class&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;="AvalonApplication1.Window1&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;xmlns&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;a href="http://schemas.microsoft.com/winfx/avalon/2005" mce_href="http://schemas.microsoft.com/winfx/avalon/2005"&gt;&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/winfx/avalon/2005&lt;/span&gt;&lt;/a&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;xmlns:x&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;a href="http://schemas.microsoft.com/winfx/xaml/2005" mce_href="http://schemas.microsoft.com/winfx/xaml/2005"&gt;&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/winfx/xaml/2005&lt;/span&gt;&lt;/a&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Text&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;TreeView&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;xmlns:tv&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;app&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;Now we can refer to our new controls with the tv: prefix. Let's change our &lt;font face="Courier New"&gt;ItemsControl&lt;/font&gt; to &lt;font face="Courier New"&gt;tv:TreeView&lt;/font&gt; and our &lt;font face="Courier New"&gt;HeaderedItemsControl&lt;/font&gt;s to &lt;font face="Courier New"&gt;tv:TreeViewItem&lt;/font&gt;. Make sure to change the references in the styles, too.&lt;/p&gt;
 
&lt;p&gt;What's our game plan? We'd like to expand/collapse the child nodes based upon the IsExpanded property. We'd like to bind the IsExpanded property to the IsChecked property of the CheckBox. We'd also like to show/hide the checkbox based upon the existence of children.&lt;/p&gt;
 
&lt;p&gt;Starting with the CheckBox. First we bind the IsChecked property of the CheckBox to the IsExpanded property of the StyledParent. (The StyledParent in this case is the TreeViewItem.) Next we set the Visibility to Hidden.&amp;nbsp; Finally we give the CheckBox a StyleID so we can change the Visibility from a trigger.&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;CheckBox&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Grid.Column&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Row&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;IsChecked&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; = &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;*Bind(Path=IsExpanded;RelativeSource=/StyledParent)&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Visibility&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Hidden&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;x:StyleID&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;ChildrenToggle&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;The StackPanel is similar: Set the Visibility and give it a StyleID. Notice that we use Collapsed for the Visibility. This tells layout to not only not draw it, but also to not give it any space. Make sense?&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;StackPanel&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Grid.Column&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Row&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;IsItemsHost&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;br&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Visibility&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Collapsed&lt;/span&gt;"&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;x:StyleID&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;ExpandSite&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;Add a VisualTriggers section to the Style element. Our first PropertyTrigger will control the visibility of the CheckBox. TreeViewItem is an HeaderedItemsControl. HeaderedItemsControl has a bool property HasItems. We want to change the Visibility of ChildrenToggle (our CheckBox) to Visible when HasItems = True. Similarly, we want to make ExpandSite (our StackPanel with the child elements) visible when IsExpanded (our sole new property) is true.&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Style.VisualTriggers&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;PropertyTrigger&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Property&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;HasItems&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Set&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;PropertyPath&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Visibility&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Visible&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Target&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ChildrenToggle&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;PropertyTrigger&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;PropertyTrigger&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Property&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;IsExpanded&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Set&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;PropertyPath&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Visibility&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Visible&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Target&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;ExpandSite&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;PropertyTrigger&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;Style.VisualTriggers&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p&gt;The effect is pretty cool. DataBinding pushes the value from the CheckBox to our new DependencyProperty. The DP pushes it's value to the ExpandSite and we have a functioning control.&lt;/p&gt;
 
&lt;p&gt;Just to show that the added property can be set in XAML, I've set IsExpanded="True" on a couple of the TreeViewItems. &lt;i&gt;Update: earlier I said that creating a CLR property for the new DP was not strictly required. Actually, if you want to be able to set the property in markup, you have to create a standard get/set. FYI.&lt;/i&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeView&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Width&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;200&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Height&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;200&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Iowa&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Okoboji&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Milford&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Des Moines&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Washington&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;IsExpanded&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Seattle&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;IsExpanded&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Brasa&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;HaNa&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Mama's&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;Redmond&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: Courier New;"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Courier New;"&gt;"&lt;span style="color: blue;"&gt;California&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeViewItem&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;br&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: Courier New;"&gt;tv:TreeView&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Courier New;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=404844" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Avalon/default.aspx">Avalon</category></item><item><title>Avalon March CTP: Creating a simple TreeView</title><link>http://blogs.msdn.com/okoboji/archive/2005/03/31/avalon-march-ctp-creating-a-simple-treeview.aspx</link><pubDate>Thu, 31 Mar 2005 22:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404288</guid><dc:creator>okoboji</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/404288.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=404288</wfw:commentRss><description>
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;I’m going to walk through creating a simple TreeView with the March CTP of Avalon.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;First, the tools you need.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;1) &lt;a href="http://lab.msdn.microsoft.com/express/vcsharp/default.aspx" mce_href="http://lab.msdn.microsoft.com/express/vcsharp/default.aspx"&gt;Visual C# Express&lt;/a&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;2) &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=85ab132b-f1aa-4422-b053-272d79863013&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=85ab132b-f1aa-4422-b053-272d79863013&amp;amp;displaylang=en"&gt;Avalon and Indigo Community Technology Preview - March 2005&lt;/a&gt; (In a &lt;a href="http://blogs.msdn.com/okoboji/archive/2005/03/25/402359.aspx" mce_href="http://blogs.msdn.com/okoboji/archive/2005/03/25/402359.aspx"&gt;previous post&lt;/a&gt;, I’ve discussed how to crack the ISO.)&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;Let’s get started&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;First, create a new Avalon Application project in Visual C# Express. Open up the Window1.xaml file. You should see this:&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Window&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;x:Class&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;AvalonApplication1.Window1&lt;/span&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;xmlns&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/winfx/avalon/2005&lt;/span&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;xmlns:x&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;http://schemas.microsoft.com/winfx/xaml/2005&lt;/span&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Text&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;AvalonApplication1&lt;/span&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Window&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;The nice thing about TreeView: most of the object model one needs to build it already exists in shipping controls. The TreeView itself is just a collection of TreeViewItems. ItemsControl fits the bill here. Each TreeViewItem is just a header with a set of children, HeaderedItemsControl does the job.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;Let’s start by laying out the controls. We’ll worry about how they look later.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Width&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;200&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Height&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;200&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;st1:state w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;span style="color: blue;"&gt;Iowa&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:state&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;Okoboji&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;span style="color: blue;"&gt;Milford&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:city&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;st1:city w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;span style="color: blue;"&gt;Des Moines&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:city&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;st1:state w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;span style="color: blue;"&gt;Washington&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:state&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Header&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;st1:state w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;span style="color: blue;"&gt;California&lt;/span&gt;&lt;/st1:place&gt;&lt;/st1:state&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;You can run the application now, but it won’t be very exciting. By default, ItemsControl and HeaderedItemsControl don’t have styles. We have to provide them.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;First, we add a &lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid.Resources&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt; &lt;/span&gt;to the grid. Now we want to add a style for the ItemsControl. Let’s start with the inner elements and work out. We want the items to show up in a stack, top to bottom. We have a StackPanel that does just that. Setting the IsItemsHost property to true tells the ItemsControl to put its children in this StackPanel. We wrap the StackPanel in a ScrollViewer to get scroll bars. We wrap in ScrollViewer in a Border to make it all look pretty. Adding a LinearGradientBrush to the Border.Background is a great start.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;Here’s the markup:&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid.Resources&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style.VisualTree&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Border&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Border.Background&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;LinearGradientBrush&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;StartPoint&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;0,0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;EndPoint&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1,1&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;LinearGradientBrush.GradientStops&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;GradientStop&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Color&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;White&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Offset&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;GradientStop&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Color&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;LightGray&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Offset&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;LinearGradientBrush.GradientStops&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;LinearGradientBrush&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Border.Background&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ScrollViewer&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;StackPanel&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;IsItemsHost&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ScrollViewer&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Border&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style.VisualTree&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid.Resources&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;Simple, huh?&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;We need one more style for the TreeView Items. We add another Style element. Just like for the ItemsControl, we add HeaderedItemsControl as the first element, telling the compiler this is the style for HeaderedItemsControls. The layout for the TreeViewItem is interesting. To get the tree shape, we use a 2-by-2 grid. The expand/collapse button goes in 0,0. We’ll use a checkbox for now. The Header content goes in 1,0. We use a ContentPresenter with the ContentSource property defined to grab the header content. The StackPanel with all of the items goes in 1,1. Again we use the IsItemsHost property to grab the sub-items.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;Here’s the code:&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid.Resources&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;HeaderedItemsControl&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style.VisualTree&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Width&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;Auto&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Width&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;*&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Height&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;Auto&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;RowDefinition&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Height&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;*&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;CheckBox&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Grid.Column&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Row&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;ContentPresenter&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;ContentSource&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;Header&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Row&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;0&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;StackPanel&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;Grid.Column&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;Grid.Row&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New';"&gt;IsItemsHost&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New';"&gt;"&lt;span style="color: blue;"&gt;True&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Grid&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style.VisualTree&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: maroon; font-family: 'Courier New';"&gt;Style&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New';"&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;That’s it.&lt;/p&gt;

&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;What about supporting collapse/expand? What about styling the checkbox? Stay tuned.&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&amp;nbsp;&lt;/p&gt;
 
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;When will Avalon include a TreeView? Also, stay tuned. While I can't make promises, getting TreeView in our control library is one of my review goals. :-)&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=404288" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Avalon/default.aspx">Avalon</category></item><item><title>London Avalon Enthusiasts Dinner</title><link>http://blogs.msdn.com/okoboji/archive/2005/02/01/365234.aspx</link><pubDate>Wed, 02 Feb 2005 07:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:365234</guid><dc:creator>okoboji</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/365234.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=365234</wfw:commentRss><description>Do you live in or around London?&lt;br /&gt; Are you interested in Avalon?&lt;br /&gt; Have you been playing with the November CTP?&lt;br /&gt; Would you like to meet a Program Manager on the Avalon team? Ask questions, give feedback, make suggestions?&lt;br /&gt; &lt;br /&gt; I’m going to be doing some travel (for pleasure) in Europe the end of this month. I’m in London a single night before I fly back to the States and I thought it would be great to meet Avalon enthusiasts (and aspiring enthusiasts) for dinner in London on Monday, 28 February. I’m thinking a bit late in the evening: perhaps 7 or 8pm.&lt;br /&gt; &lt;br /&gt; If you are interested, please use the &lt;A href="http://blogs.msdn.com/okoboji/contact.aspx"&gt;contact link&lt;/a&gt; to let me know you are interested (make sure to include your email address).&lt;br /&gt; &lt;br /&gt; If you can recommend a good restaurant or pub that is centrally located that would be great.&lt;br /&gt; &lt;br /&gt; I will make a list of people and send out details next week.&lt;br /&gt; &lt;br /&gt; I’m excited to meet you and hear your feedback.&lt;br /&gt; &lt;br /&gt; Cheers. &lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=365234" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category></item><item><title>Coolest Channel 9 video I've ever seen...</title><link>http://blogs.msdn.com/okoboji/archive/2004/11/03/251781.aspx</link><pubDate>Wed, 03 Nov 2004 17:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:251781</guid><dc:creator>okoboji</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/251781.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=251781</wfw:commentRss><description>...but I really like the command prompt.&lt;br /&gt; &lt;br /&gt; There have been &lt;a href="http://www.google.com/search?q=monad+site%3Ablogs.msdn.com"&gt;a lot of posts&lt;/a&gt; about Monad on MSDN Blogs. Take a look at the demo on Channel 9.&lt;br /&gt; &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=25915"&gt;&lt;br /&gt; http://channel9.msdn.com/ShowPost.aspx?PostID=25915&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; Very cool.&lt;br /&gt; &lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=251781" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category></item><item><title>“I lost my girlfriend’s phone number.”</title><link>http://blogs.msdn.com/okoboji/archive/2004/05/29/144467.aspx</link><pubDate>Sat, 29 May 2004 21:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144467</guid><dc:creator>okoboji</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/144467.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=144467</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Never underestimate the value of a catchy title. This entry is about Longhorn, though&amp;#8212;specifically the work we are doing in People and Groups to bridge contact lists--not only between application, but between devices.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;My good friend &lt;A href="http://blogs.msdn.com/jepling"&gt;Jeremy&lt;/A&gt;, a PM on the IE team, came into my office on Thursday asking if I&amp;#8217;ve seen his phone. He couldn&amp;#8217;t find it. The funny part: he had no way to get a hold of his girlfriend. The only place he had her number was on his phone. Ironically, I had a related conversation the day before. I was eating noodles at a local restaurant and a group of nice young ladies invited me to join them for dinner. When one of them pulled out her cell phone I immediately went into user research mode.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Me: How many people do you have on your cell phone?&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Her: I had 120, but I just cleaned it out. Now I have about 100.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Me: What would you do if you lost your phone?&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Her: That happened to me once and it was tragic. Now I type the important people into an Excel spreadsheet so I don&amp;#8217;t lose them.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;When people I know lose their mobile devices, they are usually more upset about loosing their address list than of loosing an expensive toy.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;#8220;But Kevin,&amp;#8221; you might ask, &amp;#8220;What does this have to do with Longhorn?&amp;#8221;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Great question. The people on my team are doing a great deal of work to make sure mobile devices (most importantly cell phones) integrate in powerful and useful ways with the Longhorn People and Group platform.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Last month our Development Manager gave a talk at &lt;A href="http://www.microsoft.com/whdc/winhec/default.mspx"&gt;WinHec&lt;/A&gt; entitled &lt;B style="mso-bidi-font-weight: normal"&gt;Communications In &amp;#8220;Longhorn&amp;#8221;:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Telephony, &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Mobile&lt;/st1:place&gt; Devices And HW/SW Integration&lt;/B&gt;. (&lt;A href="http://download.microsoft.com/download/1/8/f/18f8cee2-0b64-41f2-893d-a6f2295b40c8/TW04011_WINHEC2004.ppt"&gt;PowerPoint slides&lt;/A&gt;)&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The scenario target: One unified address book on all of my devices and communications applications.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I have contacts spread across three lists: my Outlook address book, my Messenger contact list, and my cell phone. They are not kept in sync. In the case of my phone, they are not backed up.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Wouldn&amp;#8217;t it be cool if when I added a person to my contact list in Messenger I could easily add them to my cell phone? Wouldn&amp;#8217;t it be great if loosing me cell phone didn&amp;#8217;t mean I had to email all of my friends and ask them for their phone number (and hope you run into the people for whom you don&amp;#8217;t have an email address?) Loosing your phone should be a great experience, because it gives you an excuse to get a &lt;A href="http://www.microsoft.com/windowsmobile/products/pocketpcphone/default.mspx"&gt;Pocket PC Phone Edition&lt;/A&gt;.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Sadly, none of the members of the P&amp;amp;G sync team are blogging (yet). Free to post your comments, questions, and horror stories. I&amp;#8217;ll pass them along.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=144467" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category></item><item><title>One more...Ray seems to like Longhorn</title><link>http://blogs.msdn.com/okoboji/archive/2003/11/25/54547.aspx</link><pubDate>Tue, 25 Nov 2003 10:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:54547</guid><dc:creator>okoboji</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/54547.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=54547</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;p&gt;
        &lt;a href="http://www.ozzie.net"&gt;Ray Ozzie&lt;/a&gt; has an &lt;a href="http://www.ozzie.net/blog/stories/2003/11/14/640kbOughtToBeEnoughForAnyone.html"&gt;interesting
        perspective &lt;/a&gt;on Longhorn storage: moving to a common store may have the same benefits
        of using common protocols on the Internet.
    &lt;/p&gt;
    &lt;p&gt;
        I hope so!
    &lt;/p&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=54547" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category></item><item><title>Glass in IE6?!?</title><link>http://blogs.msdn.com/okoboji/archive/2003/11/25/54544.aspx</link><pubDate>Tue, 25 Nov 2003 10:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:54544</guid><dc:creator>okoboji</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/okoboji/comments/54544.aspx</comments><wfw:commentRss>http://blogs.msdn.com/okoboji/commentrss.aspx?PostID=54544</wfw:commentRss><description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;p&gt;
        Those of you lucky enough to attend the PDC keynote this year saw the cool glass effects
        we're working on for Longhorn. Well, you don't have to wait for Longhorn to get glass
        on your desktop. You can do it with IE right now! 
    &lt;/p&gt;
    &lt;p&gt;
        &lt;a href="http://w3future.com/2003/glass/glass.html"&gt;http://w3future.com/2003/glass/glass.html&lt;/a&gt; 
    &lt;/p&gt;
    &lt;p&gt;
        The author claims the use of nothing but "HTML, CSS a bit of JavaScript and a lot
        of Internet Explorer filters." 
    &lt;/p&gt;
    &lt;p&gt;
        You need a fast machine, but it's pretty darn impressive. 
    &lt;/p&gt;
&lt;/body&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=54544" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/okoboji/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/okoboji/archive/tags/Longhorn/default.aspx">Longhorn</category></item></channel></rss>