<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://mtaulty.com/CommunityServer/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>Mike Taulty's Blog</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/default.aspx</link><description>Bits and Bytes</description><dc:language>en-GB</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>Various Links</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/20/10928.aspx</link><pubDate>Thu, 20 Nov 2008 19:59:51 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10928</guid><dc:creator>mtaulty</dc:creator><slash:comments>1</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10928.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10928</wfw:commentRss><description>&lt;p&gt;I've been catching up on my blog reading...interesting stuff I came across;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/p2p/archive/2008/11/19/peer-to-peer-based-features-in-win-7.aspx"&gt;PNRP in Windows 7 being used for "remote assistance"&lt;/a&gt;. Sounds very cool. You can find a few PNRP examples on this blog if you search.&lt;/li&gt; &lt;li&gt;&lt;a href="http://livelabs.com/seadragon-ajax/"&gt;Seadragon in AJAX&lt;/a&gt; from Live Labs - if you've seen DeepZoom in Silverlight then this is the same underlying technology (AFAIK) without the Silverlight part.&lt;/li&gt; &lt;li&gt;&lt;a href="http://dotnet.org.za/rudi/archive/2008/11/06/wpf-themes-released.aspx"&gt;Themes for WPF&lt;/a&gt; released on CodePlex ( a port of the Silverlight versions from the &lt;a href="http://www.codeplex.com/Silverlight"&gt;Silverlight Toolkit&lt;/a&gt; ). There's also a port of the charts &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;up here&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;If you've not seen it yet, the &lt;a href="http://www.codeplex.com/wpf"&gt;WPF Toolkit&lt;/a&gt;&amp;nbsp; got rev'd with the toolkit now containing the DataGrid, Calendar and DatePicker and the Ribbon preview being available off the same page. I thought I'd written a post about this but I've just realised it didn't get past the preview stage :-)&lt;/li&gt; &lt;li&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/11/16/update-on-silverlight-2-and-a-glimpse-of-silverlight-3.aspx"&gt;ScottGu's update on Silverlight 2 and Silverlight 3&lt;/a&gt; - some of that stuff "surprised" me in terms of what's being revealed here!&lt;/li&gt; &lt;li&gt;&lt;a href="http://feeds.feedburner.com/~r/KennyKerr/~3/453031522/visual-studio-2010-mouse-wheel-zooming.aspx"&gt;VS2010 code editor is being drawn with vectors and WPF&lt;/a&gt; - Kenny spots it and enjoy vectors :-)&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/Dan/Celso-Gomes-Styling-a-Silverlight-based-Twitter-application-with-Expression-Blend-2/"&gt;Celso Gomes styles a Silverlight Twitter application&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;&lt;a href="http://exposureroom.com/members/irascian.aspx/assets/b5ee9156088d452588b5c98462ce5b70/"&gt;Tricky talks through "the Design Experience" at the UK Silverlight User Group&lt;/a&gt; - this is a cool session.&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/garethj/archive/2008/11/11/dsl-2010-feature-dives-t4-preprocessing-rationale.aspx"&gt;Gareth starts to talk about DSL features in VS 2010&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.itjoblog.co.uk/2008/11/is-easy-concurrency-the-road-t.html"&gt;Tim Anderson asks an interesting question about making parallel programming "easier"&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/bclteam/archive/2008/11/11/introduction-to-code-contracts-melitta-andersen.aspx"&gt;The BCL team talks about Code Contracts in .NET Framework 4.0&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10928" width="1" height="1"&gt;</description></item><item><title>Silverlight: Design-Time Extensibility</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/20/10927.aspx</link><pubDate>Thu, 20 Nov 2008 18:40:52 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10927</guid><dc:creator>mtaulty</dc:creator><slash:comments>0</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10927.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10927</wfw:commentRss><description>&lt;p&gt;Just a link but what a link! If you're interested in design-time extensibility for Silverlight controls then;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://silverlight.net/blogs/justinangel/archive/2008/11/17/silverlight-design-time-extensibility.aspx"&gt;this post&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;is what you want.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10927" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1015.aspx">Silverlight</category></item><item><title>WPF: Experiment with Text Animation</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/20/10925.aspx</link><pubDate>Thu, 20 Nov 2008 18:09:26 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10925</guid><dc:creator>mtaulty</dc:creator><slash:comments>2</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10925.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10925</wfw:commentRss><description>&lt;p&gt;I wanted to experiment with text animation. Specifically, I wanted a control that would display some text and have the option of "exploding" that text in the sense of taking each word in the text and randomly animating it in terms of;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;translation&lt;/li&gt; &lt;li&gt;rotation&lt;/li&gt; &lt;li&gt;scale&lt;/li&gt; &lt;li&gt;opacity&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;so that the words that make up the text can seem to "fly in" all at once to their final position on screen.&lt;/p&gt; &lt;p&gt;Perhaps a UI will help;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_thumb.png" width="244" height="184"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Here, my control is in the blue border occupying the bottom 3/4 of the window. Naturally, none of the styling is fixed.&lt;/p&gt; &lt;p&gt;The other controls on the Window just provide;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Text&lt;/li&gt; &lt;li&gt;Whether the control initially displays its text "exploded" or not&lt;/li&gt; &lt;li&gt;How long the animation to bring the text into place should take&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;and those controls all data-bind to properties on my control with the &lt;strong&gt;TextBox&lt;/strong&gt; only being set to transfer its value on a loss of focus rather than on every keystroke.&lt;/p&gt; &lt;p&gt;When I hit (in this case) the &lt;strong&gt;Implode&lt;/strong&gt; button there'll be a 5 second animation which does;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_3.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_thumb_3.png" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_4.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_thumb_4.png" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_5.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_thumb_5.png" width="244" height="184"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;to bring the words into place and (naturally) &lt;strong&gt;Explode&lt;/strong&gt; just does the reverse.&lt;/p&gt; &lt;p&gt;When the &lt;strong&gt;Text&lt;/strong&gt; is set on the control, I just split it up into words and then create a separate &lt;strong&gt;TextBlock&lt;/strong&gt; within a &lt;strong&gt;TextBlock&lt;/strong&gt; to represent that word and then I just set some transformations on it randomly and apply some animations. Initially, I wanted to use &lt;strong&gt;Run&lt;/strong&gt; rather than &lt;strong&gt;TextBlock&lt;/strong&gt; for each of the words but &lt;strong&gt;Run&lt;/strong&gt; turns out not to be nearly so flexible as &lt;strong&gt;TextBlock&lt;/strong&gt; in terms of what you can do with it.&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/downloads/WpfAnimatedText.zip"&gt;I've shared the source code here if you want to play with it and/or re-use the control or some of it&lt;/a&gt; - the demo app above is included with the control source.&lt;/p&gt; &lt;p&gt;There are some hard-coded things in the control ( such as the maximum amount by which to rotate, translate, scale ) which should perhaps be moved to properties for completeness.&lt;/p&gt; &lt;p&gt;There's also a bit of a hack in there in order to get the main &lt;strong&gt;TextBlock&lt;/strong&gt; that I use to wrap otherwise because the whole thing is in a &lt;strong&gt;ViewBox&lt;/strong&gt; it'll just be one line so I artificially limit the width of the TextBlock. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Taking that a step further...&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;I added this into the Green version of my "Twistori" client that &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10896.aspx"&gt;I started building here&lt;/a&gt; and the code for that is then downloadable by clicking the image below;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/downloads/BlogPostTwistori_4.zip"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_6.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and then I added it into the Blue version of my "Twistori" client that &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10896.aspx"&gt;I shared here&lt;/a&gt; and the binaries for this one are downloadable by clicking the image below;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/downloads/WpfTwistori.zip"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFExperimentwithTextAnimation_FE9E/image_7.png" width="244" height="154"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10925" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item><item><title>Visual Studio 2010 Resources</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/20/10923.aspx</link><pubDate>Thu, 20 Nov 2008 12:45:27 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10923</guid><dc:creator>mtaulty</dc:creator><slash:comments>1</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10923.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10923</wfw:commentRss><description>&lt;p&gt;This post is a companion to a little article that I wrote for the &lt;a href="http://msdn.microsoft.com/en-gb/flash/default.aspx"&gt;UK MSDN Flash&lt;/a&gt; about Visual Studio 2010 with some resources to get you kick-started. It's not meant to be definitive.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;What? You don't read the MSDN Flash? &lt;a href="http://msdn.microsoft.com/en-gb/flash/default.aspx"&gt;Sign up&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The first thing I'd say is that you need to take a look at this area on Channel9 and subscribe to it;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a title="http://channel9.msdn.com/VisualStudio/" href="http://channel9.msdn.com/VisualStudio/"&gt;http://channel9.msdn.com/VisualStudio/&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;and also check out the &lt;strong&gt;Visual Studio 2010 and .NET Framework V4.0 week&lt;/strong&gt; here;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a title="http://channel9.msdn.com/posts/VisualStudio/Visual-Studio-2010-and-the-NET-Framework-40-Week/" href="http://channel9.msdn.com/posts/VisualStudio/Visual-Studio-2010-and-the-NET-Framework-40-Week/"&gt;http://channel9.msdn.com/posts/VisualStudio/Visual-Studio-2010-and-the-NET-Framework-40-Week/&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you're looking for a CTP to download then you need to look here - it's in VPC form and it's big so download over a weekend or something;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?familyid=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?familyid=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=922B4655-93D0-4476-BDA4-94CF5F8D4814&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;and there's a preview of the VS 2010 Training Kit (demos, labs, presentations) which you can get from here;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=752CB725-969B-4732-A383-ED5740F02E93&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=752CB725-969B-4732-A383-ED5740F02E93&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=752CB725-969B-4732-A383-ED5740F02E93&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you're looking at &lt;strong&gt;Visual Studio 2010&lt;/strong&gt; then here's some places I'd go to;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://www.microsoft.com/emea/teched2008/developer/tv/default.aspx?vid=23"&gt;Watch Jason Zander's keynote session at TechEd Europe&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/KYN02/"&gt;Watch Scott Guthrie's keynote at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL48/"&gt;Take a look at what's coming for web developers with Jeff King at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL32/"&gt;Understand the new IDE customisation opportunities with Tim Wagner at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you want to understand the side-by-side story and features in the &lt;strong&gt;V4.0 CLR&lt;/strong&gt; then;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC49/"&gt;Check out the CLR Futures talk with Josh Goodman from PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL02/"&gt;See where the type system is going with Andrew Whitechapel at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you want to check out what's coming in the &lt;strong&gt;languages&lt;/strong&gt; with Visual Studio 2010 then;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL16/"&gt;Listen to Anders Hejlsberg talk about C# 4.0 at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL12/"&gt;Listen to Paul Vick talk about VB 10 at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL11/"&gt;Listen to Luca Bolognese talk about F# at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL13/"&gt;Take a look at C++ in VS2010 with Boris Jabes at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you want to know more about what's coming in the &lt;strong&gt;.NET Framework 4.0&lt;/strong&gt;;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Parallel Programming&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://www.microsoft.com/emea/teched2008/developer/tv/default.aspx?vid=59"&gt;Take a look at Daniel Moth's Parallel Extensions session at TechEd EMEA&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;WPF&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC46/"&gt;Watch the WPF Roadmap with Kevin Gjerstad at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL36/"&gt;Check out what's coming in XAML 2009 with Rob Relyea at PDC&lt;/a&gt; (not strictly WPF specific but a lot of fun nonetheless :-))&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;WF and WCF&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL17/"&gt;Take a look at Workflow Foundation 4.0 with Kenny Wolf at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL21/"&gt;Look at the new model for Workflow activities with Matt Winkler at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL06/"&gt;Look at how WCF and WF come together with Ed Pinto at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Web&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC20/"&gt;Watch the ASP.NET 4.0 Roadmap with Scott Hunter at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/PC32/"&gt;Watch the ASP.NET AJAX Futures session with Bertrand Le Roy at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL14/"&gt;Take a look at distributed web caching with "Velocity" with Murali Krishnaprased at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Data&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL20/"&gt;See where Entity Framework is heading with Tim Mallalieu at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL08/"&gt;Check out how ADO.NET Data Services becomes online/offline with Pablo Castro at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Office&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL01/"&gt;Deploying Office Applications with Sauurabh Bhatia at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Other&lt;/li&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL33/"&gt;Have a look at the Managed Extensibility Framework with Glenn Block at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt; &lt;p&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;If you want to look at what &lt;strong&gt;Visual Studio Team System 2010&lt;/strong&gt; is bringing then;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL47/"&gt;Watch Cameron Skinner take a Lap Around VSTS 2010 at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL52/"&gt;Walk through new VSTS 2010 features with Brian Harry at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL37/"&gt;Check out "Team Lab" with Ram Cherla at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL15/"&gt;Look at the new UML designers in VSTS Architecture Edition with Peter Provost at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL09/"&gt;Look at Agile development with VSTS 2010 with Sunder Raman at PDC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://channel9.msdn.com/pdc2008/TL03/"&gt;Check out quality &amp;amp; diagnostics tooling with Habib Heydarian at PDC&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you've got through that little lot already you're quite some way ahead of me.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10923" width="1" height="1"&gt;</description></item><item><title>Xbox 360: New Xbox Experience Today</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10910.aspx</link><pubDate>Wed, 19 Nov 2008 11:45:56 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10910</guid><dc:creator>mtaulty</dc:creator><slash:comments>0</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10910.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10910</wfw:commentRss><description>&lt;p&gt;I'm not a big gamer. I hadn't turned my Xbox on for about 3 months before I recently bought &lt;strong&gt;Far Cry 2&lt;/strong&gt; which I'm playing through and really enjoying. I'm also thinking of &lt;strong&gt;Mirror's Edge&lt;/strong&gt; as I played a preview of that and it looks really cool.&lt;/p&gt; &lt;p&gt;However...today is the launch of the &lt;a href="http://www.xbox.com/en-GB/live/nxe/default.htm"&gt;New Xbox Experience&lt;/a&gt; which looks pretty cool and has one particular feature that sounds very attractive to me - &lt;strong&gt;the ability to install a DVD based game to the hard-drive.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I really want to try that out - with the best will in the world, the Xbox DVD drive ( like most DVD drives ) makes a lot of noise and so I'd expect that a game coming from the hard-drive would be a lot quicker and a lot quieter. Hopefully, I'll get to give the NXE a whirl later today :-)&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10910" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1028.aspx">Off Topic</category></item><item><title>WPF and &amp;quot;Twistori&amp;quot;: Part 7 (of 7 :-))</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10908.aspx</link><pubDate>Wed, 19 Nov 2008 11:42:00 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10908</guid><dc:creator>mtaulty</dc:creator><slash:comments>5</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10908.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10908</wfw:commentRss><description>&lt;p&gt;Following on from &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10906.aspx"&gt;the previous post&lt;/a&gt; I had one last thing that I wanted to do. &lt;/p&gt; &lt;p&gt;At the moment, when my application moves from one feed item to another, it simply hides the UI displaying the feed item and then shows it again at a later point which is a bit "dull". It'd be nice if it did some kind of transition.&lt;/p&gt; &lt;p&gt;I figured that I'd use the &lt;a href="http://www.codeplex.com/wpffx"&gt;Shader Effect Library from CodePlex&lt;/a&gt; for this so I downloaded it and then added a reference to the ShaderEffectLibrary from my project;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart7of7_6E1/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart7of7_6E1/image_thumb.png" width="244" height="190"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Now I can make use of an effect on my user control. Picking a ripple effect, I can make sure my XAML can "see" the library;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;xmlns:effects="clr-namespace:ShaderEffectLibrary;assembly=ShaderEffectLibrary"&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;and then I can add an effect to my declaration of my user control in my main UI as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;local:ItemDisplayControl&lt;/span&gt;
      &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="displayControl"&lt;/span&gt;
      &lt;span class="attr"&gt;Visibility&lt;/span&gt;&lt;span class="kwrd"&gt;="Hidden"&lt;/span&gt;
      &lt;span class="attr"&gt;ControlReady&lt;/span&gt;&lt;span class="kwrd"&gt;="OnItemDisplayReady"&lt;/span&gt; 
      &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;
      &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="1in"&lt;/span&gt;
      &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt;
      &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&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;local:ItemDisplayControl.Effect&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;effects:RippleEffect&lt;/span&gt;
          &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="ripple"&lt;/span&gt;
          &lt;span class="attr"&gt;Amplitude&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;
          &lt;span class="attr"&gt;Phase&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;
          &lt;span class="attr"&gt;Frequency&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;
          &lt;span class="attr"&gt;Center&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5,0.5"&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;local:ItemDisplayControl.Effect&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;local:ItemDisplayControl&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;now I can add some Storyboards to my main UI to manipulate that effect ( this XAML is a snippet rather than the whole UI definition );&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window.Resources&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;Storyboard&lt;/span&gt;
      &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="sbRipple"&lt;/span&gt;
      &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetName&lt;/span&gt;&lt;span class="kwrd"&gt;="displayControl"&lt;/span&gt;
      &lt;span class="attr"&gt;FillBehavior&lt;/span&gt;&lt;span class="kwrd"&gt;="Stop"&lt;/span&gt;
      &lt;span class="attr"&gt;Duration&lt;/span&gt;&lt;span class="kwrd"&gt;="00:00:00.5"&lt;/span&gt;
      &lt;span class="attr"&gt;AutoReverse&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&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;DoubleAnimation&lt;/span&gt;
        &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;
        &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="0.5"&lt;/span&gt;
        &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="(Effect).(effects:RippleEffect.Amplitude)"&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;DoubleAnimation&lt;/span&gt;
        &lt;span class="attr"&gt;From&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;
        &lt;span class="attr"&gt;To&lt;/span&gt;&lt;span class="kwrd"&gt;="50"&lt;/span&gt;
        &lt;span class="attr"&gt;Storyboard&lt;/span&gt;.&lt;span class="attr"&gt;TargetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;="(Effect).(effects:RippleEffect.Frequency)"&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;Storyboard&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;and I need to rejig my code a little bit so that rather than just displaying the new item, we ripple it as well :-) Updated code is;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnItemDisplayReady(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs args)
    {
      ShowItemDisplayControl();
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; ShowItemDisplayControl()
    {
      displayControl.Visibility = Visibility.Visible;
      SbRipple.Begin();
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; HideItemDisplayControl()
    {
      displayControl.Visibility = Visibility.Hidden;      
    }
    Storyboard SbRipple
    {
      get
      {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (mainGrid.FindResource(&lt;span class="str"&gt;"sbRipple"&lt;/span&gt;) &lt;span class="kwrd"&gt;as&lt;/span&gt; Storyboard);
      }
    }&lt;/pre&gt;
&lt;p&gt;and that's it (for now) - I'm done with it. There are some other things I could do here;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Fix a bug that I know is lurking in there where certain Feed Items don't display. Trying to nail that down. 
&lt;li&gt;Add some UI around only include Positive/Negative sentiment in the searches.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;but I've had fun playing with WPF and Blend and it's also strangely introduced me to the idea that watching Twitter feeds is very addictive and I already learnt a whole bunch of stuff this morning that I wouldn't otherwise know so I think I might have to become a bit of a Twitter-watcher (is that a &lt;strong&gt;Twitcher?&lt;/strong&gt;) if not a Tweeter.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/downloads/BlogPostTwistori_3.zip"&gt;The final bits for download are here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10908" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item><item><title>WPF and &amp;quot;Twistori&amp;quot;: Part 6</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10906.aspx</link><pubDate>Wed, 19 Nov 2008 11:40:12 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10906</guid><dc:creator>mtaulty</dc:creator><slash:comments>3</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10906.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10906</wfw:commentRss><description>&lt;p&gt;Following on from &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10904.aspx"&gt;this previous post&lt;/a&gt; there's a few things wrong with where I've got to so far and some improvements that I'd like to make;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;I'd like to display something when there's no new feed items available.  &lt;li&gt;I'd like some kind of transition when one feed item moves to another.  &lt;li&gt;I'd like to avoid displaying an empty user control when the application starts up. That is, this doesn't look great;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart6_1044E/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart6_1044E/image_thumb.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;whilst I'm waiting for the first item to come in and, finally,&lt;/p&gt; &lt;ol&gt; &lt;li&gt;There's a problem with images. I'm loading an image over the web and I need to know when it's loaded otherwise the image goes on the screen before it's really loaded and then updates whilst the user is looking at it and that doesn't seem right at all to me :-)&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;So, 4 things to fix even if the last one is called (1) just like the first one - I can't work list numbering in Live Writer :-)&lt;/p&gt; &lt;p&gt;Dealing with the first issue isn't too difficult - my &lt;strong&gt;AtomFeedManager&lt;/strong&gt; class fires a &lt;strong&gt;FeedItemUnavailable&lt;/strong&gt; event so I could just add code to the handler for that which manufactures a "fake" item to display when there's nothing else to display as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemUnavailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemUnavailableEventArgs args)
    {
      Dispatcher.BeginInvoke(&lt;span class="kwrd"&gt;new&lt;/span&gt; Action(() =&amp;gt;
      {
        displayControl.DataContext = &lt;span class="kwrd"&gt;new&lt;/span&gt; AtomFeedItem()
        {
          Author = &lt;span class="str"&gt;"none"&lt;/span&gt;,
          AuthorImageUri = &lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(&lt;span class="str"&gt;"pack://application:,,,/question.jpg"&lt;/span&gt;),
          Title = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;"No activity for {0:0} seconds, check your options"&lt;/span&gt;,
            args.UnavailableTime.TotalSeconds),
          PublishedDate = DateTime.Now
        };
      }));
    }&lt;/pre&gt;
