<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlight &#124; WPF &#124; Microsoft.Net &#187; PhizzPop</title>
	<atom:link href="http://joel.neubeck.net/tag/phizzpop/feed/" rel="self" type="application/rss+xml" />
	<link>http://joel.neubeck.net</link>
	<description>Simplifing structure without changing results</description>
	<lastBuildDate>Wed, 26 May 2010 18:43:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Silverlight how-to:  Animate a grid of tiles</title>
		<link>http://joel.neubeck.net/2007/12/silverlight-how-to-animate-grid-of-tiles/</link>
		<comments>http://joel.neubeck.net/2007/12/silverlight-how-to-animate-grid-of-tiles/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 22:14:54 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[PhizzPop]]></category>
		<category><![CDATA[SplineDoubleKeyFrame]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/12/silverlight-how-to-dynamic-splinedoublekeyframe/</guid>
		<description><![CDATA[An integral part of our proof-of-concept for the Phizzpop design challenge was a grid of tiles that represented a variety of TV shows and Movies. Transitioning from screen to screen we needed to repopulate this grid with a new set of tiles based on search criteria and filters. To improve the effect of repopulating the [...]]]></description>
			<content:encoded><![CDATA[<p>An integral part of our proof-of-concept for the Phizzpop design challenge was a grid of tiles that represented a variety of TV shows and Movies.  Transitioning from screen to screen we needed to repopulate this grid with a new set of tiles based on search criteria and filters.  To improve the effect of repopulating the grid, we wanted to animate each tile as it was moved into its final position.  Nothing crazy was desired, just a simple movement from the left, easing into its final position.   </p>
<p>To achieve this effect, our initial approach was to hardcode a string of storyboard  XAML.  This animation was then inserted as a canvas resource  and played to animate the tile movement.  Programmatically, we would insert into a string of XAML the appropriate X and Y coordinates for each tiles final destination.  Here is an example of what our original approach looked like.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="c-sharp" style="font-family:monospace;">xaml += &quot;&lt;Storyboard xmlns=\http://schemas.microsoft.com/client/2007\&quot;;
    xaml +=&quot; xmlns:x=\&quot;http://schemas.microsoft.com/winfx/2006/xaml\&quot; x:Name=\&quot;&quot;;
    xaml += storyboardName + &quot;\&quot; Storyboard.TargetName=\&quot;&quot; + element.Name + &quot;\&quot; &gt; &quot;;
  xaml += &quot;  &lt;DoubleAnimation Storyboard.TargetProperty=\&quot;(Canvas.Left)\&quot; To=\&quot;&quot; ;
  xaml += currentX + &quot;\&quot; Duration=\&quot;0:0:0.25\&quot; /&gt;&quot;;
  xaml += &quot; &lt;DoubleAnimation Storyboard.TargetProperty=\&quot;(Canvas.Top)\&quot;  To=\&quot;&quot;;
  xaml +=  currentY + &quot;\&quot; Duration=\&quot;0:0:0.25\&quot; /&gt;&quot;;
xaml += &quot;&lt;/Storyboard&gt;&quot;;
&nbsp;
  Storyboard storyboard = (Storyboard)XamlReader.Load(xaml);
 _parentCanvas.Resources.Add(storyboard);
 storyboard.Begin();
….</pre></td></tr></table></div>

<p>Even though this approach met our visual need, we felt it was a poor use of XAML and made tweaking the animation of each tile very difficult.  Thanks to some great suggestions  from a mentor at Microsoft, we came up with a much more flexible approach.</p>
<p>Instead of programmatically loading custom storyboard XAML into the resource collection, we created a single storyboard and added it as a canvas resource within the &#8220;<a href="/wp-content/uploads/2007/12/tile.txt" target="_blank">tile.xaml</a>&#8220;.  This approach allowed us to use Blend to visualize the animation and manipulate its parameters until we got the desired easing and visual effect.</p>
<p>If you examine &#8220;<a href="/wp-content/uploads/2007/12/tile.txt" target="_blank">tile.xaml</a> there are a few things worth explaining.  First, each &#8220;SplineDoubleKeyFrame&#8221; element has been given a &#8220;x:Name&#8221;.  This name will be used to locate the appropriate &#8220;SplineDoubleKeyFrame&#8221; used to set the tiles destination X and Y &#8220;value&#8221;.   Second, each &#8220;DoubleAnimationUsingKeyFrames&#8221; element is targeting the &#8220;parentCanvas&#8221;.  In our tile class the top most canvas is named “parentCanvas”.  This is significant, because it allows us to animate the entire tile element regardless of the number of visual elements nested within the UserControls XAML.</p>
<p>To facilitate the process of manipulating each &#8220;SplineDoubleKeyFrame&#8221; we have created the following helper function and placed it within our tile class.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="c-sharp" style="font-family:monospace;">public void SetSplineXandY(string sbName, string keyFrameXName, double x, string keyFrameYName, double y)
{
    Storyboard sb = _parentCanvas.Resources.FindName(sbName) as Storyboard;
    SplineDoubleKeyFrame sdkY = sb.Children[0].FindName(keyFrameYName) as SplineDoubleKeyFrame;
    sdkY.Value = y;
&nbsp;
    SplineDoubleKeyFrame sdkX = sb.Children[0].FindName(keyFrameXName) as SplineDoubleKeyFrame;
    sdkX.Value = x;
 }</pre></td></tr></table></div>

<p>As we populate the grid with tiles, we call &#8220;SetSplineXandY&#8221; to modify the appropriate X and Y coordinates prior ton playing the storyboard.  Here is a snip of that code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="c-sharp" style="font-family:monospace;">foreach (Tile element in Children)
  {
  _Iteration++;
  if (currentX + element.Width + marginX * 2 &gt; panelWidth)
  {
   // move to next line
    currentX = 0 + marginX;
    currentY = nextRowY + marginY;
  }
  Storyboard sb = element.ParentCanvas.Resources.FindName(&quot;TileAnimation&quot;) as Storyboard;
  //this is moving it immediatly to the correct Y
  element.SetValue(Canvas.TopProperty, currentY);
  element.SetValue(Canvas.LeftProperty, -150);
  sb.Completed += new EventHandler(TransitionIn_Completed);
  element.SetSplineXandY(&quot;TileAnimation&quot;, &quot;keyFrameX&quot;, (currentX+150), &quot;keyFrameY&quot;, 0.0);
  sb.Begin();
  _TransitionsInOut.Add(sb);
&nbsp;
  // calculate offset for the next row
  nextRowY = Math.Max(nextRowY, currentY + element.Height + (marginY * 2));
&nbsp;
  // calculate position for the next element
  currentX += element.Width + (marginX * 2);                  
}</pre></td></tr></table></div>

<p>Since we are executing a series of asynchronous storyboards it is beneficial to have a way to identify that all of the animations have completed.  Individually, each storyboard fires a &#8220;Completed&#8221; event when it is finished.  Attaching to this event combined with a collection of executed storyboards references we can determine when all storyboard are done playing.</p>
<p>That’s it.  <a href="/wp-content/uploads/2007/12/DoubleAnimation.zip">Click here</a> to download a sample project that demonstrates this technique.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/12/silverlight-how-to-animate-grid-of-tiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Phizzpop LA design challenge</title>
		<link>http://joel.neubeck.net/2007/12/phizzpop-la-terralever/</link>
		<comments>http://joel.neubeck.net/2007/12/phizzpop-la-terralever/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 15:49:24 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Expression]]></category>
		<category><![CDATA[microsoft.net]]></category>
		<category><![CDATA[PhizzPop]]></category>
		<category><![CDATA[Terralever]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/12/phizzpop-loas-angles/</guid>
		<description><![CDATA[After 4 incredibly intense days, Microsoft&#8217;s Phizzpop LA design challenge is complete and Cynergy Systems is the winner. Congratulation&#8217;s Cynergy!  I was certainly disappointed that we did not win, but with only 7 minutes to present your strategy, design and concept everyone had a chance to win. After catching up on some overdue sleep, I [...]]]></description>
			<content:encoded><![CDATA[<p>After 4 incredibly intense days, Microsoft&#8217;s Phizzpop LA design challenge is complete and <a href="http://www.cynergysystems.com/" title="Cynergy Systems" target="_blank">Cynergy Systems</a> is the winner.   Congratulation&#8217;s Cynergy!  I was certainly disappointed that we did not win, but with only 7 minutes to present your strategy, design and concept everyone had a chance to win.</p>
<p>After catching up on some overdue sleep, I can say that although it was extremely  intense (only 20 hours of sleep this past week), it was an incredible experience.  My teammates <a href="http://www.smcandrew.com/" title="Scott McAndrew">Scott McAndrew</a> and <a href="http://www.facebook.com/profile.php?id=754185444">Craig Budwitz</a>  were amazing,  and I am extremely happy with our Silverlight 1.1 prototype.</p>
<blockquote><p>LA 2007 Design Problem:</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2007/11/phizzpop_logo.gif" rel="lightbox[pics84]" title="phizzpop_logo.gif"><img src="http://joel.neubeck.net/wp-content/uploads/2007/11/phizzpop_logo.gif" alt="phizzpop_logo.gif" height="58" width="100" /></a>You and your team have just been hired by a consortium representing all of the major Movie and Television studios.  Your team constitutes the Office of the President of Products.  You are responsible for determining the product strategy for this consortium.  While your authority is considerable, it is not absolute.</p>
<p>You must pitch your product solution to the Board of Directors, also known as the Judges.</p>
<p>The media industry is facing an unprecedented set of challenges today.  Digital distribution, a dramatic reduction in traditional advertising, the rise of social networks such as MySpace and Facebook and other factors have all combined to force a fundamental rethinking of the entertainment industry.</p>
<p>Your job is to:</p>
<ul>
<li>Find new ways to monetize the deep catalog of content that the consortium has.  You should specifically be thinking beyond simply pay per download, subscriptions or advertising</li>
<li>Look for new ways to create fans of our content.  Sites like MySpace and Facebook (among others) have shown us that social networks are powerful tools.  Figure out how to exploit the principles of social networking, integrate into existing networks, or both</li>
<li>Look for ways to exploit the Long Tail.  The consortium has a fantastic amount of old content that’s very valuable to many people.  Figure out how to best help our users find existing content, discover other content, and share this with friends</li>
<li>Figure out the device &amp; platform landscape.  Between iTunes, the iPod, Zune, Media Center, UnBox, Xbox Live, Joost, and everything else, it’s difficult to understand the overall experience system for our users.  Explore creating your own, partnering, or both</li>
</ul>
</blockquote>
<p>As you can see from the design problem, it is very deep.  Executing on each of these points in a working Silverlight prototype, in a mere 3.5 days, is an impossible task. Terralever put forth a strong effort, here is a series of <a href="/wp-content/uploads/2007/12/goPlay/goPlay.html" target="_blank">captures</a> from our working prototype.</p>
<p>Sometime next week I will post a link to the live prototype  as well as some posts on Silverlight 1.1 techniques we used to build the appliction.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/12/phizzpop-la-terralever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PhizzPop Design Challenge</title>
		<link>http://joel.neubeck.net/2007/11/phizzpop-design-challenge/</link>
		<comments>http://joel.neubeck.net/2007/11/phizzpop-design-challenge/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 00:06:28 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Terralever]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Expression]]></category>
		<category><![CDATA[PhizzPop]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/11/phizzpop-design-challenge/</guid>
		<description><![CDATA[The PhizzPop Design Challenge pits top interactive, Web, and design agencies against one another to push the limits of technology and creativity in a battle royale. Think Mad Max for design. The regional teams have been selected and Terralever was selected.  To get prepared Scott, Craig and Myself will be attending two days of training [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://joel.neubeck.net/wp-content/uploads/2007/11/phizzpop_logo.gif" rel="lightbox[pics-1196379745]" title="phizzpop_logo.gif"><img src="http://joel.neubeck.net/wp-content/uploads/2007/11/phizzpop_logo.gif" alt="phizzpop_logo.gif" class="imageframe imgalignleft" height="151" width="259" /></a>The PhizzPop Design Challenge pits top interactive, Web, and design agencies  against one another to push the limits of technology and creativity in a battle  royale. Think Mad Max for design.</p>
<p>The regional teams have been selected and Terralever was selected.  To get prepared Scott, Craig and Myself will be attending two days of training in Los Angeles on Microsoft Expression Blend, WPF and Silverlight.  On December 3rd the Terralever team will be given a design problem and will have 3 days to come up with a solution.  On the fourth day we will return to Los Angeles and present our design to a panel of judges.  The winners will compete at the finals in Austin March 8th 2007 at this years SxSW conference.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/11/phizzpop-design-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
