<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>UberDemo : Silverlight</title><link>http://blogs.msdn.com/uberdemo/archive/tags/Silverlight/default.aspx</link><description>Tags: Silverlight</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Gestalt 1.0 and Gestalt Widget Pack Launched!</title><link>http://blogs.msdn.com/uberdemo/archive/2009/11/20/gestalt-1-0-and-gestalt-widget-pack-launched.aspx</link><pubDate>Sat, 21 Nov 2009 00:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926564</guid><dc:creator>uberdemo</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/uberdemo/comments/9926564.aspx</comments><wfw:commentRss>http://blogs.msdn.com/uberdemo/commentrss.aspx?PostID=9926564</wfw:commentRss><description>&lt;P&gt;MIX Online has released a major update to the &lt;A href="http://www.visitmix.com/Labs/gestalt/" mce_href="http://www.visitmix.com/Labs/gestalt/"&gt;Gestalt&lt;/A&gt; project. Gestalt has now been incorporated directly into the&amp;nbsp;Dynamic Language Runtime (DLR).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Joshua Allen writes: Included&amp;nbsp;... are our sample video and audio widgets, which come with the Gestalt &lt;A href="http://www.visitmix.com/labs/gestalt/widgets/" mce_href="http://www.visitmix.com/labs/gestalt/widgets/"&gt;Widgets&lt;/A&gt; pack.&amp;nbsp; By adding a &amp;lt;script&amp;gt; tag to the top of your HTML file, you can automatically enable use of HTML5-compatible video and audio tag syntax:&lt;/P&gt;&lt;PRE&gt;&amp;lt;html&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;lt;head&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; src="http://mschnlnine.vo.llnwd.net/d1/dlr-20091120.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; src="http://mschnlnine.vo.llnwd.net/dlr/dlrmedia.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;lt;/head&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;lt;body&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;audio autoplay="false"&amp;gt;&lt;BR&gt;        &amp;lt;source src="foo.mp3" type="audio/mp3"&amp;gt;&amp;lt;/source&amp;gt;&lt;BR&gt;    &amp;lt;/audio&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;BR&gt;&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9926564" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/IronRuby/default.aspx">IronRuby</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/IronPython/default.aspx">IronPython</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Gestalt/default.aspx">Gestalt</category></item><item><title>Using Custom Namespaces at the Root of a XAML File</title><link>http://blogs.msdn.com/uberdemo/archive/2009/04/29/using-custom-namespaces-at-the-root-of-a-xaml-file.aspx</link><pubDate>Wed, 29 Apr 2009 21:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576187</guid><dc:creator>uberdemo</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/uberdemo/comments/9576187.aspx</comments><wfw:commentRss>http://blogs.msdn.com/uberdemo/commentrss.aspx?PostID=9576187</wfw:commentRss><description>&lt;P&gt;Here’s something I didn’t know about Silverlight, and I did not find any documentation on it. It’s possible to create custom namespaces at the root of a XAML file. I always knew that you could insert namespaces inline in XAML, but apparently when you define a namespace attribute in XAML it also applies to the root. Here’s a simple example:&lt;/P&gt;
&lt;P&gt;&amp;lt;myType:TreeMapPanelItem &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;x:Class="MIXOnline.Descry.Controls.CustomTreeMapItem" &lt;/P&gt;
&lt;P&gt;xmlns=&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml/presentation" mce_href="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;xmlns:x=&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml" mce_href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;xmlns:myType="clr-namespace:MIXOnline.Descry;assembly=Inaugural" &amp;gt; &lt;/P&gt;
&lt;P&gt;&amp;lt;TextBlock Text="Hello" /&amp;gt; &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;/myType:TreeMapPanelItem&amp;gt;&lt;/P&gt;
&lt;P&gt;This allows replacing of custom elements programmatically as was done in the CPP Custom Treemap sample in Descry which needed to inherit from a base TreeMapPanelItem class to pick up some of its default properties and methods. This could not have been done with a standard Silverlight class&amp;nbsp;since they cannot inherit from custom classes. See the &lt;A title="CPP TreeMap" href="http://descry.codeplex.com/SourceControl/changeset/view/15982#" mce_href="http://descry.codeplex.com/SourceControl/changeset/view/15982#"&gt;CPP TreeMap&lt;/A&gt; sample in Descry for an example and look to the CustomTreeMapItem class for an example of an implementation. Note the assignment of the PanelItemType property in the Page.xaml.cs file which lets the TreeMapItem know which class to use for rendering.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9576187" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/uberdemo/archive/tags/CodePlex/default.aspx">CodePlex</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Descry/default.aspx">Descry</category></item><item><title>A VirtualizedStackPanel Control in Silverlight 2.0</title><link>http://blogs.msdn.com/uberdemo/archive/2009/02/18/a-virtualizedstackpanel-control-in-silverlight-2-0.aspx</link><pubDate>Wed, 18 Feb 2009 18:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9431600</guid><dc:creator>uberdemo</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/uberdemo/comments/9431600.aspx</comments><wfw:commentRss>http://blogs.msdn.com/uberdemo/commentrss.aspx?PostID=9431600</wfw:commentRss><description>&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;When putting together the code for the &lt;/FONT&gt;&lt;A href="http://www.visitmix.com/Lab/Descry" mce_href="http://www.visitmix.com/Lab/Descry"&gt;&lt;FONT size=3 face=Calibri&gt;Descry&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; - &lt;/FONT&gt;&lt;A href="http://www.visitmix.com/labs/descry/socialtimeline/" mce_href="http://www.visitmix.com/labs/descry/socialtimeline/"&gt;&lt;FONT size=3 face=Calibri&gt;Social Timeline&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; visualization, I quickly discovered that when I subscribed to FriendFeed friends that contained large numbers of items, I eventually encountered performance issues. &lt;/FONT&gt;&lt;A href="http://friendfeed.com/scobleizer" mce_href="http://friendfeed.com/scobleizer"&gt;&lt;FONT size=3 face=Calibri&gt;Scobleizer&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;’s feed was a great acid test, since he had about &lt;/FONT&gt;&lt;A href="http://friendfeed.com/scobleizer/subscriptions" mce_href="http://friendfeed.com/scobleizer/subscriptions"&gt;&lt;FONT size=3 face=Calibri&gt;13K+&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; subscribers. We needed the Social Timeline to display, at a maximum, 3 months of subscriber data. I found as the total number of FriendFeed items approached 10K, scrolling and animating databound StackPanels became unacceptably slow. My opinion is that quick response time not only is a critical determining factor in user satisfaction, but also contributes to faster user feedback time and continuity, so that user can make better informed decisions.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;It can be argued that what I was attempting to do was an architectural design flaw, since we were attempting to use StackPanels to represent one days’ worth of stacked FriendFeed items; a total of 93 StackPanels for 3 months of data. However, we wished to retain the resizing and scaling properties of the StackPanels’ parent Grid control and it’s ColumnDefinitions, so that we would could avoid writing messy sizing/positioning logic, that the Grid control, conveniently, already has built-in. As a result we would need to find another method to gain performance. We ended up choosing control virtualization, since the sheer number of FriendFeed items is what was causing the slowness.&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;So, w&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt"&gt;hat do I mean by “virtualized control?” A&lt;/SPAN&gt; virtualized control is one that utilizes resources efficiently. You might ask: “Shouldn’t all controls utilize resources efficiently?” The answer to that is yes, but there are performance and behavior tradeoffs between a typical&amp;nbsp;control and a virtualized control. Non-virtualized controls have all the databound UI already in memory. Virtualized controls are specialized controls geared for managing large amounts of data that need to bind UI on the fly, and they take a performance hit when doing this. Also, you’ll note that when scrolling the content of the virtual StackPanel control in this project that it does not smoothly scroll up a pixel as a time as a normal ListBox does, instead it scrolls up one item at a time. This is not a limitation of a virtualized&amp;nbsp;control, but rather a limitation of this implementation. To implement this would take a bit more thought.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 12pt"&gt;&lt;FONT face=Calibri&gt;In other words, when a typical Silverlight control is databound to a data source that contains ten’s of thousand objects, it will literally contain ten’s of thousand UI elements in its’ visual tree; potentially using a vast amount of resources. The visual tree is maintained in memory (in addition to the original data source) whether the visual tree is onscreen or off! Conversely, a virtualized control while having access the to the data source in memory, would only contain the elements that need to be physically displayed within the viewable area of the control, resulting in a dramatically smaller set of items in the visual tree. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;This sample shows a virtualization technique for creating a scalable and performant ListBox-like control. There are two key classes: the VirtualizedStackPanel and the VirtualizedItemsControl. The &lt;B style="mso-bidi-font-weight: normal"&gt;source&lt;/B&gt; for this simple virtualized control is &lt;/FONT&gt;&lt;A href="http://www.hugli.org/code/virtualizedcontrol/virtualizedcontrol.zip" mce_href="http://www.hugli.org/code/virtualizedcontrol/virtualizedcontrol.zip"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;VirtualizedStackPanel Role&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;The VirtualizedStackPanel is a control that simply limits the number of children contained in its visual tree to only the items in the viewable area. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;This control alone is unable to display the data properly, since a scrollbar is needed to manage the position of the currently viewable area; the VirtualizedItemsControl takes care of that need.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;The VirtualizedStackPanel behaves as a normal StackPanel until a data generator is attached. The IDataGenerator implemented in the custom VirtualizedItemsControl lets the VirtualizedStackPanel know what children are currently in the active viewable area, based on control size and scrollbar position settings. As soon as the size of the control, or scrollbar position changes, the MeasureOverride method is called, and the control recalculates which children are to be added or removed from the visual tree. A ContentPresenter is acquired from the assigned data generator, so that a common DataTemplate can be used to define item UI. When the ContentPresenter Content property is set, the data is bound to the UI defined in the DataTemplate.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;The main logic in the VirtualizedStackPanel is in the MeasureOverride method, creates new containers if they are needed when the control height increases, or reuses containers if no new ones are needed, and also removes unnecessary containers of the control height decreases. The ArrangeOverride simply positions all the children in the StackPanel vertically.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;VirtualizedItemsControl Role&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;The VirtualizedItemsControl’s role is to act as a container for one or more Virtualized StackPanel’s. It manages the data source, a common DataTemplate that children use, and it also manages the Scrollbar positioning logic. The VirtualizedItemsControl implements the IDataGenerator interface that assists in communicating with its VirtualizedStackPanel children. This sample shows a single VirtualizedStackPanel child for brevity. But you may refer to the &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/descry/SourceControl/changeset/view/11246#186460" mce_href="http://www.codeplex.com/descry/SourceControl/changeset/view/11246#186460"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;VirtualizedTimelineItemsControl&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; in the &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/descry/Release/ProjectReleases.aspx?ReleaseId=22743" mce_href="http://www.codeplex.com/descry/Release/ProjectReleases.aspx?ReleaseId=22743"&gt;&lt;FONT size=3 face=Calibri&gt;Social Timeline project on CodePlex&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; for one that contains multiple children.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Incidentally, the VirtualizedItemsControl’s content is defined in the projects /Themes/Generic.xaml file, it could have been just as well defined procedurally, but it uses an external resource file for better designer / developer workflow. It is critical that this file exist in the project in the Themes folder, and note that this file needs to be&amp;nbsp;defined as a resource in the project to avoid errors. I made the Silverlight 2 newbie&amp;nbsp;mistake of not doing this, and I literally spent days trying to figure out why I couldn't get the project to work.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Resources&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;I found that writing a virtualized control wasn’t quite as complex as I had anticipated, after I broke down a much more complex sample. There is a good&amp;nbsp;example of a full Implementation of a VirtualListBox in the &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/SLExtensions" mce_href="http://www.codeplex.com/SLExtensions"&gt;&lt;FONT size=3 face=Calibri&gt;Silverlight Extensions&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; project on CodePlex. Another related WPF VirtualizedCanvas sample by Chris Lovett that I found useful is located &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/jgoldb/attachment/8116217.ashx" mce_href="http://blogs.msdn.com/jgoldb/attachment/8116217.ashx"&gt;&lt;FONT size=3 face=Calibri&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Descry and Codeplex&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;Visit &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/descry/Release/ProjectReleases.aspx?ReleaseId=22743" mce_href="http://www.codeplex.com/descry/Release/ProjectReleases.aspx?ReleaseId=22743"&gt;&lt;FONT size=3 face=Calibri&gt;CodePlex&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt; to download a more fully developed version of a virtualized control that supports mouse drag animation with physics, plus a VirtualizedListBox as well. And visit here to get the entire Descry project &lt;A title=source href="http://www.codeplex.com/descry" mce_href="http://www.codeplex.com/descry"&gt;source&lt;/A&gt;!&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9431600" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/FriendFeed/default.aspx">FriendFeed</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Virtual+Control/default.aspx">Virtual Control</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Descry/default.aspx">Descry</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Visualization/default.aspx">Visualization</category></item><item><title>Silverlight Slideshow (Part I)</title><link>http://blogs.msdn.com/uberdemo/archive/2006/12/13/wpf-e-slideshow-part-i.aspx</link><pubDate>Thu, 14 Dec 2006 01:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1278064</guid><dc:creator>uberdemo</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/uberdemo/comments/1278064.aspx</comments><wfw:commentRss>http://blogs.msdn.com/uberdemo/commentrss.aspx?PostID=1278064</wfw:commentRss><description>As a Software Design Engineer on the UberDemo team, I‘m very fortunate to be able to experiment with a large variety of technologies. Right now we’ve begun gearing up for MIX07, and so I was ask to put together a slideshow for the upcoming MIX07 site that utilizes the new&amp;nbsp;Silverlight technology, which just happened to be released to public on Dec 04, 2006 as the “December Community Technology Preview (CTP)”. Read &lt;A href="http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx" mce_href="http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx"&gt;more&lt;/A&gt; about Silverlight. 
&lt;P&gt;It is our team's goal to fully exploit our own technologies to create compelling prototypes and demos. Sometimes we like to push the boundaries of what a particular technology is capable of, to create an even better user experience (UX). We also typically provide feedback to the product teams, if we find issues, or feel strongly about a feature that we think needs to be added into a product early in development, or even sometimes to attempt to prevent cool features from being cut! 
&lt;P&gt;It’s my hope that readers of this blog will be able to learn from our experiences and avoid some of the pitfalls that we invariably run into when developing&amp;nbsp; demos on beta and pre-beta software. 
&lt;P&gt;In the demo that I am working on now (not complete yet), I was asked to create&amp;nbsp;&amp;nbsp;Silverlight app that cycled through a set of photos from Flickr. Silverlight, being a web friendly version of WPF, is well suited for consuming &lt;A href="http://www.flickr.com/services/api/" mce_href="http://www.flickr.com/services/api/"&gt;Flickr web services&lt;/A&gt;.&amp;nbsp;Silverlight itself doesn’t provide anything in the way of making web services easier to call, but it does provide a very performant rendering surface for the images. 
&lt;P&gt;I experimented with calling the web services using an HTTP &lt;A href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm" mce_href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm"&gt;REST&lt;/A&gt; request and requesting a JavaScript Object Notation (&lt;A href="http://en.wikipedia.org/wiki/JSON" mce_href="http://en.wikipedia.org/wiki/JSON"&gt;JSON&lt;/A&gt;) response in multiple ways, each with&amp;nbsp;advantages and disadvantages. Here are 3 ways I discovered: 
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://en.wikipedia.org/wiki/Xmlhttprequest" mce_href="http://en.wikipedia.org/wiki/Xmlhttprequest"&gt;XmlHTTPRequest&lt;/A&gt; object. &lt;B&gt;Advantage&lt;/B&gt;: Can run from web client. &lt;B&gt;Disadvantage&lt;/B&gt;: In IE, throws a warning when doing cross-domain calls and exposes the Flickr API key to anyone that views source. 
&lt;LI&gt;&lt;A href="http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html" mce_href="http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html"&gt;Client JavaScript Request&lt;/A&gt;. &lt;B&gt;Advantage&lt;/B&gt;: Can run from web client. &lt;B&gt;Disadvantage&lt;/B&gt;: &amp;nbsp;Cross-domain call without warning (see /// A SECURITY WARNING in &lt;A href="http://developer.yahoo.com/javascript/samples/dynamic/jsr_class.js" mce_href="http://developer.yahoo.com/javascript/samples/dynamic/jsr_class.js"&gt;jsr_class.js&lt;/A&gt;), and exposes the Flickr API key to anyone that views source. 
&lt;LI&gt;Using the .NET &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetWebRequestClassTopic.asp" mce_href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetWebRequestClassTopic.asp"&gt;WebRequest&lt;/A&gt; class from an ASP.NET page. &lt;B&gt;Advantage&lt;/B&gt;: Browser agnostic, doesn’t throw a cross-domain warning, and doesn’t expose the Flicker API key. &lt;B&gt;Disadvantage&lt;/B&gt;: requires a server component, and client-side/server-side code mingles and is a bit more convoluted. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I went with option #3 for this demo, although I haven’t yet experimented cross-browser yet WRT this. I’m sure that this would also affect #1 and #2. It is in my plans to do this though, to insure a robust application. 
&lt;P&gt;It also should be noted that all of the above methods can suffer equally from a script injection attack when a JSON response is returned and processed, so you &lt;U&gt;really&lt;/U&gt; need to trust your source web service provider. 
&lt;P&gt;Once I was able to get a list of images as a JSON object, I now wanted to iterate through them and display and animate them, however I ran into an issue with animation. The animation required moving an Image, or in my case a Rectangle filled with an ImageBrush, through an arbitrary set of points. The problem was that if I had a multiple storyboards only the first animation occurred. Fortunately I found a workaround to this&amp;nbsp;Silverlight bug [since fixed]. 
&lt;P&gt;&lt;A href="http://blogs.msdn.com/karstenj/archive/2006/12/13/animation-handoff-bug-and-workaround-for-current-wpf-e-ctp.aspx" mce_href="http://blogs.msdn.com/karstenj/archive/2006/12/13/animation-handoff-bug-and-workaround-for-current-wpf-e-ctp.aspx"&gt;Here&lt;/A&gt; are the specifics of the storyboard animation issue that Karsten Januszewski (a friend and fellow team member) posted for me to get it out there quickly. I wanted to get this out to a large audience so that others wouldn’t have to suffer the temporary confusion that I went through. 
&lt;P&gt;-Hans Hugli&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1278064" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Web+Services/default.aspx">Web Services</category><category domain="http://blogs.msdn.com/uberdemo/archive/tags/Silverlight/default.aspx">Silverlight</category></item></channel></rss>