&lt;p&gt;where I'm just making up a data item because none is available. The only "odd" thing about this is that I've added an existing image &lt;strong&gt;question.jpg&lt;/strong&gt; to the project and set it to be built as a &lt;strong&gt;resource&lt;/strong&gt; to embed it into the assembly and then I can then use the &lt;strong&gt;pack: &lt;/strong&gt;URI in order to make use of that image.&lt;/p&gt;
&lt;p&gt;This means that when there is no data I now see something like this;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart6_1044E/image_3.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart6_1044E/image_thumb_3.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;so that's one of my issue-list items sorted.&lt;/p&gt;
&lt;p&gt;Thinking about what to do about the initial blank display - it seems simple to initially mark the control as hidden and only display it when the first feed item arrives (even if it is a made-up feed item when there are no feed items available).&lt;/p&gt;
&lt;p&gt;That's fine...however I still have the problem with images. How to know when an image is &lt;strong&gt;really&lt;/strong&gt; ready for display because I don't want to put my &lt;strong&gt;ItemDisplayControl&lt;/strong&gt; onto the screen if it has still to load image for the author of the tweet from the web. I only want that thing to appear on the screen when the image is good and loaded.&lt;/p&gt;
&lt;p&gt;For me, this introduces the idea that my &lt;strong&gt;ItemDisplayControl&lt;/strong&gt; could fire some &lt;strong&gt;Ready&lt;/strong&gt; style event when a user of the control can feel confident that it's good to put the control onto the screen knowing that its image will have been loaded.&lt;/p&gt;
&lt;p&gt;How do we know when a WPF image has been loaded from the network? &lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Image&lt;/strong&gt; doesn't tell us this but the &lt;strong&gt;BitmapImage&lt;/strong&gt; class does. Inside of my user control, I'm using an Image 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;Image&lt;/span&gt;
          &lt;span class="attr"&gt;Stretch&lt;/span&gt;&lt;span class="kwrd"&gt;="Fill"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxWidth&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxHeight&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="2,2,2,2"&lt;/span&gt;
          &lt;span class="attr"&gt;Source&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding AuthorImageUri}"&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;Image&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;so I'd assume that I can do something like;&lt;/p&gt;&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Image&lt;/span&gt;
          &lt;span class="attr"&gt;Stretch&lt;/span&gt;&lt;span class="kwrd"&gt;="Fill"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxWidth&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxHeight&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="2,2,2,2"&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;Image.Source&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;BitmapImage&lt;/span&gt;
              &lt;span class="attr"&gt;UriSource&lt;/span&gt;&lt;span class="kwrd"&gt;="Source={Binding AuthorImageUri}"&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;Image.Source&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;Image&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;and then I could add handlers to the events like &lt;strong&gt;DownloadCompleted&lt;/strong&gt; and &lt;strong&gt;DownloadFailed&lt;/strong&gt; on that &lt;strong&gt;BitmapImage&lt;/strong&gt; which is what I need.&lt;/p&gt;
