<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0"><channel><title>Karsten Januszewski</title><description>IRhetoric: Convergence in the Simulacrum</description><link>http://www.rhizohm.net/</link><language>en-us</language><pubDate>Sat, 04 Jul 2009 15:11:05 GMT</pubDate><generator>Oxite</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/irhetoric" type="application/rss+xml" /><item><title>&amp;Oslash;redev 2009</title><description>&lt;p&gt;The good folks at Øredev 2009 have invited me to speak in November 2009. Here's the sessions I'll be giving: &lt;a href="http://www.oredev.se/prod/oredev/site.nsf/docsbycodename/session!opendocument&amp;amp;sid=EBC8D0D8921C5FD7C12575AF0029E21A&amp;amp;day=4&amp;amp;track=5EA1ADD99261C8A5C12575A500494952"&gt;Developer/Designer Workflow with WPF/Silverlight&lt;/a&gt; and &lt;a href="http://www.oredev.se/prod/oredev/site.nsf/docsbycodename/session!opendocument&amp;amp;sid=4F4E9CA0B8D73534C12575940036837F&amp;amp;day=3&amp;amp;track=BD3C09484C257950C12575A500497688"&gt;Glimmer: A jQuery Interactive Design Tool&lt;/a&gt;. I’m stoked!&amp;#160; Here’s more about the conference (microformated no less!)&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:6B020045-44C2-4efd-A1E3-80B19875D75F:a11d71cf-b085-4229-bd26-c72a422ab5c1" class="wlWriterEditableSmartContent"&gt;&lt;div class="vcalendar vevent"&gt;&lt;a class="url" title="http://oredev.com" href="http://oredev.com" target="_blank"&gt;&lt;span class="summary"&gt;&amp;Oslash;redev 2009&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="description"&gt;&amp;Oslash;redev is the premier conference in Europe focused on the software development process - from programming to project management  and more ...&lt;/span&gt;&lt;br /&gt;&lt;abbr class="dtstart" title="2009-11-04"&gt;Wednesday, November 4, 2009&lt;/abbr&gt;&lt;abbr class="dtend" title="2009-11-05"&gt; (all day) &lt;/abbr&gt;&lt;div class="location vcard"&gt;&lt;span class="fn org"&gt;Malm&amp;ouml; Exhibition &amp;amp; Convention Center Malm&amp;ouml; M&amp;auml;ssan&lt;/span&gt;&lt;div class="adr"&gt;&lt;span class="locality"&gt;Malm&amp;ouml;&lt;/span&gt;, &lt;span class="postalcode"&gt;21119&lt;/span&gt; &amp;nbsp;&lt;span class="country-name"&gt;Sweden&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;img src="http://oredev.com/Prod/Oredev/site.nsf/shared/27B434615D25D67DC12575D0002D2BD6/$file/Girlhomepagecomeon.jpg" /&gt;&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/97/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/97/default.aspx</link><pubDate>Mon, 22 Jun 2009 17:33:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/97/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>3</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/97/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>Silverlight</category><category>WPF</category></item><item><title>The Archivist: Notes on Development</title><description>&lt;p&gt;Just came out with a new experiment from the &lt;a href="http://visitmix.com/Lab"&gt;Mix Online lab&lt;/a&gt; called &lt;a href="http://flotzam.com/archivist\"&gt;The Archivist&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://flotzam.com/archivist"&gt;&lt;img border="0" src="http://visitmix.com/content/img/home_sidebar_archivist.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I put it together with &lt;a href="http://http://visitmix.com/About/Systim"&gt;Tim Aidlin&lt;/a&gt;, written in WPF, using &lt;a href="http://www.rhizohm.net/irhetoric/blog/89/default.aspx"&gt;this basic LINQ query&lt;/a&gt; for talking to Twitter search. &lt;/p&gt;  &lt;p&gt;I used the &lt;a href="http://blogs.msdn.com/dancre/archive/2006/07/26/dm-v-vm-part-3-a-sample-datamodel.aspx"&gt;Dan Crevier data model&lt;/a&gt; for doing everything asynchronously. &lt;/p&gt;  &lt;p&gt;I used &lt;a href="http://blogs.msdn.com/jaimer/archive/2008/11/16/microsoft-client-continuum-in-action-the-silverlight-toolkit-charts-running-in-wpf.aspx"&gt;Jaime’s WPF port&lt;/a&gt; of the &lt;a href="http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20430"&gt;Silverlight chart controls&lt;/a&gt; for the chart. Probably should update the chart to use the &lt;a href="http://blogs.msdn.com/delay/archive/2009/04/22/another-round-of-un-support-quick-fix-for-the-unofficial-wpf-charting-assembly.aspx"&gt;latest port&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The application is deployed with ClickOnce, which is real handy because I can push updates to the application easily.&lt;/p&gt;  &lt;p&gt;That’s it!&amp;#160; &lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/96/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/96/default.aspx</link><pubDate>Fri, 15 May 2009 17:50:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/96/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>8</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/96/trackback/default.aspx</trackback:ping><category>WPF</category></item><item><title>Glimmer Errata</title><description>&lt;p&gt;--There’s a &lt;a href="http://channel9.msdn.com/shows/The+Knowledge+Chamber/Tim-Aidlin-Glimmer-a-JQuery-Interactive-Design-Tool/"&gt;17 minute video posted up on Channel9&lt;/a&gt; that Tim Aidlin did which gets into exactly what Glimmer does.&amp;#160; He goes into the motivations of why we built Glimmer from the design perspective. He also does some cool demos of how to use the tool.&lt;/p&gt;  &lt;p&gt;--There’s a &lt;a href="http://timheuer.com/blog/archive/2009/04/29/glimmer-makes-jquery-animations-easy.aspx"&gt;post from Tim Heuer&lt;/a&gt;, who used Glimmer to create a jQuery script on his site. Looking forward to seeing other examples of Glimmer used in the wild. If you deploy a Glimmer-generated script, please let us know on the &lt;a href="http://code.msdn.microsoft.com/glimmer/Wiki/View.aspx?title=GlimmerSites&amp;amp;referringTitle=Home"&gt;wiki&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;--In both Tim’s video and in the intro video, Glimmer is talked about being on Codeplex. However, we ended up putting both the setup.exe and a .zip with all the source code on &lt;a href="http://code.msdn.microsoft.com/glimmer"&gt;http://code.msdn.microsoft.com/glimmer&lt;/a&gt;. &lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/95/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/95/default.aspx</link><pubDate>Wed, 29 Apr 2009 17:56:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/95/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>8</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/95/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>jQuery</category></item><item><title>Ship It! Glimmer: a jQuery Interactive Design Tool</title><description>&lt;p&gt;We just shipped &lt;a href="http://visitmix.com/lab/glimmer" target="_blank"&gt;Glimmer: a jQuery Interactive Design Tool&lt;/a&gt;.&amp;#160; Now maybe it makes sense why half my posts have been about WPF and half have been about jQuery. Over the last few months, I've been building a WPF design tool for &lt;a href="http://jquery.com" target="_blank"&gt;jQuery&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img src="http://visitmix.com/content/img/home_sidebar_glimmer.jpg"/&gt;&lt;/p&gt;  &lt;p&gt;Once again, it was a collaboration with &lt;a href="http://visitmix.com/About/Systim" target="_blank"&gt;Tim Aidlin&lt;/a&gt;, who did all the design work, both for WPF and jQuery. He used Blend to build the UI of the application itself and then he used Glimmer to build all of the jQuery samples along with Expression Web. Go Tim!&amp;#160; He's got &lt;a href="http://thunderkick.us/blog/?p=160" target="_blank"&gt;a great post on his blog&lt;/a&gt; that shows the evolution of Glimmer and gets into why we built it in the first place. &lt;/p&gt;  &lt;p&gt;There's a few things I'm particularly fired up about as far as features in the application:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;.&amp;#160; From the start, I wrote Glimmer to be extensible.&amp;#160; I think the model is pretty clean.&amp;#160; If you want to create a wizard for Glimmer, you simply create a WPF User Control.&amp;#160; You can pretty much do anything from there. If you want to create a new effect, you just need to subclass from the Effect class in GlimmerLib and then create a datatemplate.&amp;#160; If anyone out there ends up wanting to write a Glimmer wizard or effect and is looking for help, let me know.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Interactive Design Surface&lt;/strong&gt;. &lt;a href="http://visitmix.com/About/allenjs" target="_blank"&gt;Joshua Allen&lt;/a&gt; and I collaborated to make the HTML design surface in Glimmer. It is pretty simple but powerful. Once you load an HTML file into Glimmer and you click &amp;quot;Select&amp;quot; either for the Action or Target, the HTML design surface becomes active, similar to if you use the IE8 Developer Tools and click the arrow.&amp;#160; We then auto-populate Glimmer with any CSS IDs when they are hovered over.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Live Preview of Wizards&lt;/strong&gt;. When you use one of the wizards, you get a live preview of the HTML/CSS/jQuery that's being built for you. I do this by using property change notifications in WPF to fire off an attached event that refreshes the web browser control that's hosted by Glimmer. So, for example, if you are building an image sequence wizard and you change the duration between flipping images, you'll immediately see it reflected in the preview pane even before you complete the wizard.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Preview in Browser&lt;/strong&gt;. Okay, so it isn't &lt;a href="http://expression.microsoft.com/en-us/dd565874.aspx" target="_blank"&gt;Expression Web's SuperPreview&lt;/a&gt;, but it is quite handy when doing web development to be able to preview in different browsers right from the tool you are working in.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Overall, the application is probably the most ambitious WPF I've written. I ended up using a MVC pattern (mostly -- it isn't absolutely pure).&amp;#160; Thanks to &lt;a href="http://blogs.msdn.com/jaimer" target="_blank"&gt;Jaime Rodriguez&lt;/a&gt; for some assistance on that front as well as a couple other WPF issues I hit.&amp;#160; The entire thing is done using databinding and has datatemplates nested in datatemplates nested in datatemplates. I use commands and not event handlers (mostly -- it isn't absolutely pure) and do some funky things with attached events.&amp;#160; The &lt;a href="http://go.microsoft.com/fwlink/?LinkId=149665" target="_blank"&gt;source code&lt;/a&gt; is posted for anyone who dares to dive in. :)&amp;#160; &lt;/p&gt;  &lt;p&gt;Looking forward to feedback as people give it a whirl...&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/94/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/94/default.aspx</link><pubDate>Tue, 28 Apr 2009 19:13:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/94/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>6</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/94/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>jQuery</category><category>WPF</category></item><item><title>Image Merge With Photoshop Slices: Another jQuery Experiment</title><description>&lt;p&gt;Here's another jQuery experiment, done with Photoshop slices and then doing jQuery animations on absolute X and Y positions specified by the CSS which was generated by Photoshop.&amp;#160; The result can be seen below or you can browse the page &lt;a href="http://rhizohm.net/apps/jquery/imagepuzzle/crossfox2.html" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;iframe height="600" src="http://rhizohm.net/apps/jquery/imagepuzzle/crossfox2.html" width="800"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt;(Photo of Crossfox drummer by &lt;a href="http://adamforslund.com" target="_blank"&gt;Adam Forslund&lt;/a&gt;.)&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/93/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/93/default.aspx</link><pubDate>Mon, 13 Apr 2009 07:30:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/93/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>5</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/93/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>jQuery</category></item><item><title>Finding All Installed Browsers in Windows XP and Vista &amp;ndash; beware 64bit!</title><description>&lt;p&gt;In the application I’ve been working on, I needed to find all browsers that are installed on a user’s machine. The best way to go about this is to look in the registry under &lt;strong&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet&lt;/strong&gt;. This is where browser manufacturers are told to put their information, per &lt;a href="http://msdn.microsoft.com/en-us/library/dd203067(VS.85).aspx"&gt;this MSDN article&lt;/a&gt;.&amp;#160; But here’s a gotcha I hit: on 64bit, the keys get written to &lt;strong&gt;HKEY_LOCAL_MACHINE\SOFTWARE\&lt;u&gt;WOW6432Node&lt;/u&gt;\Clients\StartMenuInternet&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;No big deal: just need to check that key first.&lt;/p&gt;  &lt;p&gt;So, here’s the code I ended up writing to get the name, file path and icon for the browsers installed on a user’s machine.&amp;#160; (Note that the Browser object is my own class.) &lt;/p&gt;  &lt;pre class="csharpcode"&gt;RegistryKey browserKeys;
&lt;span class="rem"&gt;//on 64bit the browsers are in a different location&lt;/span&gt;
browserKeys = Registry.LocalMachine.OpenSubKey(&lt;span class="str"&gt;@&amp;quot;SOFTWARE\WOW6432Node\Clients\StartMenuInternet&amp;quot;&lt;/span&gt;);
&lt;span class="kwrd"&gt;if&lt;/span&gt; (browserKeys == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
    browserKeys = Registry.LocalMachine.OpenSubKey(&lt;span class="str"&gt;@&amp;quot;SOFTWARE\Clients\StartMenuInternet&amp;quot;&lt;/span&gt;);

&lt;span class="kwrd"&gt;string&lt;/span&gt;[] browserNames = browserKeys.GetSubKeyNames();

&lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0;i&amp;lt;browserNames.Length;i++)
{
    Browser browser = &lt;span class="kwrd"&gt;new&lt;/span&gt; Browser();
    RegistryKey browserKey = browserKeys.OpenSubKey(browserNames[i]);
    browser.Name = (&lt;span class="kwrd"&gt;string&lt;/span&gt;) browserKey.GetValue(&lt;span class="kwrd"&gt;null&lt;/span&gt;);
    RegistryKey browserKeyPath = browserKey.OpenSubKey(&lt;span class="str"&gt;@&amp;quot;shell\open\command&amp;quot;&lt;/span&gt;);
    browser.Path = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)browserKeyPath.GetValue(&lt;span class="kwrd"&gt;null&lt;/span&gt;);
    RegistryKey browserIconPath = browserKey.OpenSubKey(&lt;span class="str"&gt;@&amp;quot;DefaultIcon&amp;quot;&lt;/span&gt;);
    browser.IconPath = (&lt;span class="kwrd"&gt;string&lt;/span&gt;)browserIconPath.GetValue(&lt;span class="kwrd"&gt;null&lt;/span&gt;);
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.Add(browser);
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/92/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/92/default.aspx</link><pubDate>Fri, 03 Apr 2009 20:39:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/92/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>5</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/92/trackback/default.aspx</trackback:ping></item><item><title>Solving ComboBox SelectionChanged and MouseWheel Problem in WPF</title><description>&lt;p&gt;I hit a WPF issue where I had a &lt;strong&gt;ComboBox &lt;/strong&gt;and was wired up to the &lt;strong&gt;SelectionChanged &lt;/strong&gt;event and the mouse wheel was causing &lt;strong&gt;SelectionChanged &lt;/strong&gt;to get fired over and over again. Solution?&amp;#160; Wire up the &lt;strong&gt;PreviewMouseWheel &lt;/strong&gt;event on the &lt;strong&gt;ComboBox &lt;/strong&gt;and set &lt;strong&gt;e.Handled &lt;/strong&gt;to &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/91/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/91/default.aspx</link><pubDate>Mon, 30 Mar 2009 05:21:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/91/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>3</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/91/trackback/default.aspx</trackback:ping><category>WPF</category></item><item><title>Tetris Flotzam at MIX09</title><description>&lt;p&gt;Check out &lt;a href="http://www.flickr.com/photos/tags/flotzam/"&gt;some shots of Flotzam&lt;/a&gt; at MIX09 up on Flickr. Here's a couple that came out pretty well:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://flotzam.com/blog/image.axd?picture=flotzammix092.jpg" /&gt;&amp;#160;&lt;img src="http://flotzam.com/blog/image.axd?picture=flotzammix09.jpg" /&gt;&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/90/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/90/default.aspx</link><pubDate>Thu, 19 Mar 2009 20:22:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/90/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>2</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/90/trackback/default.aspx</trackback:ping></item><item><title>Consuming Twitter Search ATOM With Linq -- And Watch Out For Caching!</title><description>&lt;p&gt;So you want to know what &lt;strong&gt;&lt;em&gt;is happening right now. &lt;/em&gt;&lt;/strong&gt;&lt;a target="_blank" href="http://search.twitter.com"&gt;Twitter Search&lt;/a&gt; is the way. Constructing a query and parsing the ATOM is pretty easy.&lt;/p&gt;  &lt;p&gt;Recently hit a gotcha where the network my app was running was caching the results.&amp;#160; The way to override was to create a WebClient and set the cache policy explicitly.&amp;#160; You can see how that works by setting the RequestCacheLevel to NoCacheNoStore. Then, call OpenRead() on the WebClient. &lt;/p&gt;  &lt;p&gt;After that, I use Linq to parse the results. One gotcha is the need to explicitly add the namespace when querying the results.&amp;#160; (If there is a better way, let me know!) &lt;/p&gt;  &lt;p&gt;Here's the code. &lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; xml;
&lt;span class="kwrd"&gt;string&lt;/span&gt; term = &amp;quot;mix09&amp;quot;; &lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; (WebClient webclient = &lt;span class="kwrd"&gt;new&lt;/span&gt; WebClient())
{
    RequestCachePolicy policy = &lt;span class="kwrd"&gt;new&lt;/span&gt; RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
    webclient.CachePolicy = policy;
    Stream stream = webclient.OpenRead&lt;br /&gt;         (&lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;&amp;quot;http://search.twitter.com/search.atom?q={0}&amp;quot;&lt;/span&gt;, term));
    StreamReader sr = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(stream);
    xml = sr.ReadToEnd();
    sr.Close();
}
XDocument doc = XDocument.Parse(xml);
XNamespace xmlns = &lt;span class="str"&gt;&amp;quot;http://www.w3.org/2005/Atom&amp;quot;&lt;/span&gt;;
var tweet = from entry &lt;span class="kwrd"&gt;in&lt;/span&gt; doc.Descendants(xmlns + &lt;span class="str"&gt;&amp;quot;entry&amp;quot;&lt;/span&gt;)
            select &lt;span class="kwrd"&gt;new&lt;/span&gt;
            {
                Content = entry.Element(xmlns + &lt;span class="str"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;).Value,
                Date = entry.Element(xmlns + &lt;span class="str"&gt;&amp;quot;published&amp;quot;&lt;/span&gt;).Value,
                Author = entry.Element(xmlns + &lt;span class="str"&gt;&amp;quot;author&amp;quot;&lt;/span&gt;).Element(xmlns + &lt;span class="str"&gt;&amp;quot;uri&amp;quot;&lt;/span&gt;).Value.Replace(&lt;span class="str"&gt;&amp;quot;http://twitter.com/&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;),
                Image = entry.Elements(xmlns + &lt;span class="str"&gt;&amp;quot;link&amp;quot;&lt;/span&gt;).ElementAt(1).Attribute(&lt;span class="str"&gt;&amp;quot;href&amp;quot;&lt;/span&gt;).Value

            };
&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var c &lt;span class="kwrd"&gt;in&lt;/span&gt; tweet)
{&lt;/pre&gt;

  &lt;pre class="csharpcode"&gt;//do something here...
}&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Note this code is used in &lt;a target="_blank" href="http://flotzam.com"&gt;Flotzam&lt;/a&gt;!&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/89/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/89/default.aspx</link><pubDate>Thu, 19 Mar 2009 00:51:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/89/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>0</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/89/trackback/default.aspx</trackback:ping><category>Web 2.0</category></item><item><title>Text Fly: A jQuery Experiment in With Easing, Callbacks and Text Animation</title><description>&lt;p&gt;Here’s another jQuery animation experiment, this time with animating text using an easing equation. You can &lt;a href="http://rhizohm.net/apps/jquery/textfly.htm"&gt;see it here&lt;/a&gt; or check it out below:&lt;/p&gt;  &lt;p&gt;&lt;iframe height="200" src="http://rhizohm.net/apps/jquery/textfly.htm" width="500"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt;There’s a few interesting things going on here.&amp;#160; First off, I’m using the jQuery easing plug-in, which you can read about &lt;a href="http://gsgd.co.uk/sandbox/jquery/easing/"&gt;here&lt;/a&gt;. It uses &lt;a href="http://www.robertpenner.com/easing/"&gt;Robert Penners easing equations&lt;/a&gt; for the math.&amp;#160; In this case, I use the &lt;strong&gt;easeOutElastic &lt;/strong&gt;effect to give the text that bounce feel when it completes its animation. I set the initial position of the text in jQuery to be off the screen.&lt;/p&gt;  &lt;p&gt;I’m using the callback feature of jQuery to kick off the 2nd and 3rd text animations, passing the function name (&lt;strong&gt;flyin2 &lt;/strong&gt;and &lt;strong&gt;flyin3&lt;/strong&gt;) to get the next animation to kick off.&amp;#160; It is interesting how, through the use of callbacks, you can almost start creating keyframes with jQuery animations.&lt;/p&gt;  &lt;p&gt;The final thing to call out is the css, where I specify that all &lt;strong&gt;&amp;lt;p&amp;gt; &lt;/strong&gt;tags have position:relative. I also had to make sure that the containing &amp;lt;div&amp;gt; element had &lt;strong&gt;overflow:hidden &lt;/strong&gt;to prevent the scrollbar from showing up when the elements were positioned off the frame. &lt;/p&gt;  &lt;p&gt;Here’s the jQuery code.:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;jQuery(function($) {
function flyin(&lt;span class="kwrd"&gt;event&lt;/span&gt;)
{
     $(&lt;span class="str"&gt;&amp;quot;#p2&amp;quot;&lt;/span&gt;).css(&lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;-700px&amp;quot;&lt;/span&gt;);
     $(&lt;span class="str"&gt;&amp;quot;#p3&amp;quot;&lt;/span&gt;).css(&lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;700px&amp;quot;&lt;/span&gt;);
     $(&lt;span class="str"&gt;&amp;quot;#p1&amp;quot;&lt;/span&gt;).css(&lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;700px&amp;quot;&lt;/span&gt;);
     $(&lt;span class="str"&gt;&amp;quot;#p1&amp;quot;&lt;/span&gt;).animate({ &lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;: 0 },300, &lt;span class="str"&gt;&amp;quot;easeOutElastic&amp;quot;&lt;/span&gt;, flyin2);
}

function flyin2(&lt;span class="kwrd"&gt;event&lt;/span&gt;)
{
    $(&lt;span class="str"&gt;&amp;quot;#p2&amp;quot;&lt;/span&gt;).animate({&lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;:0},300, &lt;span class="str"&gt;&amp;quot;easeOutElastic&amp;quot;&lt;/span&gt;, flyin3);
}

function flyin3(&lt;span class="kwrd"&gt;event&lt;/span&gt;)
{
    $(&lt;span class="str"&gt;&amp;quot;#p3&amp;quot;&lt;/span&gt;).animate({&lt;span class="str"&gt;&amp;quot;left&amp;quot;&lt;/span&gt;:0},300, &lt;span class="str"&gt;&amp;quot;easeOutElastic&amp;quot;&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
}

flyin();



});&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/88/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/88/default.aspx</link><pubDate>Thu, 19 Feb 2009 02:28:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/88/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>2</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/88/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>jQuery</category></item><item><title>Follow The Menu: A jQuery Experiment In Position Animation</title><description>&lt;p&gt;I was working with jQuery today and built a simple menu tracker in which a dot animates to whatever menu item is currently being hovered over, which you can see here:&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;iframe src="http://rhizohm.net/apps/jquery/movingmenu.html"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt;All I did was make a container div and then two child div elements, one for the menu items and one for the ball. You can see that if &lt;a href="http://rhizohm.net/apps/jquery/movingmenu.html"&gt;you view source on the HTML&lt;/a&gt;.I did the menu items as a &lt;strong&gt;ul &lt;/strong&gt;with a collection of &lt;strong&gt;li &lt;/strong&gt;tags with &lt;strong&gt;list-style &lt;/strong&gt;set to &lt;strong&gt;none&lt;/strong&gt;. Not being super CSS savvy, it took some futzing with getting my positioning right until I realized that all I needed was to have &lt;strong&gt;position:absolute&lt;/strong&gt; specified for my little ball.&lt;/p&gt; &lt;p&gt;Then, all I had to do was animate the left property of the of the ball using jQuery. It is super handy in jQuery that you can get the position of any element so that you can dynamically pass that to your animation. So, what I do is get the position of the li and then subtract its width divided by two so that the ball is cetnered underneath each menu item. I also set the ball’s initial position to the first item.&amp;nbsp; Here’s the jQuery code:&lt;/p&gt;&lt;pre class="csharpcode"&gt;jQuery(function($) {

function ActionName1(&lt;span class="kwrd"&gt;event&lt;/span&gt;)
{
    $(&lt;span class="str"&gt;"#ball"&lt;/span&gt;).animate({ &lt;span class="str"&gt;"left"&lt;/span&gt;: ($(&lt;span class="str"&gt;"#li1"&lt;/span&gt;).position().left + ($(&lt;span class="str"&gt;"#li1"&lt;/span&gt;).width() / 2 )) }, 200, &lt;span class="str"&gt;"linear"&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
}
function ActionName2(&lt;span class="kwrd"&gt;event&lt;/span&gt;) {
    $(&lt;span class="str"&gt;"#ball"&lt;/span&gt;).animate({ &lt;span class="str"&gt;"left"&lt;/span&gt;: ($(&lt;span class="str"&gt;"#li2"&lt;/span&gt;).position().left  + ($(&lt;span class="str"&gt;"#li2"&lt;/span&gt;).width() / 2)) }, 200, &lt;span class="str"&gt;"linear"&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
}

function ActionName3(&lt;span class="kwrd"&gt;event&lt;/span&gt;) {
    $(&lt;span class="str"&gt;"#ball"&lt;/span&gt;).animate({ &lt;span class="str"&gt;"left"&lt;/span&gt;: ($(&lt;span class="str"&gt;"#li3"&lt;/span&gt;).position().left  + ($(&lt;span class="str"&gt;"#li3"&lt;/span&gt;).width() / 2)) }, 200, &lt;span class="str"&gt;"linear"&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
}
function ActionName4(&lt;span class="kwrd"&gt;event&lt;/span&gt;) {
    $(&lt;span class="str"&gt;"#ball"&lt;/span&gt;).animate({ &lt;span class="str"&gt;"left"&lt;/span&gt;: ($(&lt;span class="str"&gt;"#li4"&lt;/span&gt;).position().left + ($(&lt;span class="str"&gt;"#li4"&lt;/span&gt;).width() / 2)) }, 200, &lt;span class="str"&gt;"linear"&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
}
$(&lt;span class="str"&gt;'#li1'&lt;/span&gt;).bind(&lt;span class="str"&gt;'mouseover'&lt;/span&gt;, ActionName1);
$(&lt;span class="str"&gt;'#li2'&lt;/span&gt;).bind(&lt;span class="str"&gt;'mouseover'&lt;/span&gt;, ActionName2);
$(&lt;span class="str"&gt;'#li3'&lt;/span&gt;).bind(&lt;span class="str"&gt;'mouseover'&lt;/span&gt;, ActionName3);
$(&lt;span class="str"&gt;'#li4'&lt;/span&gt;).bind(&lt;span class="str"&gt;'mouseover'&lt;/span&gt;, ActionName4);

$(&lt;span class="str"&gt;"#ball"&lt;/span&gt;).css(&lt;span class="str"&gt;"left"&lt;/span&gt;, $(&lt;span class="str"&gt;"#li1"&lt;/span&gt;).position().left + ($(&lt;span class="str"&gt;"#li1"&lt;/span&gt;).width() / 2));
});&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;The final thing I need to do is to make it more dynamic so that if you actually click something the ball stays with that item.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;/pre&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/87/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/87/default.aspx</link><pubDate>Tue, 17 Feb 2009 00:27:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/87/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>3</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/87/trackback/default.aspx</trackback:ping><category>Glimmer</category><category>jQuery</category></item><item><title>Workaround For When Textbox Border Remains After Expander is Closed When Using ValidatesOnDataErrors or DataErrorValidationRule</title><description>&lt;p&gt;Recently hit a WPF issue with IDataErrorInfo where using ValidatesOnDataErrors with a TextBox creates a border around the textbox that doesn’t go away when used with an Expander. Screen shot below before closing expander:&amp;#160; &lt;br /&gt;&lt;img src="http://rhizohm.net/images/err1.png" /&gt;    &lt;br /&gt;Screenshot after closing expander:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://rhizohm.net/images/err2.png" /&gt;     &lt;br /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The workaround?&amp;#160; Create a style for Textbox (or TextboxBase, depending) which blows away the validation error template like this:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Validation.ErrorTemplate&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{x:Null}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;And then manually sets the border, like this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ToolTip&amp;quot;&lt;/span&gt;
&lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding RelativeSource={x:Static RelativeSource.Self},
Path=(Validation.Errors)[0].ErrorContent}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setter&lt;/span&gt; &lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Border&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Property&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Background&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Red&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Trigger&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;That did the trick. &lt;a href="http://rhizohm.net/download/wpfdv.zip"&gt;Download&lt;/a&gt; a complete sample of the fix.&amp;#160; &lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/86/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/86/default.aspx</link><pubDate>Wed, 04 Feb 2009 01:12:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/86/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>4</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/86/trackback/default.aspx</trackback:ping><category>WPF</category></item><item><title>Using RelativeSource To Remove Items From a Collection Bound To A ListBox or ItemsControl</title><description>&lt;p&gt;Okay, I’m not sure this is the best way to do this, but I needed a way to remove an item from an ItemsControl within the UI context of the item itself. My problem was that the item itself, when in a datatemplate, doesn’t know its parent.&amp;#160; The RelativeSource property came to the rescue (tip o’ the hat to &lt;a href="http://blogs.msdn.com/jaimer/"&gt;Jaime Rodriguez&lt;/a&gt;), although my use of the Tag property seems a little funky. Here’s my solution:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;DataTemplate1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Vertical&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBox&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding Path=DisplayName}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBox&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding Path=NavigateURL}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt; &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Remove&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Click&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Remove_Click&amp;quot;&lt;/span&gt; 
              &lt;span class="attr"&gt;Tag&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{Binding RelativeSource={RelativeSource Mode=FindAncestor, 
              AncestorType={x:Type ListBox}}}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Then, in the code behind, here’s what I do:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Remove_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
{
    Button button = (Button) sender;
    ListBox listBox = (ListBox)button.Tag;
    MenuItemCollection menuItemCollection = (MenuItemCollection)listBox.ItemsSource;
    menuItemCollection.Remove((MenuItem)button.DataContext);
}&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Basically, I get the listbox out of the Tag element and then call into its ItemsSource property, remove the object which is bound to the data template itself.&amp;#160; (Note that MenuItem and MenuItemCollection are objects I created.)&lt;/p&gt;

&lt;p&gt;Maybe a little hacky, but it works!&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/85/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/85/default.aspx</link><pubDate>Wed, 28 Jan 2009 00:10:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/85/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>4</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/85/trackback/default.aspx</trackback:ping><category>WPF</category></item><item><title>Yet Another Wizard (YAW): A Super Simple WPF Wizard</title><description>&lt;p&gt;So, I needed a WPF Wizard. Poked around and found a few things, including &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/aa972123.aspx"&gt;a sample in the SDK&lt;/a&gt; as well as a few others floating around on the web.&amp;#160; However, none of them were as simple or as generic as fit my requirements.&amp;#160; So I rolled my own. &lt;/p&gt;  &lt;p&gt;Here's how it works. If you want to create a new wizard, you need to create a user control to host the wizard. In the sample, it is called MyWizard and is hosted by Window2.&amp;#160; In MyWizard codebehind, I set the content of the entire control to the WizardContainer user control, which is generic and can be reused. Also in MyWizard, I tell the WizardContainer which UserControls are the pages by adding them to the userControlCollection. In the sample, I also set a DataContext, which then gets picked up by all the pages no problem.&amp;#160; Pretty simple, which I like. And, completely able to be styled in Blend. And, completely generic!&lt;/p&gt;  &lt;p&gt;&lt;a target="_blank" href="http://rhizohm.net/download/wizardcontainer.zip"&gt;Download the sample&lt;/a&gt;.&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/84/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/84/default.aspx</link><pubDate>Mon, 26 Jan 2009 06:28:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/84/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>0</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/84/trackback/default.aspx</trackback:ping><category>WPF</category></item><item><title>Getting WPF Expander and Listbox Alignment Happy</title><description>&lt;p&gt;Burnt a little time on this one: I had a WPF Expander inside a ListBox and couldn’t get the Expander to align to the top when one expander was collapsed and another expander was uncollapsed.&amp;#160; Consider the following XAML: &lt;/p&gt;  &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Page&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;IsItemsHost&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt; &lt;span class="attr"&gt;ExpandDirection&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item0&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item2&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt; &lt;span class="attr"&gt;ExpandDirection&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Page&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;It would look fine if both were collapsed:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://rhizohm.net/images/e1.png" /&gt; &lt;/p&gt;

&lt;p&gt;But if one was collapsed and one wasn’t:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://rhizohm.net/images/e2.png" /&gt; &lt;/p&gt;

&lt;p&gt;Or even if both were uncollapsed:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://rhizohm.net/images/e3.png" /&gt; &lt;/p&gt;

&lt;p&gt;It wouldn’t align. It was driving me crazy. I &lt;a href="http://blois.us/Snoop/"&gt;snooped&lt;/a&gt; around and tried all kinds of shenanigans in various control templates and styles to make it behave. But it turned out the fix was easy: I needed to set the VerticalAlignment on the ListboxItem itself as follows. (See bold.) &lt;/p&gt;

&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Page&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt; &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;IsItemsHost&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;&lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt; &lt;span class="attr"&gt;ExpandDirection&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item0&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Item2&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;  &lt;strong&gt;&lt;u&gt;&lt;font size="4"&gt;&lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt; &lt;span class="attr"&gt;ExpandDirection&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Right&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 0
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 1
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Option 2
                        
                        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                     &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox.Items&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
               &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Expander&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBoxItem&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ListBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Grid&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Page&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;And then I got:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://rhizohm.net/images/e4.png" /&gt; &lt;/p&gt;

&lt;p&gt;Yeah! I could of course put this in a style, etc.&amp;#160; And if this were a datatemplate instead of a listboxitem, I would style the listboxitem.&lt;/p&gt;

&lt;p&gt;(Shout out to &lt;a href="http://kaxaml.com"&gt;KAXAML&lt;/a&gt; as tool of choice when breaking down problems like this…)&lt;/p&gt;</description><comments>http://www.rhizohm.net//irhetoric/blog/83/default.aspx</comments><link>http://www.rhizohm.net//irhetoric/blog/83/default.aspx</link><pubDate>Tue, 20 Jan 2009 21:37:00 GMT</pubDate><guid isPermaLink="true">http://www.rhizohm.net//irhetoric/blog/83/default.aspx</guid><dc:creator>Karsten Januszewski</dc:creator><slash:comments>4</slash:comments><trackback:ping>http://www.rhizohm.net//irhetoric/blog/83/trackback/default.aspx</trackback:ping><category>WPF</category></item></channel></rss>
