<?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>Peter Gerritsen&#039;s blog &#187; Silverlight</title>
	<atom:link href="http://blog.petergerritsen.nl/tag/silverlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.petergerritsen.nl</link>
	<description>about .Net and SharePoint development</description>
	<lastBuildDate>Wed, 28 Jul 2010 08:28:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Silverlight: Multiple animations on one property through Transforms</title>
		<link>http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 12:44:39 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/</guid>
		<description><![CDATA[When you create two or more animations that work on the same property of an object, Silverlight will only use the last of the defined animations. By using transforms you’re able to achieve the same effect anyway. For instance, I’ve got a rectangle that slides up and down by using an animation that works on the Canvas.Top property: [...]<p><a href="http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/">Silverlight: Multiple animations on one property through Transforms</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>When you create two or more animations that work on the same property of an object, Silverlight will only use the last of the defined animations.</p>
<p>By using transforms you’re able to achieve the same effect anyway. For instance, I’ve got a rectangle that slides up and down by using an animation that works on the Canvas.Top property:</p>
<pre class="brush: xml">
&lt;userControl x:Class=&quot;TestAnimationTransform.MainPage&quot;
xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot; xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
mc:Ignorable=&quot;d&quot; d:DesignWidth=&quot;640&quot; d:DesignHeight=&quot;480&quot;&gt;
&lt;userControl.Resources&gt;
&lt;storyboard x:Name=&quot;WaveTop&quot; AutoReverse=&quot;True&quot; RepeatBehavior=&quot;Forever&quot;&gt;
&lt;doubleAnimationUsingKeyFrames x:Name=&quot;WaveAnimationTop&quot; BeginTime=&quot;00:00:00&quot; Storyboard.TargetName=&quot;Rectangle&quot; Storyboard.TargetProperty=&quot;(canvas.top)&quot;&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:00&quot; Value=&quot;50&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:10&quot; Value=&quot;400&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;/doubleAnimationUsingKeyFrames&gt;
&lt;/storyboard&gt;
&lt;/userControl.Resources&gt;
&lt;canvas x:Name=&quot;LayoutRoot&quot;&gt;
&lt;rectangle x:Name=&quot;Rectangle&quot; Fill=&quot;Blue&quot; Width=&quot;50&quot; Height=&quot;50&quot; Canvas.Top=&quot;240&quot; Canvas.Left=&quot;200&quot;&gt;
&lt;/rectangle&gt;
&lt;/canvas&gt;
&lt;userControl&gt;
</pre>
<p>This will create an effect like this:</p>
<div id="silverlightControlHost"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="500" height="550"><param name="source" value="/wp-content/uploads/TestAnimationTransformSimple.xap"/><param name="background" value="white" /><param name="minRuntimeVersion" value="2.0.40115.0" /><param name="autoupgrade" value="true" /><param name="enableHtmlAccess" value="true" /><a href="http://go.microsoft.com/fwlink/?LinkID=149156" style="text-decoration: none;"><img src="/wp-content/uploads/sl4wp-ph.png" alt="Install Microsoft Silverlight" style="border-style: none; width:400px; height:200px"/></a></object><iframe style="visibility:hidden;height:0;width:0;border:0px" id="_sl_historyFrame"></iframe></div>
<p>If I want to apply an animation that jiggles the rectangle back and forth over the X- and Y-axis, I can’t use the Canvas.Top property anymore. So instead, we’ll add a Transform to the object and animate the properties of the Transform:</p>
<pre class="brush: xml">
&lt;storyboard x:Name=&quot;WaveJiggle&quot; AutoReverse=&quot;True&quot; RepeatBehavior=&quot;Forever&quot;&gt;
&lt;doubleAnimationUsingKeyFrames x:Name=&quot;XAnimation&quot; BeginTime=&quot;00:00:00&quot; Storyboard.TargetName=&quot;TranslateTransform&quot; Storyboard.TargetProperty=&quot;X&quot;&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:00&quot; Value=&quot;20&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:01&quot; Value=&quot;80&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;/doubleAnimationUsingKeyFrames&gt;
&lt;doubleAnimationUsingKeyFrames x:Name=&quot;YAnimation&quot; BeginTime=&quot;00:00:00&quot; Storyboard.TargetName=&quot;TranslateTransform&quot; Storyboard.TargetProperty=&quot;Y&quot;&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:00&quot; Value=&quot;20&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;easingDoubleKeyFrame KeyTime=&quot;00:00:01&quot; Value=&quot;80&quot;&gt;
&lt;easingDoubleKeyFrame.EasingFunction&gt;
&lt;sineEase EasingMode=&quot;EaseInOut&quot;/&gt;
&lt;/easingDoubleKeyFrame.EasingFunction&gt;
&lt;/easingDoubleKeyFrame&gt;
&lt;/doubleAnimationUsingKeyFrames&gt;
&lt;/storyboard&gt;
&lt;rectangle x:Name=&quot;Rectangle&quot; Fill=&quot;Blue&quot; Width=&quot;50&quot; Height=&quot;50&quot; Canvas.Top=&quot;240&quot; Canvas.Left=&quot;200&quot;&gt;
&lt;rectangle.RenderTransform&gt;
&lt;translateTransform X=&quot;50&quot; Y=&quot;50&quot; x:Name=&quot;TranslateTransform&quot;/&gt;
&lt;/rectangle.RenderTransform&gt;
&lt;/rectangle&gt;
</pre>
<p>The result of this will look like the following:</p>
<div id="silverlightControlHost"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="500" height="550"><param name="source" value="/wp-content/uploads/TestAnimationTransform.xap"/><param name="background" value="white" /><param name="minRuntimeVersion" value="2.0.40115.0" /><param name="autoupgrade" value="true" /><param name="enableHtmlAccess" value="true" /><a href="http://go.microsoft.com/fwlink/?LinkID=149156" style="text-decoration: none;"><img src="/wp-content/uploads/sl4wp-ph.png" alt="Install Microsoft Silverlight" style="border-style: none; width:400px; height:200px"/></a></object><iframe style="visibility:hidden;height:0;width:0;border:0px" id="_sl_historyFrame"></iframe></div>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Twitter" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms&#038;c=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/" title="Add 'Silverlight: Multiple animations on one property through Transforms' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to MySpace" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/&#038;title=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Del.icio.us" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/&#038;title=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms" title="Add 'Silverlight: Multiple animations on one property through Transforms' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to digg" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to digg" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/&#038;t=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms" title="Add 'Silverlight: Multiple animations on one property through Transforms' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to FaceBook" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Technorati" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/&#038;title=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Stumble Upon" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/&#038;title=Silverlight%3A+Multiple+animations+on+one+property+through+Transforms" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Silverlight: Multiple animations on one property through Transforms' to Google Bookmarks" alt="Add 'Silverlight: Multiple animations on one property through Transforms' to Google Bookmarks" /></a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/">Silverlight: Multiple animations on one property through Transforms</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2009%2F09%2F03%2Fsilverlight-multiple-animations-on-one-property-through-transforms%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2009/09/03/silverlight-multiple-animations-on-one-property-through-transforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a 3D tagcloud in Silverlight (part 2)</title>
		<link>http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 09:49:04 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/</guid>
		<description><![CDATA[In part 1 I showed you how to create the basics for a 3D tagcloud in Silverlight. In this part I’ll show how to get the tags from your html for inserting it into a blog template, we’ll change the color of the tag based on the weight of the tag and let the hyperlink button actually function as [...]<p><a href="http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/">Creating a 3D tagcloud in Silverlight (part 2)</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In <a  href="http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/" target="_blank">part 1</a> I showed you how to create the basics for a 3D tagcloud in Silverlight. In this part I’ll show how to get the tags from your html for inserting it into a blog template, we’ll change the color of the tag based on the weight of the tag and let the hyperlink button actually function as a hyperlink (until now it does nothing when you click on it).</p>
<p>There are a few different ways you can pass or get information from the page the Silverlight control is hosted in:</p>
<ul>
<li> Set the initParams parameter in the Silverlight object definition</li>
<li> Read the HtmlDocument in your Silverlight code</li>
<li> Use JavaScript to call methods in your Silverlight code</li>
</ul>
<p>You can only use the first option if your hosting your Silverlight application on the same domain. When using the hosting service on silverlight.live.com, no interaction between your application and HTML page is allowed.</p>
<p>For the second option you can use the HtmlPage object in your code to traverse through the HTML DOM, basic methods such as GetElementById are available.</p>
<p>The last option is the one I’ll be using in this post. To accomplish this you need to follow a few steps:</p>
<ul>
<li> Decorate your page class with a &#8220;ScriptableType” attribute</li>
<li> Decorate the method you want to call with the “ScriptableMember” attribute and make sure it’s public</li>
<li> Register your object in the HtmlPage</li>
<li> Give your Silverlight object definition an id, so you can easily reference it from your JavaScript</li>
</ul>
<p>The reason I’m going with this technique is the flexibility it provides when you want to reuse the tagcloud in other applications. Every blog engine has a different way to generate the HTML for a tagcloud, my blog just shows a list of tags.</p>
<p>To change the color based on the weight and set the url of the HyperlinkNutton we need to make some changes to the Tag3D object I showed you in the last post:</p>
<pre class="brush: csharp">
public class Tag3D
{
public HyperlinkButton btnLink { get; set; }
private TextBlock textBlock { get; set; }
public Point3D centerPoint { get; set; }
private Color TagColor { get; set; }

public Tag3D(double x, double y, double z, string text, string url, Color tagColor, int weight)
{
centerPoint = new Point3D(x, y, z);
textBlock = new TextBlock();
textBlock.Text = string.Format(&quot;{0} ({1})&quot;, text, weight);
btnLink = new HyperlinkButton();
btnLink.Content = textBlock;
btnLink.NavigateUri = new Uri(url);
this.TagColor = tagColor;
}

public void Redraw(double xOffset, double yOffset)
{
double zFactor = ((centerPoint.Z + 300) / 450.0);
btnLink.FontSize = 30.0 * zFactor;
double alpha = zFactor * 255;
//Debug.WriteLine(&quot;Z: {0}; zFactor: {1}; alpha: {2}&quot;, centerPoint.Z, zFactor, alpha);
btnLink.Foreground = new SolidColorBrush(Color.FromArgb(Convert.ToByte(alpha), TagColor.R, TagColor.G, TagColor.B));

Canvas.SetLeft(btnLink, centerPoint.X + xOffset - (btnLink.ActualWidth / 2));
Canvas.SetTop(btnLink, -centerPoint.Y + yOffset - (btnLink.ActualHeight/ 2));
Canvas.SetZIndex(btnLink, Convert.ToInt32(centerPoint.Z));
}
}
</pre>
<p>In the constructor we now pass in the url and a Color to show when the tag is the most important (I chose to use a scale of 1 to 10, with 10 being the most important).<br />
The url is simply assigned to the NavigateUrl property of the HyperlinkButton. The Color is used when setting the new Foreground Brush. I also made some modifications in the calculations of the font size and alpha of the Brush to make it look a bit more realistic.<br />
To let the JavaScript in the page add the tags I’ve created a AddTag method and decorated it with the ScriptableMember attribute:</p>
<pre class="brush: csharp">
[ScriptableMember()]
public void AddTag(string tag, string url, int weight)
{
if (weight &gt; 10)
weight = 10;

Color color = new Color();

color.R = Convert.ToByte(Math.Round(209.0 * ( weight / 10.0)));

color.G = Convert.ToByte(Math.Round(18.0 * (weight / 10.0)));

color.B = Convert.ToByte(Math.Round(65.0 * (weight / 10.0)));

tagBlocks.Add(new Tag3D(0.0, 0.0, 0.0, tag, url, color));
}
</pre>
<p>In this method we calculate the Color of the tag based on the weight. Then we add a new tag to the tagBlocks List&lt;Tag3D&gt;.</p>
<p>After calling this method a couple of times we need to place the tags and display them. I’ve changed the FillTags method shown in the previous post and renamed it to ProcessTags to make the name a bit more meaningful:</p>
<pre class="brush: csharp">
[ScriptableMember()]
public void ProcessTags()
{

double radius = RootCanvas.Width / 3;

int max = tagBlocks.Count;

double phi = 0;

double theta = 0;

for (int i = 1; i &lt; max + 1; i++)

{

phi = Math.Acos(-1.0 + (2.0 * i – 1.0) / max);

theta = Math.Sqrt(max * Math.PI) * phi;

double x = radius * Math.Cos(theta) * Math.Sin(phi);

double y = radius * Math.Sin(theta) * Math.Sin(phi);

double z = radius * Math.Cos(phi);
Tag3D tag = tagBlocks[i -1];

tag.centerPoint = new Point3D(x, y, z);

tag.Redraw(RootCanvas.Width / 2, RootCanvas.Height / 2);

RootCanvas.Children.Add(tag.btnLink);
}
}
</pre>
<p>We need one more thing to make the methods callable from JavaScript. Register the<br />
object with the HtmlPage in the constructor:</p>
<pre class="brush: csharp">
HtmlPage.RegisterScriptableObject(&quot;TagCloud&quot;, this);
</pre>
<p>No you can call the methods from JavaScript:</p>
<pre class="brush: javascript">
function addTags() {
var control = document.getElementById(&quot;Xaml1&quot;);
control.content.TagCloud.AddTag(&quot;Silverlight&quot;, &quot;http://silverlight.net&quot;, 5);
control.content.TagCloud.AddTag(&quot;Tagcloud&quot;, &quot;http://blogs.tamtam.nl&quot;, 2);
control.content.TagCloud.AddTag(&quot;Tam Tam&quot;, &quot;http://www.tamtam.nl&quot;, 10);
control.content.TagCloud.AddTag(&quot;Axelerate3D&quot;, &quot;http://www.codeplex.com&quot;, 8);
control.content.TagCloud.AddTag(&quot;WPF&quot;, &quot;http://www.microsoft.com&quot;, 1);
control.content.TagCloud.AddTag(&quot;SharePoint&quot;, &quot;http://www.microsoft.com&quot;, 4);
control.content.TagCloud.ProcessTags(); }
</pre>
<p>I’m just attaching some code to the onclick of a button and hard-coding the tags. Normally you would handle the onload of the document (or better yet the $(document).ready in jQuery) and get your tags from the Html to pass them to the Silverlight object.</p>
<p>And that wraps it up for this tutorial.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Twitter" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29&#038;c=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to MySpace" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Del.icio.us" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to digg" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to digg" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/&#038;t=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to FaceBook" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Technorati" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Stumble Upon" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+2%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Google Bookmarks" alt="Add 'Creating a 3D tagcloud in Silverlight (part 2)' to Google Bookmarks" /></a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/">Creating a 3D tagcloud in Silverlight (part 2)</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2009%2F02%2F19%2Fcreating-a-3d-tagcloud-in-silverlight-part-2%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Creating a 3D tagcloud in Silverlight (part 1)</title>
		<link>http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 23:02:38 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/</guid>
		<description><![CDATA[When I saw the wp-cumulus plugin by Roy Tanck, I thought it would be a great idea to implement the same sort of functionality in Silverlight. It’s hardly original but allows me to learn some parts of the Silverlight framework. The components behind it are quite simple: Get (or send) the tags from your HTML page to the [...]<p><a href="http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/">Creating a 3D tagcloud in Silverlight (part 1)</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>When I saw the <a  href="http://www.roytanck.com/2008/03/15/wp-cumulus-released/" target="_blank">wp-cumulus plugin by Roy Tanck</a>, I thought it would be a great idea to implement the same sort of functionality in Silverlight. It’s hardly original but allows me to learn some parts of the Silverlight framework.</p>
<p>The components behind it are quite simple:</p>
<ul>
<li> Get (or send) the tags from your HTML page to the Silverlight usercontrol</li>
<li> Render the tags so it looks 3D</li>
<li> Create a method to rotate the tags based on the position of your mouse</li>
</ul>
<h4>Choosing a 3D library</h4>
<p>The current version of Silverlight doesn’t include 3D functionality like WPF does through the <a  href="http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.aspx" target="_blank">Media3D namespace</a>. Fortunately some developers implemented the same functionality in libraries for Silverlight. The main options I found were Kit3D and Axelerate3D. I decided to use the last one because that one mimics the RotateTransform3D class in WPF 3D the best (it contains a TryTransform method).</p>
<h4>Rendering the tags</h4>
<p>I decided to tackle the second item first, because if I wasn’t able to manage this, the other items wouldn’t be very useful.</p>
<p>To create a tag in 3D you need some basic functionality:</p>
<ul>
<li> A way to store it’s x, y and z coordinates</li>
<li> A hyperlinkbutton to redirect to a page that shows all the items with that tag</li>
<li> A textblock to display the tag</li>
</ul>
<pre class="brush: csharp">
public class Tag3D
{
public Tag3D(double x, double y, double z, string text)
{
centerPoint = new Point3D(x, y, z);
textBlock = new TextBlock();
textBlock.Text = text;
btnLink = new HyperlinkButton();
btnLink.Content = textBlock;
}

public HyperlinkButton btnLink { get; set; }

public TextBlock textBlock { get; set; }

public Point3D centerPoint { get; set; }

}
</pre>
<p>Then we need a way to make it look like it’s rendered in 3D. We do that by changing the fontsize and the opacity of the text. For that I created a method Redraw:</p>
<pre class="brush: csharp">
public void Redraw(double xOffset, double yOffset)
{
double posZ = centerPoint.Z + 200;
btnLink.FontSize = 10 * (posZ / 100);
double alpha = centerPoint.Z + 200;
if (alpha &gt; 255)
alpha = 255;

if (alpha &lt; 0)
alpha = 0;

btnLink.Foreground = new SolidColorBrush(Color.FromArgb(Convert.ToByte(alpha), 0, 0, ));
Canvas.SetLeft(btnLink, centerPoint.X + xOffset – (btnLink.ActualWidth / 2));
Canvas.SetTop(btnLink, -centerPoint.Y + yOffset – (btnLink.ActualHeight/ 2));
Canvas.SetZIndex(btnLink, Convert.ToInt32(centerPoint.Z));
}
</pre>
<h5>Placing the tags</h5>
<p>To distribute the tags evenly over the sphere, we need some math. Luckily someone was way ahead of me and posted a useful <a  href="http://blog.massivecube.com/?p=9." target="_blank">blogentry</a> on this subject (this technique is also used in the wp-cumulus plugin).</p>
<p>The following method creates and places the tags in the canvas:</p>
<pre class="brush: csharp">
private void FillTags()
{
tagBlocks = new List&lt;tag3D&gt;();

string[] tags = new string[] { “Silverlight”,
“WPF”,
“3D”,
“Rotation”,
“SharePoint”,
“.Net”,
“C#”,
“Transform”,
“Blog”,
“TagCloud”,
“Tam Tam”,
“Axelerate3D”,
“MOSS”,
“Math”};

double radius = RootCanvas.Width / 3;
int max = tags.Length;
double phi = 0;
double theta = 0;

for (int i = 1; i &lt; max + 1; i++)
{
phi = Math.Acos(-1.0 + (2.0 * i – 1.0) / max);
theta = Math.Sqrt(max * Math.PI) * phi;
double x = radius * Math.Cos(theta) * Math.Sin(phi);
double y = radius * Math.Sin(theta) * Math.Sin(phi);
double z = radius * Math.Cos(phi);

Tag3D tag = new Tag3D(x, y, z, tags[i -1]);
tag.Redraw(RootCanvas.Width / 2, RootCanvas.Height / 2);
RootCanvas.Children.Add(tag.btnLink);
tagBlocks.Add(tag);
}
}
</pre>
<p>At the moment the tags to render are hard-coded but we’ll sort that out in part 2.</p>
<p><strong>Rotating the tags</strong></p>
<p>To rotate the tags we will use the position of the mouse as a starting point. When the mousepointer is in the center the tagcloud will remain in the current position. Once the mouse is further away from the centerpoint we’ll increase the rotationspeed. The location of the mousepointer compared to the centerpoint will set the angle of the rotation.</p>
<p>First we will set the rotation when the tagcloud loads:</p>
<pre class="brush: csharp">
void TagCloud_Loaded(object sender, RoutedEventArgs e)
{
FillTags();
rotateTransform = new RotateTransform3D();
rotateTransform.Rotation = new AxisAngleRotation3D(new Vector3D(1.0, 0.0, 0.0), 0);
CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
LayoutRoot.MouseEnter += new MouseEventHandler(LayoutRoot_MouseEnter);
LayoutRoot.MouseLeave += new MouseEventHandler(LayoutRoot_MouseLeave);
}
</pre>
<p>Here we set the rotation angle to 0 and the rotationaxis to the x-axis. When the mouse moves, we’ll change those parameters, so the rotation will have an effect:</p>
<pre class="brush: csharp">
void LayoutRoot_MouseMove(object sender, MouseEventArgs e)
{
Point mouseLocation = e.GetPosition(RootCanvas);
double relativeX = mouseLocation.X – (RootCanvas.ActualWidth / 2);
double relativeY = mouseLocation.Y – (RootCanvas.ActualHeight / 2);
MouseX.Text = relativeX.ToString();
MouseY.Text = relativeY.ToString();
double speed = Math.Sqrt(Math.Pow(relativeX, 2) + Math.Pow(relativeY, 2)) / 170;
RotationSpeed.Text = speed.ToString();
rotateTransform.Rotation = new AxisAngleRotation3D(new Vector3D(relativeY, relativeX, 0), speed);
}
</pre>
<p>To trigger the movement, we have to capture the MouseEnter and MouseLeave events:</p>
<pre class="brush: c#">
void LayoutRoot_MouseLeave(object sender, MouseEventArgs e)
{
     LayoutRoot.MouseMove -= LayoutRoot_MouseMove;
     runRotation = false;
}

void LayoutRoot_MouseEnter(object sender, MouseEventArgs e)
{
     LayoutRoot.MouseMove += new MouseEventHandler(LayoutRoot_MouseMove);
     runRotation = true;
}
</pre>
<p>Now that the rotationparameters are set we need to rotate the tags, or more precisely the centerpoint of the tag. To accomplish this we’ll make use of the Rendering event of the CompositionTarget object. This is called everytime the Silverlight plugin wants to render a new frame.</p>
<pre class="brush: csharp">
void CompositionTarget_Rendering(object sender, EventArgs e)
{
    if (runRotation)
    {
        if (((AxisAngleRotation3D)rotateTransform.Rotation).Angle &gt; 0.05)
        RotateBlocks();
    }
}

private void RotateBlocks()
{
foreach (Tag3D textBlock in tagBlocks)
{
Point3D newPoint;
if (rotateTransform.TryTransform(textBlock.centerPoint, out newPoint))
{
textBlock.centerPoint = newPoint;
textBlock.Redraw(RootCanvas.ActualWidth / 2, RootCanvas.ActualHeight / 2);
}
}
}
</pre>
<p>To relieve the CPU a bit, we’ll only rotate the tags if the rotation angle is higher than a threshold value. The actual transformation is accomplished by invoking the TryTransform method and passing it the current centerpoint of each tag.</p>
<p>At the moment the Silverlight control looks like this:</p>
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="500px" height="500px"><param name="source" value="/wp-content/uploads/3DTagCloudStep1.xap" /><param name="background" value="white" /><param name="minRuntimeVersion" value="2.0.40115.0" /><param name="autoupgrade" value="true" /><param name="enableHtmlAccess" value="true" /><param name="src" value="data:application/x-silverlight-2," /></object></div>
<p>In the <a  href="http://blog.petergerritsen.nl/2009/02/19/creating-a-3d-tagcloud-in-silverlight-part-2/" target="_blank">next part</a> I’ll show you a way to dynamically set the tags, base their fontsize on the actual weight of the tag and actually use the hyperlink button.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Twitter" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29&#038;c=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to MySpace" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Del.icio.us" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to digg" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to digg" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/&#038;t=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to FaceBook" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Technorati" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Stumble Upon" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/&#038;title=Creating+a+3D+tagcloud+in+Silverlight+%28part+1%29" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Google Bookmarks" alt="Add 'Creating a 3D tagcloud in Silverlight (part 1)' to Google Bookmarks" /></a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/">Creating a 3D tagcloud in Silverlight (part 1)</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2009%2F02%2F14%2Fcreating-a-3d-tagcloud-in-silverlight-part-1%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2009/02/14/creating-a-3d-tagcloud-in-silverlight-part-1/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Hosting your Silverlight application and media in the cloud</title>
		<link>http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 22:34:01 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/</guid>
		<description><![CDATA[Update: The Silverlight Streaming beta has ended. If you want to host your Silverlight apps on Microsoft&#8217;s infrastructure and video&#8217;s check out Windows Azure Microsoft now offers a service called Silverlight Streaming for hosting your Silverlight content in the cloud. At the moment the service is in beta and you get a whopping 10 GB of storagespace [...]<p><a href="http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/">Hosting your Silverlight application and media in the cloud</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Update: The Silverlight Streaming beta has ended. If you want to host your Silverlight apps on Microsoft&#8217;s infrastructure and video&#8217;s check out Windows Azure</p>
<p>Microsoft now offers a service called <a  href="http://silverlight.live.com/" target="_blank">Silverlight Streaming</a> for hosting your Silverlight content in the cloud. At the moment the service is in beta and you get a whopping 10 GB of storagespace and 5 TB of bandwith per user account per month.</p>
<p>Embedding your application in a page can be done by inserting an iframe:</p>
<p>[Removed because of ended beta]</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/" title="Add 'Hosting your Silverlight application and media in the cloud' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Hosting your Silverlight application and media in the cloud' to Twitter" alt="Add 'Hosting your Silverlight application and media in the cloud' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Hosting+your+Silverlight+application+and+media+in+the+cloud&#038;c=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/" title="Add 'Hosting your Silverlight application and media in the cloud' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Hosting your Silverlight application and media in the cloud' to MySpace" alt="Add 'Hosting your Silverlight application and media in the cloud' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/&#038;title=Hosting+your+Silverlight+application+and+media+in+the+cloud" title="Add 'Hosting your Silverlight application and media in the cloud' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Hosting your Silverlight application and media in the cloud' to Del.icio.us" alt="Add 'Hosting your Silverlight application and media in the cloud' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/&#038;title=Hosting+your+Silverlight+application+and+media+in+the+cloud" title="Add 'Hosting your Silverlight application and media in the cloud' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Hosting your Silverlight application and media in the cloud' to digg" alt="Add 'Hosting your Silverlight application and media in the cloud' to digg" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/&#038;t=Hosting+your+Silverlight+application+and+media+in+the+cloud" title="Add 'Hosting your Silverlight application and media in the cloud' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Hosting your Silverlight application and media in the cloud' to FaceBook" alt="Add 'Hosting your Silverlight application and media in the cloud' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/" title="Add 'Hosting your Silverlight application and media in the cloud' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Hosting your Silverlight application and media in the cloud' to Technorati" alt="Add 'Hosting your Silverlight application and media in the cloud' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/&#038;title=Hosting+your+Silverlight+application+and+media+in+the+cloud" title="Add 'Hosting your Silverlight application and media in the cloud' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Hosting your Silverlight application and media in the cloud' to Stumble Upon" alt="Add 'Hosting your Silverlight application and media in the cloud' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/&#038;title=Hosting+your+Silverlight+application+and+media+in+the+cloud" title="Add 'Hosting your Silverlight application and media in the cloud' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Hosting your Silverlight application and media in the cloud' to Google Bookmarks" alt="Add 'Hosting your Silverlight application and media in the cloud' to Google Bookmarks" /></a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/">Hosting your Silverlight application and media in the cloud</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2009%2F02%2F13%2Fhosting-your-silverlight-application-and-media-in-the-cloud%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2009/02/13/hosting-your-silverlight-application-and-media-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