&lt;p&gt;However...I don't think that I can directly bind that &lt;strong&gt;UriSource&lt;/strong&gt; property like that ( see &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/85cffb5c-05a4-4653-a263-183f20ddd2c2/"&gt;here&lt;/a&gt; ). Now, however I tried to do this with converters and so on I never quite managed to get this to work and so I resorted to code. I thought I'd handle the &lt;strong&gt;DataContextChanged&lt;/strong&gt; event myself on the &lt;strong&gt;Image &lt;/strong&gt;as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Image&lt;/span&gt;
          &lt;span class="attr"&gt;DataContextChanged&lt;/span&gt;&lt;span class="kwrd"&gt;="OnDataContextChanged"&lt;/span&gt;
          &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="imageAuthor"&lt;/span&gt;
          &lt;span class="attr"&gt;Stretch&lt;/span&gt;&lt;span class="kwrd"&gt;="Fill"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxWidth&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;MaxHeight&lt;/span&gt;&lt;span class="kwrd"&gt;="96"&lt;/span&gt;
          &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="Auto"&lt;/span&gt;
          &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="2,2,2,2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and then I can put some code behind that leaving my code for my &lt;strong&gt;ItemDisplayControl&lt;/strong&gt; looking like;&lt;/p&gt;&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ItemDisplayControl : UserControl
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;event&lt;/span&gt; EventHandler ControlReady;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; ItemDisplayControl()
    {
      InitializeComponent();
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; FireControlReady()
    {
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (ControlReady != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
      {
        ControlReady(&lt;span class="kwrd"&gt;this&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
      }
    }
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnImageDataContextChanged(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, DependencyPropertyChangedEventArgs e)
    {
      AtomFeedItem feedItem = (AtomFeedItem)e.NewValue;

      &lt;span class="rem"&gt;// The item may not have an image, in which case...we are done.&lt;/span&gt;
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (!feedItem.HasImage)
      {
        FireControlReady();
      }
      &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (!feedItem.HasImageNeedingDownload)
      {
        &lt;span class="rem"&gt;// Some images are packed (i.e. pack://) into the executable. No&lt;/span&gt;
        &lt;span class="rem"&gt;// need to download them.&lt;/span&gt;
        imageAuthor.Source = &lt;span class="kwrd"&gt;new&lt;/span&gt; BitmapImage(feedItem.AuthorImageUri);
        FireControlReady();
      }
      &lt;span class="kwrd"&gt;else&lt;/span&gt;
      {
        BitmapImage bi = &lt;span class="kwrd"&gt;new&lt;/span&gt; BitmapImage();
        bi.BeginInit();
        bi.UriSource = feedItem.AuthorImageUri;
        bi.DownloadCompleted += (s, args) =&amp;gt;
          {
            imageAuthor.Source = bi;
            FireControlReady();
          };
        bi.DownloadFailed += (s, args) =&amp;gt;
          {
            FireControlReady();
          };
        bi.EndInit();
      }
    }
  }
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The use of this control in the main Window then changes. Initially, I want it to be invisible and I want to handle its &lt;strong&gt;ControlReady&lt;/strong&gt; event. Here's the updated snippet of XAML from the main UI which declares the control;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;local:ItemDisplayControl&lt;/span&gt;
      &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="displayControl"&lt;/span&gt;
      &lt;span class="attr"&gt;Visibility&lt;/span&gt;&lt;span class="kwrd"&gt;="Hidden"&lt;/span&gt;
      &lt;span class="attr"&gt;ControlReady&lt;/span&gt;&lt;span class="kwrd"&gt;="OnItemDisplayReady"&lt;/span&gt; 
      &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;
      &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt;
      &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;and then I can handle that &lt;strong&gt;ControlReady&lt;/strong&gt; event in my &lt;strong&gt;OnItemDisplayReady&lt;/strong&gt; handler by just changing the visibility;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnItemDisplayReady(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs args)
    {
      ShowItemDisplayControl();
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; ShowItemDisplayControl()
    {
      displayControl.Visibility = Visible;
    }&lt;/pre&gt;
&lt;p&gt;and I can make sure that I hide the control whenever we change its data context thereby forcing it to load a new image which is in the handlers for items becoming available/unavailable;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemAvailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemAvailableEventArgs args)
    {
      Dispatcher.BeginInvoke(&lt;span class="kwrd"&gt;new&lt;/span&gt; Action(() =&amp;gt;
        {
          HideItemDisplayControl();
          displayControl.DataContext = args.FeedItem;
          listSearchTerms.SelectedItem = args.SearchTerm;
          listSearchTerms.ScrollIntoView(args.SearchTerm);
        }));
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemUnavailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemUnavailableEventArgs args)
    {
      Dispatcher.BeginInvoke(&lt;span class="kwrd"&gt;new&lt;/span&gt; Action(() =&amp;gt;
      {
        HideItemDisplayControl();
        displayControl.DataContext = &lt;span class="kwrd"&gt;new&lt;/span&gt; AtomFeedItem()
        {
          Author = &lt;span class="str"&gt;"none"&lt;/span&gt;,
          AuthorImageUri = &lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(&lt;span class="str"&gt;"pack://application:,,,/question.jpg"&lt;/span&gt;),
          Title = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;"No activity for {0:0} seconds, check your options"&lt;/span&gt;,
            args.UnavailableTime.TotalSeconds),
          PublishedDate = DateTime.Now
        };
      }));
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; HideItemDisplayControl()
    {
      displayControl.Visibility = Visibility.Hidden;
    }&lt;/pre&gt;
&lt;p&gt;and that all works quite nicely.&lt;/p&gt;
&lt;p&gt;So, I've solved items (1), (3) and (4) of my original list - all I'd like now is some kind of transition between one item leaving and the next one arriving. I'll leave that to the next post. &lt;/p&gt;
&lt;p&gt;In the meantime, &lt;a href="http://mtaulty.com/downloads/BlogPostTwistori_2.zip"&gt;the bits as they currently stand are here for download&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10906" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item><item><title>WPF and &amp;quot;Twistori&amp;quot;: Part 5</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10904.aspx</link><pubDate>Wed, 19 Nov 2008 11:35:46 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10904</guid><dc:creator>mtaulty</dc:creator><slash:comments>3</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10904.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10904</wfw:commentRss><description>&lt;p&gt;Following on from &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10902.aspx"&gt;the previous post&lt;/a&gt; I wanted to take the UI that I have so far;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and attempt to style that ListBox over on the right hand side. The first thing I'd do with it is to remove its background;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_3.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_3.png" width="242" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;which stops it being a big white area of the screen. Then I altered its border to use a linear gradient brush.&lt;/p&gt; &lt;p&gt;With that in place, I want to change the template for the CheckBox that is being displayed by the ListBox so I need to go and edit the ItemTemplate for the ListBox which I created in a previous post by just putting a Grid and a CheckBox in it;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_4.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_4.png" width="244" height="171"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and so the item template just looks like this;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_5.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_5.png" width="244" height="147"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and what I can then do is to edit the template of that CheckBox to replace it with my own "design" as in;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_6.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_6.png" width="177" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The template for the CheckBox looks like this;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_7.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_7.png" width="244" height="150"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and it has some triggers in that you can see certain actions being taken when the element &lt;strong&gt;HasContent&lt;/strong&gt; or &lt;strong&gt;IsEnabled - &lt;/strong&gt;these are probably not so relevant for me and will almost certainly disappear in my template but they are as below;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_8.png" width="206" height="244"&gt;&lt;/p&gt; &lt;p&gt;I want a template that's more based around a circular "tickbox" so I go ahead and define some UI for that as below;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_9.png" width="644" height="380"&gt; &lt;/p&gt; &lt;p&gt;and that's just a simple ellipse with a path drawn through it as a Tick mark and another one as a Cross mark and then there's a content presenter below it. I want to control the visibility of the marks depending on whether the CheckBox is checked or not and so I can set them both to be &lt;strong&gt;Visibility=Hidden&lt;/strong&gt; and then control the visibility from a trigger as in;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_10.png" width="240" height="484"&gt; &lt;/p&gt; &lt;p&gt;Now, I've drawn my UI here at a fixed scale and so I tend to wrap a &lt;strong&gt;Viewbox&lt;/strong&gt; around it just to get it to scale up a little and then made sure that Viewbox is doing uniform scaling (its &lt;strong&gt;Stretch&lt;/strong&gt; property).&lt;/p&gt; &lt;p&gt;With that in place I want to tweak a few more properties. Firstly, I want to make sure that my &lt;strong&gt;ListBox&lt;/strong&gt; has its &lt;strong&gt;HorizontalScrollBarVisibility&lt;/strong&gt; set to &lt;strong&gt;Disabled&lt;/strong&gt; (I don't want horizontal scrolling here) and its &lt;strong&gt;VerticalScrollBarVisibility&lt;/strong&gt; set to &lt;strong&gt;Hidden&lt;/strong&gt; (I might want the list to scroll vertically but I don't want the scrollbar visible). I also set a margin around the &lt;strong&gt;Grid&lt;/strong&gt; in the ListBox ItemTemplate so that it spaced itself out a little and finally I want to set the &lt;strong&gt;Foreground&lt;/strong&gt; for the &lt;strong&gt;CheckBox &lt;/strong&gt;to white.&lt;/p&gt; &lt;p&gt;With all that in place, running my app now gives me;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_11.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_8.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;It's moving along a little bit. However, I'd like to make sure that whenever a feed item comes in I highlight search the relevant search term over in the ListBox on the left hand side. From a coding perspective this is easy as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemAvailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemAvailableEventArgs args)
    {
      Dispatcher.BeginInvoke(&lt;span class="kwrd"&gt;new&lt;/span&gt; Action(() =&amp;gt;
        {
          displayControl.DataContext = args.FeedItem;
          listSearchTerms.SelectedItem = args.SearchTerm;
          listSearchTerms.ScrollIntoView(args.SearchTerm);
        }));
    }&lt;/pre&gt;
&lt;p&gt;to highlight the right item in the ListBox. However, it raises this bit of ugliness;&lt;/p&gt;
&lt;p&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_12.png" width="244" height="154"&gt; &lt;/p&gt;
&lt;p&gt;in that the listbox selected item now has this funny white rectangle around it. I don't want that so how to get rid of it? This selection rectangle is actually placed over the top of this thing by the Item Container and so we need to go and find the style for that thing by editing the Item Container Style;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_13.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_9.png" width="222" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and then within there editing the template;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_14.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_10.png" width="182" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;which shows that we have a border (and some triggers) wrapped around our ListBox item;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_15.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_11.png" width="132" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I don't want that behaviour so I deleted the various triggers and then just added a single new one for the &lt;strong&gt;IsSelected&lt;/strong&gt; event which would give the Border a little BorderBrush and a little Background as in;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_16.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_12.png" width="208" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and so that means that my UI now looks like this as/when a feed item comes in ( the green background isn't "so great" but I get away with it );&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_17.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_13.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;so that's better than the white rectangle anyway. I also figure that it might be nice if these items did a little animation and grew/shrank as and when they were made the selected item so I threw in a scale transform on the border;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_18.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_14.png" width="244" height="80"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;added an animation to make the item grow with some easing...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_19.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_15.png" width="244" height="101"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_20.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_16.png" width="244" height="238"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and then threw in another one called "shrink" which did the reverse and used these as part of my triggers;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_21.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart5_F655/image_thumb_17.png" width="182" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and I'm reasonably happy with my ListBox at that point. &lt;/p&gt;
&lt;p&gt;There are still a number of "issues" though that I'd like to take a look at - that'll be in the follow on post. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/downloads/WpfTwistori_1.zip"&gt;For now, I've put the project here for download in the state that tries to match up with this blog post&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10904" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item><item><title>WPF and &amp;quot;Twistori&amp;quot;: Part 4</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10902.aspx</link><pubDate>Wed, 19 Nov 2008 11:26:45 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10902</guid><dc:creator>mtaulty</dc:creator><slash:comments>3</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10902.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10902</wfw:commentRss><description>&lt;p&gt;Following up on &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10900.aspx"&gt;this post&lt;/a&gt; it's time to make the thing look a little bit better than it does right now. Some of this will be purely cosmetic, some of it will end up requiring some code changes.&lt;/p&gt; &lt;p&gt;In the first instance, I'll go for some "cheap wins". I'll open up Expression Blend with my project and, first off, I'll go and grab a Windows-themed wallpaper from &lt;a href="http://www.hdwallpapers.net"&gt;www.hdwallpapers.net&lt;/a&gt; (in the Computer section) such as this one;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.hdwallpapers.net/gallery/wallpapers/computer/computer_0036.zip"&gt;&lt;img border="0" alt="Wallpaper pack by Tinkupuri" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/computer_0036.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;then I go to my project in Blend and add an existing item;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb.png" width="244" height="232"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and add that Image into the project. Having done that, what I usually do is right mouse on it to insert it into the scene;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_3.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_3.png" width="240" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;with the image in the scene, I make sure it's selected and then I used Tools-&amp;gt;Make Brush Resource to create myself a new ImageBrush;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_4.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_4.png" width="244" height="143"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;With that created, I go and delete the image from the scene (not from the project!) and then I can go to the Window and set its background to be the Image Brush I just created as in;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_5.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_5.png" width="244" height="106"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_6.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_6.png" width="244" height="190"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and so now I've got a nice(r) background.&lt;/p&gt; &lt;p&gt;From there, it'd be nice to style my &lt;strong&gt;ItemDisplayControl&lt;/strong&gt; UserControl that I built in the last post. Opening up that XAML file in the project...&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Aside - there's a bunch of useful short-cuts in Expression Blend. I recommend reading the help file but, generally, I find that &lt;strong&gt;CTRL++ &lt;/strong&gt;and &lt;strong&gt;CTRL+-&lt;/strong&gt; are useful for zooming in and out. Selecting something in the "Objects/Timeline" tree and then hitting &lt;strong&gt;CTRL+0&lt;/strong&gt; is great for zooming in to one particular element (especially for templates) and then F6 is useful for changing the views and TAB/F4 are useful for getting UI out of your way.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;gives me something that looks like this;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_7.png" width="644" height="462"&gt; &lt;/p&gt; &lt;p&gt;and so our UserControl is just a Grid with a StackPanel that has an Image, TextBlock and then there's another TextBlock.&lt;/p&gt; &lt;p&gt;In the first instance, I want to add some kind of "header" behind that StackPanel which I'll do just by adding a Rectangle to the same Grid cell but I want it behind the StackPanel in the z-order as in;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_8.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_7.png" width="244" height="172"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;and then I can give that rectangle a bit of colour by changing its background, its stroke, its RadiusX, RadiusY, its Margin all in the properties panel. One of the things to say here is that when making colours for Backgrounds, Strokes etc. it's useful to make them as resources in Blend;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_9.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_8.png" width="182" height="244"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;so that you can then re-use them rather than trying to re-create them. Having given my rectangle a bit of a fill;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_10.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_9.png" width="244" height="42"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I also want to wrap a little Border around my Image and give it both a bit of a margin and a bit of a drop shadow. That is;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_11.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_10.png" width="244" height="153"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Then I can style that border by giving it a stroke ( I re-used the one from my rectangle above ), I can give it a little Margin ( say 10 pixels ) and then I can add an effect to it making it a DropShadowEffect and setting properties as below;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_12.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_11.png" width="244" height="138"&gt;&lt;/a&gt; &lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_13.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_12.png" width="244" height="213"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I'd also like to style my fonts so I can take the TextBlock which is representing the &lt;strong&gt;Author&lt;/strong&gt; and is a child of the &lt;strong&gt;StackPanel&lt;/strong&gt; and change its font family to &lt;strong&gt;Gungsuh, &lt;/strong&gt;the size to &lt;strong&gt;36&lt;/strong&gt;, the vertical alignment to &lt;strong&gt;Center, &lt;/strong&gt;the foreground to a near-white colour. &lt;/p&gt; &lt;p&gt;For my other TextBlock which displays the contents of the Tweet, I change the font family to &lt;strong&gt;Segoe Print, &lt;/strong&gt;the foreground colour to a near-black and the font-size to 48.&lt;/p&gt; &lt;p&gt;Running my app, the UI currently looks like;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_14.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_13.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;It's looking a bit better (highly subjective! :-)) but the background is merging with the text so I think it's time to give that grid on my user control a background of its very own and maybe to apply a little drop-shadow to it as well repeating what I did earlier. &lt;/p&gt; &lt;p&gt;With that in place, the UI now looks like;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_15.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart4_E849/image_thumb_14.png" width="244" height="154"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Not too bad although it has a bunch of "problems" that I'll come back to later. &lt;/p&gt; &lt;p&gt;Enough of trying to "style" this &lt;strong&gt;ItemDisplayControl&lt;/strong&gt;, I'll move on to trying to style the ListBox and the items that it contains in the next post.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10902" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item><item><title>WPF and &amp;quot;Twistori&amp;quot;: Part 3</title><link>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10900.aspx</link><pubDate>Wed, 19 Nov 2008 11:19:58 GMT</pubDate><guid isPermaLink="false">c62f47b3-9054-4265-9c0c-549d811810c2:10900</guid><dc:creator>mtaulty</dc:creator><slash:comments>3</slash:comments><comments>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/comments/10900.aspx</comments><wfw:commentRss>http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/commentrss.aspx?PostID=10900</wfw:commentRss><description>&lt;p&gt;Following on &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/11/19/10897.aspx"&gt;from my previous post&lt;/a&gt;, I wanted to create a WPF UI around what I'd done so far.&lt;/p&gt; &lt;p&gt;I'll step through this one a little bit. Making a new project;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_thumb.png" width="244" height="163"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;adding a reference to my library for using twitter feeds;&lt;/p&gt; &lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_3.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_thumb_3.png" width="244" height="190"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;now I want my WPF Window to maximise itself on the screen and to be the topmost window so I'd play with settings to achieve that and change the Window title whilst I'm there (even if it's not displayed).&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt; &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="BlogPostTwistori.Window1"&lt;/span&gt;
    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;
    &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="Mike's Twistori-Like App"&lt;/span&gt;
    &lt;span class="attr"&gt;Topmost&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;
    &lt;span class="attr"&gt;WindowState&lt;/span&gt;&lt;span class="kwrd"&gt;="Maximized"&lt;/span&gt;
    &lt;span class="attr"&gt;WindowStyle&lt;/span&gt;&lt;span class="kwrd"&gt;="None"&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;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;Window&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Now maximised windows can be a pain to debug so I'd probably switch off &lt;strong&gt;Topmost&lt;/strong&gt; whilst I'm working on the code and also it'd be nice to have a way to get rid of the application by pressing the ESCape key. If WPF defined an &lt;strong&gt;ApplicationCommands.Exit&lt;/strong&gt; command then I think you'd be able to do this without writing any code but I don't think it has such a command. So...we can create one;&lt;/p&gt;&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CustomCommands
  {
    &lt;span class="kwrd"&gt;static&lt;/span&gt; CustomCommands()
    {
      exitCommand = &lt;span class="kwrd"&gt;new&lt;/span&gt; RoutedCommand(&lt;span class="str"&gt;"Exit"&lt;/span&gt;, &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(CustomCommands));
    }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; RoutedCommand Exit
    {
      get
      {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (exitCommand);
      }
    }
    &lt;span class="kwrd"&gt;static&lt;/span&gt; RoutedCommand exitCommand;
  }&lt;/pre&gt;
&lt;p&gt;and then we can add a binding for it to our Window (notice that we're bringing the local code namespace into the XAML here, I tend to use the prefix &lt;strong&gt;local&lt;/strong&gt; for that);&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt;
  &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="BlogPostTwistori.Window1"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;
  &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="Mike's Twistori-Like App"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:local&lt;/span&gt;&lt;span class="kwrd"&gt;="clr-namespace:BlogPostTwistori"&lt;/span&gt;
  &lt;span class="attr"&gt;Topmost&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowState&lt;/span&gt;&lt;span class="kwrd"&gt;="Maximized"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowStyle&lt;/span&gt;&lt;span class="kwrd"&gt;="None"&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;Window.InputBindings&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;KeyBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="ESC"&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&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;Window.InputBindings&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;Window.CommandBindings&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;CommandBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&lt;/span&gt;
      &lt;span class="attr"&gt;Executed&lt;/span&gt;&lt;span class="kwrd"&gt;="OnExit"&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;Window.CommandBindings&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;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;Window&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;and then we can add a handler for it;&lt;/p&gt;&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Window1 : Window
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; Window1()
    {
      InitializeComponent();
    }
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; OnExit(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, ExecutedRoutedEventArgs e)
    {
      Application.Current.Shutdown();
    }
  }&lt;/pre&gt;
&lt;p&gt;and so now we have a Window which can be closed by pressing the ESCape key (alongside the usual ALT+F4 and so on).&lt;/p&gt;
&lt;p&gt;Ok, so setting up our main window so that it gets some data from the Twitter feeds;&lt;/p&gt;&lt;pre class="csharpcode"&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Window1 : Window
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; Window1()
    {
      InitializeComponent();

      &lt;span class="kwrd"&gt;this&lt;/span&gt;.Loaded += OnLoaded;
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnLoaded(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
    {
      &lt;span class="rem"&gt;// TODO: Handle exceptions from config loading?&lt;/span&gt;
      SearchTermsConfiguration config = SearchTermsConfiguration.LoadFromConfig();

      feedManager = &lt;span class="kwrd"&gt;new&lt;/span&gt; AtomFeedManager(config, &lt;span class="kwrd"&gt;new&lt;/span&gt; TimeSpan(0, 0, 5));

      feedManager.FeedItemAvailable += OnFeedItemAvailable;
      feedManager.FeedItemUnavailable += OnFeedItemUnavailable;
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemAvailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemAvailableEventArgs args)
    {
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemUnavailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemUnavailableEventArgs args)
    {
    }
    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnExit(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, ExecutedRoutedEventArgs e)
    {
      Application.Current.Shutdown();
    }
    AtomFeedManager feedManager;
  }&lt;/pre&gt;
&lt;p&gt;It would now be handy to have somewhere to display my list of search terms. Adding a ListBox and some grid columns to the UI;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt;
  &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="BlogPostTwistori.Window1"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;
  &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="Mike's Twistori-Like App"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:local&lt;/span&gt;&lt;span class="kwrd"&gt;="clr-namespace:BlogPostTwistori"&lt;/span&gt;
  &lt;span class="attr"&gt;Topmost&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowState&lt;/span&gt;&lt;span class="kwrd"&gt;="Maximized"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowStyle&lt;/span&gt;&lt;span class="kwrd"&gt;="None"&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;Window.InputBindings&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;KeyBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="ESC"&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&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;Window.InputBindings&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;Window.CommandBindings&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;CommandBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&lt;/span&gt;
      &lt;span class="attr"&gt;Executed&lt;/span&gt;&lt;span class="kwrd"&gt;="OnExit"&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;Window.CommandBindings&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="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="mainGrid"&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.ColumnDefinitions&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;ColumnDefinition&lt;/span&gt;
        &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="0.2*"&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;ColumnDefinition&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.ColumnDefinitions&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;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="10"&lt;/span&gt;
      &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding}"&lt;/span&gt;
      &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="listSearchTerms"&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.ItemTemplate&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;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;CheckBox&lt;/span&gt;
              &lt;span class="attr"&gt;IsChecked&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding IsIncluded}"&lt;/span&gt;
              &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Term}"&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;DataTemplate&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.ItemTemplate&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;Window&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;and I need to make sure that my &lt;strong&gt;OnLoaded&lt;/strong&gt; function (or something) sets up the &lt;strong&gt;DataContext&lt;/strong&gt; for that &lt;strong&gt;ListBox&lt;/strong&gt; that's called &lt;strong&gt;listSearchTerms&lt;/strong&gt; as in this last line of code here;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnLoaded(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
    {
      &lt;span class="rem"&gt;// TODO: Handle exceptions from config loading?&lt;/span&gt;
      SearchTermsConfiguration config = SearchTermsConfiguration.LoadFromConfig();

      feedManager = &lt;span class="kwrd"&gt;new&lt;/span&gt; AtomFeedManager(config, &lt;span class="kwrd"&gt;new&lt;/span&gt; TimeSpan(0, 0, 5));

      feedManager.FeedItemAvailable += OnFeedItemAvailable;
      feedManager.FeedItemUnavailable += OnFeedItemUnavailable;

      listSearchTerms.DataContext = config;
    }&lt;/pre&gt;
&lt;p&gt;Ok...so I have something that runs and displays UI;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_4.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_thumb_4.png" width="244" height="135"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and that UI is bound to the right properties underneath so that should all work nicely. When a feed item arrives, I need something to display it in so let's add a quick user control;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_5.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_thumb_5.png" width="644" height="363"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and let's throw a little bit of UI in there as well;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&amp;lt;UserControl
  x:Class=&lt;span class="str"&gt;"BlogPostTwistori.ItemDisplayControl"&lt;/span&gt;
  xmlns=&lt;span class="str"&gt;"http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
  xmlns:x=&lt;span class="str"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&amp;gt;
  &amp;lt;Grid&amp;gt;
    &amp;lt;Grid.RowDefinitions&amp;gt;
      &amp;lt;RowDefinition
        Height=&lt;span class="str"&gt;"Auto"&lt;/span&gt; /&amp;gt;
      &amp;lt;RowDefinition /&amp;gt;
    &amp;lt;/Grid.RowDefinitions&amp;gt;
    &amp;lt;StackPanel
      Orientation=&lt;span class="str"&gt;"Horizontal"&lt;/span&gt;&amp;gt;
      &amp;lt;Image
        Stretch=&lt;span class="str"&gt;"Fill"&lt;/span&gt;
        MaxWidth=&lt;span class="str"&gt;"96"&lt;/span&gt;
        MaxHeight=&lt;span class="str"&gt;"96"&lt;/span&gt;
        Source=&lt;span class="str"&gt;"{Binding AuthorImageUri}"&lt;/span&gt; /&amp;gt;
      &amp;lt;TextBlock
        Text=&lt;span class="str"&gt;"{Binding Author}"&lt;/span&gt; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
    &amp;lt;TextBlock
      Grid.Row=&lt;span class="str"&gt;"1"&lt;/span&gt;
      TextWrapping=&lt;span class="str"&gt;"Wrap"&lt;/span&gt;
      Text=&lt;span class="str"&gt;"{Binding Title}"&lt;/span&gt; /&amp;gt;
  &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;
&lt;/pre&gt;
&lt;p&gt;And I'll define one of these controls on my main UI as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Window&lt;/span&gt;
  &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;="BlogPostTwistori.Window1"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;
  &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;="Mike's Twistori-Like App"&lt;/span&gt;
  &lt;span class="attr"&gt;xmlns:local&lt;/span&gt;&lt;span class="kwrd"&gt;="clr-namespace:BlogPostTwistori"&lt;/span&gt;
  &lt;span class="attr"&gt;Topmost&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowState&lt;/span&gt;&lt;span class="kwrd"&gt;="Maximized"&lt;/span&gt;
  &lt;span class="attr"&gt;WindowStyle&lt;/span&gt;&lt;span class="kwrd"&gt;="None"&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;Window.InputBindings&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;KeyBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="ESC"&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&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;Window.InputBindings&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;Window.CommandBindings&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;CommandBinding&lt;/span&gt;
      &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{x:Static local:CustomCommands.Exit}"&lt;/span&gt;
      &lt;span class="attr"&gt;Executed&lt;/span&gt;&lt;span class="kwrd"&gt;="OnExit"&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;Window.CommandBindings&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="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="mainGrid"&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.ColumnDefinitions&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;ColumnDefinition&lt;/span&gt;
        &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="0.2*"&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;ColumnDefinition&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.ColumnDefinitions&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;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="10"&lt;/span&gt;
      &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding}"&lt;/span&gt;
      &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="listSearchTerms"&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.ItemTemplate&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;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;CheckBox&lt;/span&gt;
              &lt;span class="attr"&gt;IsChecked&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding IsIncluded}"&lt;/span&gt;
              &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Term}"&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;DataTemplate&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.ItemTemplate&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;local:ItemDisplayControl&lt;/span&gt;
      &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="displayControl"&lt;/span&gt;
      &lt;span class="attr"&gt;Grid&lt;/span&gt;.&lt;span class="attr"&gt;Column&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;
      &lt;span class="attr"&gt;HorizontalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&lt;/span&gt;
      &lt;span class="attr"&gt;VerticalAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Center"&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;Window&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;and then I just need to make sure that when a FeedItem arrives I set it as the DataContext for this user control as in;&lt;/p&gt;&lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;void&lt;/span&gt; OnFeedItemAvailable(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, AtomFeedItemAvailableEventArgs args)
    {
      Dispatcher.BeginInvoke(&lt;span class="kwrd"&gt;new&lt;/span&gt; Action(() =&amp;gt;
        {
          displayControl.DataContext = args.FeedItem;
        }));
    }
&lt;/pre&gt;
&lt;p&gt;Note the switch to the dispatcher thread for this.&lt;/p&gt;
&lt;p&gt;Ok...with that in place, I have a working application - ok, it looks like a complete bag of spanners but it's working;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_6.png"&gt;&lt;img border="0" alt="image" src="http://mtaulty.com/blog/images/WPFandTwistoriPart3_E602/image_thumb_6.png" width="644" height="404"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Anyway...in the next post it'd be time to pop open Expression Blend and see if we can't make this look ever so slightly better.&lt;/p&gt;&lt;img src="http://mtaulty.com/CommunityServer/aggbug.aspx?PostID=10900" width="1" height="1"&gt;</description><category domain="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1012.aspx">WPF</category></item></channel></rss>