<?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>Aimee Gurl... &#187; Silverlight</title>
	<atom:link href="http://aimeegurl.com/tag/silverlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://aimeegurl.com</link>
	<description>for as long as i can remember, technology has always fascinated me</description>
	<lastBuildDate>Thu, 13 Oct 2011 12:07:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Will it Blend: Wrapping the Text on Silverlight Chart Legends</title>
		<link>http://aimeegurl.com/2010/11/30/will-it-blend-wrapping-the-text-on-silverlight-chart-legends/</link>
		<comments>http://aimeegurl.com/2010/11/30/will-it-blend-wrapping-the-text-on-silverlight-chart-legends/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 11:30:00 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[expression blend]]></category>
		<category><![CDATA[no code]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[will it blend]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2010/11/30/will-it-blend-wrapping-the-text-on-silverlight-chart-legends/</guid>
		<description><![CDATA[In the course of my building our ROI app, I was trying to figure out how to wrap the legends of charts when the text gets too long. This is what I get with the default chart. You’ll see here, there’s a lot of waste of space for the legend when what I really want [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>In the course of my building our ROI app, I was trying to figure out how to wrap the legends of charts when the text gets too long. </p>
<p>This is what I get with the default chart.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/11/image_thumb1.png" width="640" height="418" /></a></p>
<p>You’ll see here, there’s a lot of waste of space for the legend when what I really want to see is more of the chart.&#160; So first thing we’ll do is fix the width of the chart. To do that, <strong>Right Click on the chart,</strong> <strong>Edit Template</strong> then depending on whether you’ve already been fiddling with your chart template, either <strong>Edit Current or Edit a Copy </strong></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-13h39_21.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 13h39_21" border="0" alt="2010-11-30 13h39_21" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-13h39_21_thumb.png" width="548" height="480" /></a></p>
<p>When you expand the template, you’ll see a grid within the grid that contains both the chart and the legend.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-13h42_32.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 13h42_32" border="0" alt="2010-11-30 13h42_32" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-13h42_32_thumb.png" width="640" height="441" /></a></p>
<p>You’ll notice that the grid is split into two, a star sized column and an auto sized one. Since autosizing will adapt the column size to the content, we’ll need to change this to star sized as well. You can do that by clicking on the icon and change it to the unlocked lock symbol. </p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h11_07.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h11_07" border="0" alt="2010-11-30 14h11_07" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h11_07_thumb.png" width="554" height="105" /></a></p>
<p>Now, you should be able to click on the triangle and resize the columns to your desired width ratios.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h12_46.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h12_46" border="0" alt="2010-11-30 14h12_46" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h12_46_thumb.png" width="554" height="82" /></a></p>
<p>You’ll notice that when you do this, your legend area won’t have as much space as before and since the legend items aren’t formatted to wrap by default, the text gets cropped if you have long lines of text.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h14_00.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h14_00" border="0" alt="2010-11-30 14h14_00" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h14_00_thumb.png" width="494" height="480" /></a></p>
<p>Return to the scope of the user control by clicking on this icon in your <strong>Objects and Timeline </strong>panel</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h17_00.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h17_00" border="0" alt="2010-11-30 14h17_00" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h17_00_thumb.png" width="217" height="108" /></a></p>
<p>Find one of your <strong>ColumnSeries </strong>(or whatever data series your chart is using) Right-click-&gt;<strong>Edit Additional Templates –</strong>&gt; <strong>Edit LegendItemStyle</strong> –&gt;<strong> Edit a Copy</strong></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h19_22.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h19_22" border="0" alt="2010-11-30 14h19_22" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h19_22_thumb.png" width="448" height="223" /></a></p>
<p>Give your style a name, and choose where to define this style. This depends on where you will be using this style, if it’s only in this page, then you can choose document. If there are other pages, you think you’ll be using this style in, choose Application. If you want to be able to reuse this style in other applications ,choose Resource Dictionary, choose an existing one or create a new one if you don’t have one yet. This stores the style in a separate file which you can then later on import to your other projects.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h23_18.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h23_18" border="0" alt="2010-11-30 14h23_18" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h23_18_thumb.png" width="458" height="248" /></a></p>
<p>Clicking on OK should then bring your designer to to the LegendItem template designer. If you expand the StackPanel, you’ll see that we have the Rectangle and Title elements. If you look into the xaml code, you’ll see that the Title element is template-bound to a property called <strong>Content</strong>.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h31_26.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h31_26" border="0" alt="2010-11-30 14h31_26" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h31_26_thumb.png" width="640" height="264" /></a></p>
<p>In my case, since I know that the legend will only represent text content, I can simple delete the title element, replace it with a Textblock object and apply the same bindings. I can do that by first selecting the textbox, search for the text property in the search box of the <strong>Properties </strong>panel, then clicking on the small square beside the property to access advanced options.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h35_30.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h35_30" border="0" alt="2010-11-30 14h35_30" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h35_30_thumb.png" width="640" height="336" /></a></p>
<p>We select <strong>Template Binding –&gt; Content</strong></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h38_51.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h38_51" border="0" alt="2010-11-30 14h38_51" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h38_51_thumb.png" width="477" height="480" /></a></p>
<p>One last thing to do is set the width of the TextBox since it’s currently auto sized and we can’t currently set the width to take up the rest of the unoccupied horizontal stackpanel space. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://aimeegurl.com/wp-content/uploads/2010/11/wlEmoticon-smile.png" /> If you want your legend to scale dynamically, you’ll need to change the stackpanel into a grid. To do this, right-click on the StackPanel in your <strong>Objects and Timeline</strong> panel –&gt; <strong>Change Layout Type –&gt; </strong>and select <strong>Grid</strong></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h46_38.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h46_38" border="0" alt="2010-11-30 14h46_38" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h46_38_thumb.png" width="493" height="261" /></a></p>
<p>After this step, check on your Rectangle, most likely, the <strong>Width </strong>and <strong>Height </strong>properties will be reset to auto so you’ll want to give this a size.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h01_40.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h01_40" border="0" alt="2010-11-30 15h01_40" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h01_40_thumb.png" width="640" height="182" /></a>-</p>
<p>For the grid itself, it’s <strong>Height</strong> and <strong>Width </strong>gets fixed so we’ll want to reset this to auto so the grid is free to resize as it’s content or container feels necessary.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h06_16.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h06_16" border="0" alt="2010-11-30 15h06_16" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h06_16_thumb.png" width="640" height="179" /></a></p>
<p>Now we can add a grid line by clicking on the top portion of our grid, and right after where the Rectangle ends:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h49_09.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h49_09" border="0" alt="2010-11-30 14h49_09" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h49_09_thumb.png" width="240" height="137" /></a></p>
<p>then toggle the grid property (by clicking on the lock icon) until we get <strong>Pixel sized</strong>.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h52_22.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h52_22" border="0" alt="2010-11-30 14h52_22" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h52_22_thumb.png" width="240" height="94" /></a></p>
<p>We can leave the other column at star sized so it’ll take up the rest of the available space.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h51_56.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h51_56" border="0" alt="2010-11-30 14h51_56" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h51_56_thumb.png" width="240" height="100" /></a></p>
<p>With the TextBox selected, make sure the <strong>Width </strong>and <strong>Height</strong>&#160; is set to auto (if there is a value, you can use the button on the right of the field to set to auto), the <strong>HorizontalAlignment </strong>and <strong>VerticalAlignment </strong>are set to <strong>Justified </strong>and the margins are set to the distance you want.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h55_05.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 14h55_05" border="0" alt="2010-11-30 14h55_05" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-14h55_05_thumb.png" width="640" height="203" /></a></p>
<p>Now when you go back up to the UserControl scope, you’ll see the TextWrap in effect. Looking at this though, I might want to change the alignment/margins so that the rectangle is aligned to top instead of in the middle just to make it look nicer.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h11_13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h11_13" border="0" alt="2010-11-30 15h11_13" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h11_13_thumb.png" width="273" height="162" /></a></p>
<p>To go back to editing the template, right click on the <strong>ColumnSeries –&gt; Edit Additional Templates –&gt; Edit Current –&gt; Edit LegendItemStyle</strong></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h12_35.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h12_35" border="0" alt="2010-11-30 15h12_35" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h12_35_thumb.png" width="339" height="77" /></a></p>
<p>In my case, I chose top aligned with a bit of a top margin.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h14_27.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h14_27" border="0" alt="2010-11-30 15h14_27" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h14_27_thumb.png" width="640" height="185" /></a></p>
<p>Going back out to the UserControl scope, we’ll be able to see the effect. </p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h18_33.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h18_33" border="0" alt="2010-11-30 15h18_33" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h18_33_thumb.png" width="212" height="123" /></a></p>
<p>You can play around with how you want your legend to look and once your satisfied, it’s time to apply the style to the other series’. No you don’t to do that whole set of steps for each of them so don’t worry. Right click on the other column series-&gt;<strong> Edit Additional Templates –&gt; Edit LegendItemStyle –&gt; </strong>and this time select <strong>ApplyResource </strong>and you should see the style you created in the previous steps and click on that. In my case, I named the style LegendItemStyle.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h20_05.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h20_05" border="0" alt="2010-11-30 15h20_05" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h20_05_thumb.png" width="353" height="143" /></a></p>
<p>You’ll notice your legend automatically format itself the same way the previous column series did.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h22_34.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2010-11-30 15h22_34" border="0" alt="2010-11-30 15h22_34" src="http://aimeegurl.com/wp-content/uploads/2010/11/2010-11-30-15h22_34_thumb.png" width="205" height="148" /></a></p>
<p>And that’s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2010/11/30/will-it-blend-wrapping-the-text-on-silverlight-chart-legends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the not so impossible puzzle.</title>
		<link>http://aimeegurl.com/2010/10/17/the-not-so-impossible-puzzle/</link>
		<comments>http://aimeegurl.com/2010/10/17/the-not-so-impossible-puzzle/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 11:19:20 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[boredom]]></category>
		<category><![CDATA[puzzle]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2010/10/17/the-not-so-impossible-puzzle/</guid>
		<description><![CDATA[I saw this video going around and obviously it piqued my interest. Also, my left jaw is acting up again so I don’t really feel like going out and about, so I found something else to amuse myself with. the so called impossible puzzle I didn’t want to waste paper and my printer was unplugged [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>I saw this video going around and obviously it piqued my interest. Also, my left jaw is acting up again so I don’t really feel like going out and about, so I found something else to amuse myself with.</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:5dd3ad48-9c68-4118-bfbb-badc637a3695" class="wlWriterEditableSmartContent">
<div><object width="640" height="360"><param name="movie" value="http://www.youtube.com/v/MxhD_9_FoPU?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/MxhD_9_FoPU?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="640" height="360"></embed></object></div>
<div style="width:640px;clear:both;font-size:.8em">the so called impossible puzzle</div>
</div>
<p>I didn’t want to waste paper and my printer was unplugged so I decided to create a silverlight simulation instead. Try it out in fullscreen below:   </p>
<p><iframe height="400" src="http://labs.technoeuphoria.com/impossiblesquare/" width="500"></iframe></p>
<p>You’ll discover that when you re-arrange the pieces as in the video, the blue and green pieces go beyond the boundary at the bottom. This is probably why even when you make the paper cut-out version and try out yourself, the illusion holds because you’ll have no reference to the original square.</p>
<p>At least now I have that out of my system. My jaw still hurts though <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-cryingface" alt="Crying face" src="http://aimeegurl.com/wp-content/uploads/2010/10/wlEmoticon-cryingface.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2010/10/17/the-not-so-impossible-puzzle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Techfriday: Looping Panorama for Windows Phone 7 Series</title>
		<link>http://aimeegurl.com/2010/03/26/tech-friday-panoramic-looping-exercise/</link>
		<comments>http://aimeegurl.com/2010/03/26/tech-friday-panoramic-looping-exercise/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 16:39:00 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[expressionblend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[techfriday]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2010/03/26/tech-friday-panoramic-looping-exercise/</guid>
		<description><![CDATA[Just a quick note:&#160; I’m sure MS will be providing controls to this interface in the future so we don’t have to spend too much time building these controls ourselves This post, as with the previous one, was meant more as an Expression Blend Exercise for myself to be explore the features of Silverlight / [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>Just a quick note:&#160; I’m sure MS will be providing controls to this interface in the future so we don’t have to spend too much time building these controls ourselves <img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsmile2.png" /> This post, as with the previous one, was meant more as an Expression Blend Exercise for myself to be explore the features of Silverlight / Windows Phone 7 and Expression Blend to see how much can be done with what we have today. </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8070ac6e-1c02-408e-bf96-370447cfb807" class="wlWriterEditableSmartContent">
<div><object width="482" height="361"><param name="movie" value="http://www.youtube.com/v/3Da1DUf5W-I&amp;hl=en&amp;fs=1&amp;hl=en"></param><embed src="http://www.youtube.com/v/3Da1DUf5W-I&amp;hl=en&amp;fs=1&amp;hl=en" type="application/x-shockwave-flash" width="482" height="361"></embed></object></div>
<div style="width:482;clear:both;font-size:.8em;color:#000000">This is more of an Expression Blend exercise to simulate a looping panoramic interface on Windows Phone 7</div>
</div>
<p>There’s one annoying thing that I can’t figure out though: on the first scroll, you’ll notice from the video that the screen flickers. There’s probably something I’m doing wrong here but I just can’t figure it out yet <img class="wlEmoticon wlEmoticon-sad" alt="Sad" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsad.png" /></p>
<p>So I had set out to accomplish two things: Simulate the looping background and sections in the panoramic interface on windows phone and instead of flicking, let the user touch and drag the controls from left to right before switching. I was able to accomplish the two, but like I mentioned, there’s an annoying thing that happens on the first transition from state one to state two. Another thing that’s wrong with this sample is that, I shouldn’t be switching states right away on a drag to left or drag to right. You should be able to pan a bit and the screen holds to that position till you pan to a certain threshold before the interface snaps to the next section. But yeah, maybe next time.</p>
<p>The first challenge was implementing the drag to next state instead of the flick. I couldn’t really isolate this into either a trigger or an action as it’s actually a combination of both, therefore a behavior. Basically, depending on the sum of the left and right value of the users drag motion, I trigger either GoToNextState() or GoToPreviousState(). Code for these two were modified from <a title="http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack" href="http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack">http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack</a>.</p>
<p> <a href="http://aimeegurl.com/wp-content/uploads/2010/03/image18.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb19.png" width="563" height="262" /></a>
<p>So I built a PanoramicPanningBehavior that has a few properties I can set. </p>
<p>First there are&#160; the <strong>BackgroundElement</strong>, <strong>SectionsElement</strong>, <strong>TitleElement</strong>. I want them to be grouped so when it’s time for me to handle the drags, they don’t necessarily have to move at the same pace. That’s when the <strong>BackgroundMovementFactor</strong> and <strong>TitleMovementFactor </strong>come to play. Intstead of translating the background and title according to the value of the drag, I multiply it by the specified factor first. I’ve also let myself specify the <strong>StateGroup</strong> that has the states of our sections as described in <a href="http://aimeegurl.com/2010/03/18/panoramic-navigation-on-windows-phone-7-with-no-code">my previous post</a>, just in case you have other stategroups in the scene (though I haven’t tested this yet ^_^)</p>
<p> Now that I have the essential parts of my UI identified, I can now define what I want to do with them in my behavior when I start handling the events ManipulationDelta and ManipulationCompleted.   <br /> 
<p>&#160;</p>
<p>&#160;</p>
<p>First for ManipulationDelta, I first check to see whether the parts are not null, and then based on the input factors, I apply them to the Translation.X property of the DeltaManipulation, or basically the change in the touch points and assign the value to the TranslateX properties of the CompositeTransform of the elements that have been identified through the properties. I think it’s better to read the code <img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsmile2.png" />&#160;</p>
<pre class="code"><span style="color: blue">void </span>RootVisual_ManipulationDelta(<span style="color: blue">object </span>sender, <span style="color: #2b91af">ManipulationDeltaEventArgs </span>e)
     {
         <span style="color: blue">if </span>(!e.IsInertial)
         {
             <span style="color: blue">if </span>(BackgroundElement != <span style="color: blue">null</span>) {
                 <span style="color: blue">var </span>BG = getElement(BackgroundElement).RenderTransform <span style="color: blue">as </span><span style="color: #2b91af">CompositeTransform</span>;
                 BG.TranslateX += e.DeltaManipulation.Translation.X * BackgroundMovementFactor;

             }
             <span style="color: blue">if </span>(SectionsElement != <span style="color: blue">null</span>) {
                 <span style="color: blue">var </span>SE = getElement(SectionsElement).RenderTransform <span style="color: blue">as </span><span style="color: #2b91af">CompositeTransform</span>;
                 SE.TranslateX += e.DeltaManipulation.Translation.X;

             }
             <span style="color: blue">if </span>(TitleElement != <span style="color: blue">null</span>) {
                 <span style="color: blue">var </span>TE = getElement(TitleElement).RenderTransform <span style="color: blue">as </span><span style="color: #2b91af">CompositeTransform</span>;
                 TE.TranslateX += e.DeltaManipulation.Translation.X* TitleMovementFactor;
             }

         };
     }</pre>
<p>&#160;</p>
<p>If I wanted to run the project at this point, I’ll have to create a stateGroup and the section states in order for this not to go haywire. When I recreated the project, I actually added the panning behavior last. Next we’ll see the reason why I say this is meant more as an exercise for myself (and maybe for building demo apps) than production code. I think from this screenshot you can more or less figure out what I did.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image19.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb20.png" width="1024" height="591" /></a></p>
<p>Okay, so seeing as how you’re able to, from the leftmost part of your UI, be able to pan even more to the left to peek and even transit into the rightmost section, there had to be something there. And since I didn’t want to duplicate all the controls, I wanted to use WPF’s VisualBrush. Sadly, this isn’t available for Silverlight, however, I did find this: <a href="http://dotneteers.net/blogs/vbandi/archive/2009/03/26/discovering-silverlight-3-poor-man-s-visualbrush-behavior.aspx">http://dotneteers.net/blogs/vbandi/archive/2009/03/26/discovering-silverlight-3-poor-man-s-visualbrush-behavior.aspx</a> When I tested it out, it wasn’t as performant as WPF’s visual brush, but since I only needed to draw the UI once, I thought this would do.If we had the PathListBox in WP7, that would have been a better option too.</p>
<p>If you look at my visual tree, I basically created a brush for the background image(<strong>image</strong>), the <strong>TitleGrid </strong>and the <strong>ContentGrid</strong> (which you won’t see since I collapsed it because there were more stuff inside. Next, you’ll notice that these elements are inside a stack and before and after each of them is a Rectangle. Basically, I created identically sized rectangles that use as brushes the PoorMansVisualBrush.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image20.png"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="right" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb21.png" width="304" height="238" /></a>To do this, after adding a reference to the PoorMansVisualBrush (which I’ve made a WP version of ), I select the Rectangle and temporarily choose, TileBrush, click on Advanced Options in the <strong>Fill </strong>property and select <strong>Convert to New Resource… </strong>This will prompt me with a dialog to create a new brush resource and I’ll name it accordingly. In this Case, I have BackgroundBrush.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image21.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 20px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb22.png" width="648" height="434" /></a> </p>
<p>Next, with the behavior selected, I set the properties accordingly. Most important to note is to set the UpdateIntervalDuration to 00:00:00 so that the behavior doesn’t waste resources by repainting the brush. Next, you’ll want to go to each of the rectangles and assign their fill properties to the BrushResources you created. Also remember to set the <strong>Stroke </strong>to <strong>No brush </strong>especially if you have background images that are supposed to seamlessly merge the leftmost and rightmost portions. Now the tedious part is doing this for all the rectangles. <img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsmile2.png" />&#160;</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image22.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb23.png" width="856" height="373" /></a></p>
<p>
  <br />The last, and yet another tricky part is setting up the states. What you’re seeing here is pretty much the same as the last post where I have 3 states, to show my 3 sections. Note that when you position the states, you’ll want to position the actual to the middle/actual objects. It’ll probably be too difficult to set up using the rectangles with the brushes anyway since they don’t render at design time ^_^. Here, you’ll notice I’ve added custom transitions for when Section1State goes to Section3State and vice versa.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image23.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb24.png" width="978" height="340" /></a> </p>
<p>To do this, I’ll click on add transition button and select Section1State –&gt; Section3State </p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image24.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb25.png" width="473" height="163" /></a> </p>
<p></p>
<p>In order to see what I’m doing better, I’ll switch to the Animation Workspace by pressing the function key [<strong>F6]. </strong>I’ve also minimized the stacks back so it’s easier to manage. With the transition to <strong>Section3State </strong>selected I’ll record a keyframe at the start, and end of the .5s transition.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image25.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb26.png" width="849" height="418" /></a></p>
<p>When I record a key frame at the end, it’ll actually default to moving to the right most part of the actual controls which I changed to the one below. I’ve highlighted the outlines of the rectangles that mimic the actual controls.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image26.png"><img style="border-right-width: 0px; margin: 0px 20px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb27.png" width="874" height="480" /></a> </p>
<p></p>
<p>Do the same for transitioning Section3State-&gt;Section1State. What will happen here is the application will play this custom transition animation to showing the visual brushes and when the transition is done, it’ll switch to the destination state where the real controls are visible. </p>
<p></p>
<p>Run the app to test and that’s it!</p>
<p>Again, not an ideal solution for production but at least I got to learn a few more useful things in Blend that might be useful in the future.</p>
<p> I’ve uploaded the code here so if you want to test it out, download the zip file, rightclick –&gt; properties –&gt; Unblock to avoid getting those dll not found / inaccessible errors.<a href="http://aimeegurl.com/wp-content/uploads/2010/03/image27.png"><img style="border-bottom: 0px; border-left: 0px; margin: 11px 20px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb28.png" width="254" height="350" /></a></p>
<p>&#160;</p>
<p>
  </p>
<p><iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-bdfb7845c22e26b6.skydrive.live.com/embedicon.aspx/Projects/TechFriday/Panoramic%20Drag/PanoramaDrag.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2010/03/26/tech-friday-panoramic-looping-exercise/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Panoramic Navigation on Windows Phone 7 with No Code!</title>
		<link>http://aimeegurl.com/2010/03/18/panoramic-navigation-on-windows-phone-7-with-no-code/</link>
		<comments>http://aimeegurl.com/2010/03/18/panoramic-navigation-on-windows-phone-7-with-no-code/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 06:19:09 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[expression blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2010/03/18/panoramic-navigation-on-windows-phone-7-with-no-code-2/</guid>
		<description><![CDATA[I was reading through the UI Design and Interaction Guide for Windows Phone 7 Series and found out that there is currently no panoramic application template or control provided as part of the standard application platform. Nothing stops us from creating our own though. To make things easier, I’ve made a behavior library for everyone [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I was reading through the <a href="http://bit.ly/d9Xiey">UI Design and Interaction Guide for Windows Phone 7 Series</a> and found out that there is currently no panoramic application template or control provided as part of the standard application platform. Nothing stops us from creating our own though.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image2.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb3.png" border="0" alt="image" width="640" height="289" /></a></p>
<p>To make things easier, I’ve made a behavior library for everyone to use that will handle flick gestures. I’ve also included a “GoToNextState” behavior which I based on <a title="http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack" href="http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack">http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack</a>. If you want to follow along, you’ll need to download my <a href="http://cid-bdfb7845c22e26b6.skydrive.live.com/self.aspx/Projects/TechFriday/WPBehaviorsLibrary.dll">behavior library</a>. Also, if you don’t know where to get the Blend bits, check out this post: <a title="http://electricbeach.org/?p=460" href="http://electricbeach.org/?p=460">http://electricbeach.org/?p=460</a></p>
<p>So, let’s start by creating a new Windows Phone Application project in Blend 4.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image3.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb4.png" border="0" alt="image" width="444" height="383" /></a></p>
<p>You’ll be presented with a default layout. Obviously, your panoramic screen design will go outside the bounds of the “phone”. Layout your screen accordingly. This is what I did with mine.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image4.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb5.png" border="0" alt="image" width="571" height="389" /></a></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image5.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb6.png" border="0" alt="image" width="286" height="299" /></a></p>
<p>Now that I have all my elements on screen, I’ll create 3 visual states, one for each active session. Let’s go into our States tab and add a state group called Sections. To do that, click on the icon with a green plus sign.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image6.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb7.png" border="0" alt="image" width="375" height="132" /></a></p>
<p>In the Sections state group, let’s add the 3 states and name them accordingly. For each state, let’s also move the Grid along the  x-axis.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image7.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb8.png" border="0" alt="image" width="720" height="307" /></a></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image8.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb9.png" border="0" alt="image" width="748" height="308" /></a></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image9.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb10.png" border="0" alt="image" width="654" height="305" /></a></p>
<p>We can also set the default transition to some built in easing functions to smooth out the user experience.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image10.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb11.png" border="0" alt="image" width="579" height="371" /></a></p>
<p>In my case, I used the back easing function but you can play around with the different functions to see what suits you. You can preview what the transitions look like by clicking on the <strong>Turn on transition preview </strong>button.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image11.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb12.png" border="0" alt="image" width="467" height="157" /></a></p>
<p>Okay, now we’re all set. The only thing left to do is enable state changing when a user flicks the screen either to the left or to the right. This is where we will be making use of the my WPBehaviorsLibrary. We’ll go into our asset library –&gt; behaviors tab and you’ll find a behavior called GoToNextState and GoToPreviousState:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image12.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb13.png" border="0" alt="image" width="676" height="237" /></a></p>
<p>Drag and drop these two behaviors one by one to the LayoutRoot so that it looks like this:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image13.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb14.png" border="0" alt="image" width="304" height="267" /></a></p>
<p>With one of the behaviors selected, go into the property inspector. You have a few options you can set (Loop &amp; UseTransitions) which are pretty self explanatory.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image14.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb15.png" border="0" alt="image" width="273" height="309" /></a></p>
<p>. You’ll notice there is also a trigger property. The default trigger type is an event trigger. Let’s go ahead and click New to select the FlickGestureTrigger.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image15.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb16.png" border="0" alt="image" width="390" height="605" /></a></p>
<p>When you click ok, you’ll find that the Gesture has a Direction property that you can set. Basically, we’re saying that the GoToPreviousState action gets fired when the user triggers a flick to the Right. Do the same for the GoToNextState behavior but with a flick to the Left.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image16.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb17.png" border="0" alt="image" width="307" height="365" /></a></p>
<p>And that’s it! Press f5 and select Windows Phone 7 Emulator, unless you’re lucky enough to have a Windows Phone 7 Device. <img class="wlEmoticon wlEmoticon-smile" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsmile1.png" alt="Smile" /></p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image17.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb18.png" border="0" alt="image" width="423" height="237" /></a></p>
<p>You’ll get something like this:</p>
<p> <object id="scPlayer" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="446" height="788" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/FirstFrame.jpg&amp;containerwidth=446&amp;containerheight=788&amp;content=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/panorama.swf" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/" /><param name="src" value="http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/jingswfplayer.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/FirstFrame.jpg&amp;containerwidth=446&amp;containerheight=788&amp;content=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/panorama.swf" /><param name="allowfullscreen" value="true" /><embed id="scPlayer" type="application/x-shockwave-flash" width="446" height="788" src="http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/FirstFrame.jpg&amp;containerwidth=446&amp;containerheight=788&amp;content=http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/panorama.swf" allowfullscreen="true" base="http://content.screencast.com/users/jawss/folders/Jing/media/ca74bfc2-4fa5-4063-be34-e826163a3fe4/" scale="showall"></embed></object></p>
<p>After reading some more on the UI Guidelines, they’ve mentioned a few things about the title like moving at a different speed from the sections, etc. so I’ve tweaked the animations a bit,and now I have the title outside the overall grid, animating it separately. I also have different easing functions on the first and last page from the middle one. The result is this:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="505" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/II7z9qihof0&amp;hl=en_US&amp;fs=1&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="505" src="http://www.youtube.com/v/II7z9qihof0&amp;hl=en_US&amp;fs=1&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can get the code for this project as well as the library here. Also, although I’ve only managed to port  (i.e. copy paste) the States behavior from the <a href="http://gallery.expression.microsoft.com/en-us/MIXBehaviorPack">Mix Behavior Pack</a> to a Windows Phone behavior,  I’ve recompiled the pack to work with Silverlight 4. It’s in this folder as well.</p>
<p><iframe title ="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:98px;height:115px;padding:0;background-color:#fcfcfc;" src="http://cid-bdfb7845c22e26b6.office.live.com/embedicon.aspx/Projects/TechFriday/WP7%20-%20Panoramic%20Navigation%20with%20no%20code/PanoramaApplication.zip"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2010/03/18/panoramic-navigation-on-windows-phone-7-with-no-code/feed/</wfw:commentRss>
		<slash:comments>75</slash:comments>
		</item>
		<item>
		<title>Consuming data from Nimbus Using LinqToXML (Updated) on iPhone + WP7!</title>
		<link>http://aimeegurl.com/2010/03/16/consuming-data-from-nimbus-using-linqtoxml-2/</link>
		<comments>http://aimeegurl.com/2010/03/16/consuming-data-from-nimbus-using-linqtoxml-2/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 20:21:57 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[MonoTouch.NET]]></category>
		<category><![CDATA[Project Nimbus]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[visualstudio2010]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2010/03/16/consuming-data-from-nimbus-using-linqtoxml-2/</guid>
		<description><![CDATA[I’ve been starting to explore iPhone development lately. At first I was taking my time at learning at Objective C which went fine for a while but one of the guys on the project was asking if I could help build some apps for Project Nimbus, translation: build stuff fast. We talked about MonoTouch.NET which [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I’ve been starting to explore iPhone development lately. At first I was taking my time at learning at Objective C which went fine for a while but one of the guys on the project was asking if I could help build some apps for <a href="http://www.projectnimbus.org">Project Nimbus</a>, translation: build stuff fast. We talked about <a href="http://MonoTouch.NET">MonoTouch.NET</a> which is basically a framework that will allow you to code apps with .NET. JOY!!</p>
<p>First a quick intro about <a href="http://www.projectnimbus.org">Project Nimbus</a>: as Chewy would put it, it’s basically a supermarket for data here in Singapore. The team is hard at work at securing data from all sorts of providers. They currently have <a href="http://www.hungrygowhere.com/">Hungry Go Where</a>, <a href="http://www.lta.gov.sg">Land Transport Authority</a>, <a href="http://www.nea.gov.sg">National Environment Agency</a>, and <a href="http://www.nlb.gov.sg/">National Library Board </a>onboard as data providers, and i know they have quite a few more coming. What this means for developers is that if they have a great idea, they don’t have to go out by themselves with these big agencies and possibly spend tons of money on acquiring the data. If you want to find out more, check out <a href="http://projectnimbus.org/about/">http://projectnimbus.org/about/</a> for more information. They also very keen on getting input from developers as to what types of data they think would be useful, as well as feedback on the project as well. If you’re interested, the about page has a link to contact them <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So back to my application. Right now, I’m figuring out how to actually get the data from the service. Looking at <a href="http://projectnimbus.org/2010/02/23/what-is-returned-from-data-service/">this entry</a>, they actually provide a link to the data that’s returned when you make a call to the service. Check out the post, and towards the end, you’ll find a few links that shows how the data looks like.</p>
<p>First we create a webrequest to the URL that gives me the dataset we want. In this case, we want to get access to the NowcastSet i.e. current weather. The service actually gets authentication from the headers so we add these two keys &amp; values. We then make the request and read it into a string for parsing later on.</p>
<p><img src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic6.6QgjwaKOHyeZ.jpg" alt="wpid-PastedGraphic6.6QgjwaKOHyeZ.jpg" width="826" height="113" /></p>
<p>Next, if we look at the <a href="http://nimbusproject.cloudapp.net/neaodataservice.svc/ForecastSet?AccountKey=NimbusAdmin&amp;UniqueUserID=A66D951F49F54A63B040CFAA2FD553C0">dataset</a> that’s returned, we see that it makes use of a few namespaces. To make things WHOLE lot easier for us, we’ll use one of the cool features of the .NET Framework which I LOVE called LinqToXML. If you want to find out more, check out <a href="http://msdn.microsoft.com/en-us/library/bb387098.aspx">http://msdn.microsoft.com/en-us/library/bb387098.aspx</a>.</p>
<p>Let’s first add the System.Xml.Linq namespace in order to use it’s classes.</p>
<p><img src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic1.ItVM3vydQ2bH.jpg" alt="wpid-PastedGraphic1.ItVM3vydQ2bH.jpg" width="651" height="316" /></p>
<p>We can now add a our XNamespaces:<br />
<img src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic2.CJ4wKM6qhF3A.jpg" alt="wpid-PastedGraphic2.CJ4wKM6qhF3A.jpg" width="620" height="65" /></p>
<p>The following stuff is just magic. With just one statement using LinqToXML, we’re able to parse the xml string without having to use xpath or regex, etc. And, if you read the statement, it’s actually pretty descriptive of what it is trying to accomplish.</p>
<p><img src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic4.SILwDB5lGtqK.jpg" alt="wpid-PastedGraphic4.SILwDB5lGtqK.jpg" width="715" height="157" /></p>
<p>Given the structure of our sample data, we see that we’re essentially getting elements from <strong>entry.content.properties</strong>.</p>
<p><img src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic9.u4eWF4QbhRSy.jpg" alt="wpid-PastedGraphic9.u4eWF4QbhRSy.jpg" width="446" height="415" /></p>
<p>Note that the following line is just to make things a bit easier to read.<br />
<img style="border-width: 0px;" src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic10.hKnF61uZzy7F.jpg" border="0" alt="wpid-PastedGraphic10.hKnF61uZzy7F.jpg" width="535" height="17" /></p>
<p>You can also just do the following and remove the let line, though I find it a bit more confusing to understand at first glance.<br />
<img style="border-width: 0px;" src="http://aimeegurl.com/wp-content/uploads/2010/03/wpid-PastedGraphic11.yB7JdULt8nja.jpg" border="0" alt="wpid-PastedGraphic11.yB7JdULt8nja.jpg" width="562" height="10" /></p>
<p>This is the full code:</p>
<pre class="code">    <span style="color: blue;">public </span><span style="color: #2b91af;">List</span>&lt;WeatherEntry&gt; GetWeatherFromNimbusNEA(<span style="color: blue;">string </span>AccountKey, <span style="color: blue;">string </span>UniqueUserID)
    {

        System.Net.WebRequest wr=
          HttpWebRequest.Create(
<span style="color: #a31515;">            "http://api.projectnimbus.org/neaodataservice.svc/NowcastSet"</span>);</pre>
<pre class="code">        wr.Headers.Add(<span style="color: #a31515;">"AccountKey"</span>,AccountKey);
        wr.Headers.Add(<span style="color: #a31515;">"UniqueUserID"</span>,UniqueUserID);
        wr.Method = <span style="color: #a31515;">"GET"</span>;
        WebResponse res = wr.GetResponse();
        <span style="color: blue;">string </span>resStr
         = <span style="color: blue;">new </span>System.IO.<span style="color: #2b91af;">StreamReader</span>(res.GetResponseStream()).ReadToEnd();

        XNamespace atomNS
          = <span style="color: #a31515;">"http://www.w3.org/2005/Atom"</span>;</pre>
<pre class="code">        XNamespace dNS 
          = <span style="color: #a31515;">"http://schemas.microsoft.com/ado/2007/08/dataservices"</span>;</pre>
<pre class="code">        XNamespace mNS
          = <span style="color: #a31515;">"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"</span>;

        <span style="color: #2b91af;">List</span>&lt;WeatherEntry&gt; results
          = (<span style="color: blue;">from </span>item <span style="color: blue;">in </span>XElement.Parse(resStr).Descendants(atomNS + <span style="color: #a31515;">"entry"</span>)
            <span style="color: blue;">let </span>weather = item.Element(atomNS + <span style="color: #a31515;">"content"</span>).Element(mNS +<span style="color: #a31515;">"properties"</span>)
                <span style="color: blue;">select new </span>WeatherEntry() {
                Area = weather.Element(dNS +<span style="color: #a31515;">"Area"</span>).Value,
                Condition = weather.Element(dNS +<span style="color: #a31515;">"Condition"</span>).Value,
                Lat = weather.Element(dNS + <span style="color: #a31515;">"Latitude"</span>).Value,
                Lon = weather.Element(dNS + <span style="color: #a31515;">"Longitude"</span>).Value
            }).ToList();

        <span style="color: blue;">return </span>results;
    }

}</pre>
<p><em>//Blogging using a trial version of MacJournal. Windows Live Writer is still my favorite blogging software, and it’s not just because it’s free. </em></p>
<p><em>// Update @ 3.40 on my Win7 partition.. I missed you Windows Live Writer!</em></p>
<p><em> </em></p>
<p><em>// </em><em>and <a href="http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&amp;bt=9&amp;pl=8">the vspaste add-in!!</a></em></p>
<p>It’s an hour after the end of the <a href="http://live.visitmix.com">Mix Keynote</a>. I started watching the video on my Mac partition so I couldn’t download the tools straight away. After it was over, I rebooted, uninstalled my pre-RC bits and installed the tools for Windows Phone 7 Series (which you can find <a href="http://developer.windowsphone.com">here</a>), fired it up and created a new Windows Phone List Application:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2010/03/image1.png"><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb1.png" border="0" alt="image" width="640" height="405" /></a></p>
<p>Since this is mainly a ProjectNimbus post, I won’t dive into how to build the WP7 app but there’s a new training kit up on channel 9 <a href="http://channel9.msdn.com/learn/courses/WP7TrainingKit/">http://channel9.msdn.com/learn/courses/WP7TrainingKit/</a> if you want to learn more.</p>
<p>I did make a few tweaks in my code since the original code wasn’t doing downloads asynchronously (which it should, to improve your apps performance and not lock the UI). So how does my code look now?</p>
<pre class="code"><span style="color: blue;">public void  </span>GetWeatherFromNimbusNEA(<span style="color: blue;">string </span>AccountKey, <span style="color: blue;">string </span>UniqueUserID)
 {

     <span style="color: #2b91af;">WebClient </span>wc = <span style="color: blue;">new </span><span style="color: #2b91af;">WebClient</span>();</pre>
<pre class="code"><span style="color: green;">     </span>wc.Headers[<span style="color: #a31515;">"AccountKey"</span>] = AccountKey;
     wc.Headers[<span style="color: #a31515;">"UniqueUserID"</span>] = UniqueUserID;
     wc.DownloadStringCompleted
      +=<span style="color: blue;">new </span><span style="color: #2b91af;">DownloadStringCompletedEventHandler</span>(wc_DownloadStringCompleted);
     wc.DownloadStringAsync(
<span style="color: blue;">      new </span><span style="color: #2b91af;">Uri</span>(<span style="color: #a31515;">"http://api.projectnimbus.org/neaodataservice.svc/NowcastSet"</span>));

 }

 <span style="color: blue;">void </span>wc_DownloadStringCompleted(<span style="color: blue;">object </span>sender, <span style="color: #2b91af;">DownloadStringCompletedEventArgs </span>e)
 {
     <span style="color: blue;">string </span>resStr = e.Result;

     <span style="color: #2b91af;">XNamespace </span>atomNS
      = <span style="color: #a31515;">"http://www.w3.org/2005/Atom"</span>;
     <span style="color: #2b91af;">XNamespace </span>dNS
      = <span style="color: #a31515;">"http://schemas.microsoft.com/ado/2007/08/dataservices"</span>;
     <span style="color: #2b91af;">XNamespace </span>mNS
      = <span style="color: #a31515;">"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"</span>;

     <span style="color: blue;">var </span>results
     = (<span style="color: blue;">from </span>item <span style="color: blue;">in </span><span style="color: #2b91af;">XElement</span>.Parse(resStr)
         .Descendants(atomNS + <span style="color: #a31515;">"entry"</span>)
<span style="color: blue;">          let </span>weather = item.Element(atomNS + <span style="color: #a31515;">"content"</span>)
                        .Element(mNS + <span style="color: #a31515;">"properties"</span>)</pre>
<pre class="code">                 <span style="color: blue;">select new </span><span style="color: #2b91af;">WeatherEntryViewModel</span>()
                  {
                   Area = weather.Element(dNS + <span style="color: #a31515;">"Area"</span>).Value,
                   Condition = weather
                               .Element(dNS + <span style="color: #a31515;">"Condition"</span>).Value,
                   Lat = weather.Element(dNS + <span style="color: #a31515;">"Latitude"</span>).Value,
                   Lon = weather.Element(dNS + <span style="color: #a31515;">"Longitude"</span>).Value
                  });
     <span style="color: blue;">foreach </span>(<span style="color: blue;">var </span>r <span style="color: blue;">in </span>results) {
         Items.Add(r);
     }
 }</pre>
<p>It’s practically the same code except I switched to the WebClient which Silverlight developers are already familiar with to download the string asynchronously. Once the results are returned, I add them to an observable collection which I have data-bound my UI Elements to.</p>
<pre class="code">Items = <span style="color: blue;">new </span><span style="color: #2b91af;">ObservableCollection</span>&lt;<span style="color: #2b91af;">WeatherEntryViewModel</span>&gt;();</pre>
<p>The result is a basic list like application that displays weather information:</p>
<p><img style="margin: 0px 20px; display: inline; border-width: 0px;" title="image" src="http://aimeegurl.com/wp-content/uploads/2010/03/image_thumb2.png" border="0" alt="image" width="278" height="480" /></p>
<p>I’m excited about the WP7 platform and it’s definitely going to be a focus in my upcoming TechFriday posts! Next thing on my learning list is to share code between my two application platforms, iPhone and WP7. One thing is for sure though, I’m very happy with Project Nimbus as well because it provides a lot of data that I can already start playing around with. Kudos to the team! <img class="wlEmoticon wlEmoticon-smile" src="http://aimeegurl.com/wp-content/uploads/2010/03/wlEmoticonsmile.png" alt="Smile" /></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2010/03/16/consuming-data-from-nimbus-using-linqtoxml-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Playing with the Silverlight Toolkit</title>
		<link>http://aimeegurl.com/2009/02/23/playing-with-the-silverlight-toolkit/</link>
		<comments>http://aimeegurl.com/2009/02/23/playing-with-the-silverlight-toolkit/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 16:03:01 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2009/02/23/playing-with-the-silverlight-toolkit/</guid>
		<description><![CDATA[Yes, it’s as easy as it looks. I’m actually just creating this post so that I can test the app I just built. The Silverlight Toolkit has actually been in release since December but I haven’t had the time to play around with it yet. In the toolkit are some really cool components that you [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>Yes, it’s as easy as it looks. I’m actually just creating this post so that I can test the app I just built. <a href="http://www.codeplex.com/Silverlight">The Silverlight Toolkit</a> has actually been in release since December but I haven’t had the time to play around with it yet. In the toolkit are some really cool components that you can start using in your Silverlight applications. I’m going to need to work with some charts in an upcoming project so I decided to test it out.</p>
<p>Installing the toolkit is easy. All you need to do is download the binaries from the site (or you can download the package with the source files if you want to do a bit of tweaking of your own). Once you’ve downloaded and unzipped it onto your drive, you can add a reference to the dll’s in your project. </p>
<p>Right click on references and select add reference:</p>
<p><img src="mhtml:file://C:\Users\Aimee\Desktop\test\Problem_20090222_1516.mht!screenshot_0006.jpeg" width="640" height="378" /></p>
</p>
<p>In my case I wanted to make use of the PieCharts so I added the DataVisualization dlls:</p>
<p><img src="mhtml:file://C:\Users\Aimee\Desktop\test\Problem_20090222_1516.mht!screenshot_0008.jpeg" width="640" height="378" /></p>
<p>Also, to make things easier, you can add these new controls to the toolbox by right-clicking on it and selecting Choose Items..</p>
<p><img src="mhtml:file://C:\Users\Aimee\Desktop\test\Problem_20090222_1516.mht!screenshot_0011.jpeg" width="640" height="378" /></p>
<p>Then navigating to where you unzipped the dlls and of course selecting. Your toolbox should then be populated with the controls when this is done. Note that you won’t be able to drag and drop any of the controls to the design view, but you should be able to do it on the XAML code. When you do that, Visual Studio will automatically add a reference to the namespace and you can start using the control in your code. You’ll get something like:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2009/02/image19.png"><img style="display: inline" title="image" alt="image" src="http://aimeegurl.com/wp-content/uploads/2009/02/image-thumb20.png" width="559" height="132" /></a> </p>
<p>For the sample, I followed what was stated in the <a href="http://www.codeplex.com/Silverlight/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%202&amp;referringTitle=Home">guided tour</a>, but I moved the title attribute to the Chart element. The title didn’t seem to show when I placed it on the PieSeries element:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2009/02/image20.png"><img style="display: inline" title="image" alt="image" src="http://aimeegurl.com/wp-content/uploads/2009/02/image-thumb21.png" width="676" height="239" /></a> </p>
<p>As for what the application does, it simply reads the latest 10 posts from my feed and counts the number of posts tagged as personal, media, tech, and the posts whose title starts with “Tweets” which are basically posts that aggregate my twitter posts in supposedly a day. I wanted to have a visual of how much I’m actually leaving this blog to the hands of my twitter aggregator :-S. </p>
<p> <iframe style="width: 481px; height: 400px" src="http://www.badgorilla.net/toolkittest/" width="100%" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2009/02/23/playing-with-the-silverlight-toolkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 &amp; Dynamics CRM</title>
		<link>http://aimeegurl.com/2008/11/27/silverlight-2-dynamics-crm/</link>
		<comments>http://aimeegurl.com/2008/11/27/silverlight-2-dynamics-crm/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 06:52:06 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/11/27/silverlight-2-dynamics-crm/</guid>
		<description><![CDATA[I was doing some research on Silverlight 2 &#38; Dynamics CRM integration and found this post by Humberto Lezama Guadarrama where he posts a sample project that demonstrates how to consume Dynamics CRM Services directly from Silverlight 2. I was getting an initialize error when I tried to run the code though. This post helped [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>I was doing some research on Silverlight 2 &amp; Dynamics CRM integration and found <a href="http://blogs.msdn.com/lezamax/archive/2008/11/05/sample-silverlight-2-and-crm.aspx">this post</a> by <a href="http://blogs.msdn.com/lezamax">Humberto Lezama Guadarrama</a> where he posts a sample project that demonstrates how to consume Dynamics CRM Services directly from Silverlight 2. I was getting an initialize error when I tried to run the code though. <a href="http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2008/07/22/quick-silverlight-tip-quot-initializeerror-2103-invalid-or-malformed-application-quot-what-is-it-and-how-to-deal-with-it.aspx">This post</a> helped me fix that. Turns out, there were some inconsistencies in the namespace declarations in the project properties. I’ve modified the code and uploaded them here for those of you who want to straight away run it without having to do the MODs yourself. </p>
<p><iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-bdfb7845c22e26b6.skydrive.live.com/embedrow.aspx/Projects/CRMSilverlightDirect-MOD.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
<p><em>Note: to run the project, you should have Dynamics CRM installed and you’ll need to modify the server name and org name in the code to get it to work. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/11/27/silverlight-2-dynamics-crm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDC SOTD: Building a Graphics-Intensive Application in Silverlight</title>
		<link>http://aimeegurl.com/2008/10/31/pdc-sotd-building-a-graphics-intensive-application-in-silverlight/</link>
		<comments>http://aimeegurl.com/2008/10/31/pdc-sotd-building-a-graphics-intensive-application-in-silverlight/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 05:39:00 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[pdc]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/10/31/pdc-sotd-building-a-graphics-intensive-application-in-silverlight/</guid>
		<description><![CDATA[There’s so much content on http://www.microsoftpdc.com and I’m trying to watch at least once a day. So my PDC Session of the Day is this Building a Graphics-Intensive Application in Silverlight by Seema Ramchandani She highlights quite a number of things to bear in mind when you’re doing lots of animations, image &#38; video rendering [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p><a href="http://channel9.msdn.com/pdc2008/PC06/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://aimeegurl.com/wp-content/uploads/2008/10/image2.png" width="248" height="141" /></a></p>
<p>There’s so much content on <a href="http://www.microsoftpdc.com">http://www.microsoftpdc.com</a> and I’m trying to watch at least once a day. So my PDC Session of the Day is this <a title="http://channel9.msdn.com/pdc2008/PC06/" href="http://channel9.msdn.com/pdc2008/PC06/">Building a Graphics-Intensive Application in Silverlight by Seema Ramchandani</a></p>
<p>She highlights quite a number of things to bear in mind when you’re doing lots of animations, image &amp; video rendering in your application. She also talks about a tool called XPerf which allows to “dissect” your CPU processes in order to analyze the performance of your applications. You can read more about this tool <a href="http://blogs.msdn.com/seema/archive/2008/10/08/xperf-a-cpu-sampler-for-silverlight.aspx">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/10/31/pdc-sotd-building-a-graphics-intensive-application-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Web Developer 2008 Express Supports Solutions!</title>
		<link>http://aimeegurl.com/2008/10/23/visual-web-developer-2008-express-supports-solutions/</link>
		<comments>http://aimeegurl.com/2008/10/23/visual-web-developer-2008-express-supports-solutions/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 14:56:13 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/10/23/visual-web-developer-2008-express-supports-solutions/</guid>
		<description><![CDATA[With the goal of stressing out my new adopted baby, Brownie (yes I know it makes her sound like a dog but hey, what can I do, it’s brown and I wasn’t feeling very creative when I got her), I installed Visual Web Developer 2008 Express Edition, because I figured that one day while sitting [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/10/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/10/image-thumb.png" width="644" height="411" /></a> </p>
<p>With the goal of stressing out my new adopted baby, Brownie (yes I know it makes her sound like a dog but hey, what can I do, it’s brown and I wasn’t feeling very creative when I got her), I installed Visual Web Developer 2008 Express Edition, because I figured that one day while sitting at a cafe, I would probably have the urge to code and will need to have some form of VS on this little one. (I’m already thinking about how I can possible expand this girl’s memory just a little bit). I was pleasantly surprised, when I started creating a new Silverlight project, to see that it actually now supported solutions! I remember before, that was probably the most evident limitation of the express editions from the non-free ones (:p). I also tried out opening a solution that was built through the Pro edition and it seemed to work fine too! I think this is great news for all the hobbyist developers out there who would just like to try their hand out or start learning how to build all sorts of cool .NET applications. What I’d really love to see though is allowing Express Editions build for WinMo hrmmm..</p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/10/23/visual-web-developer-2008-express-supports-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing to Move to RTW</title>
		<link>http://aimeegurl.com/2008/10/13/preparing-to-move-to-rtw/</link>
		<comments>http://aimeegurl.com/2008/10/13/preparing-to-move-to-rtw/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 05:47:52 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/10/13/preparing-to-move-to-rtw/</guid>
		<description><![CDATA[For those of you who have been working on the Silverlight RC0 bits getting yourself ready for the release, check out this blog post from Laurence Moroney where he talks about how to get your RC0 and Beta 2 bits deployed side by side so you don’t have to worry about when the clock strikes [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>For those of you who have been working on the Silverlight RC0 bits getting yourself ready for the release, check out this <a href="http://blogs.msdn.com/webnext/archive/2008/10/08/silverlight-rc0-and-beta-2-side-by-side-question-of-the-day.aspx">blog post</a> from <a href="http://blogs.msdn.com/webnext">Laurence Moroney</a> where he talks about how to get your RC0 and Beta 2 bits deployed side by side so you don’t have to worry about when the clock strikes 12 and your users start upgrading their plugins to the RTW version. Party on! <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I tried out the fix myself on <a href="http://www.technoeuphoria.com/pissoff">http://www.technoeuphoria.com/pissoff</a> and it seems to work for me! <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/10/13/preparing-to-move-to-rtw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live Media GPS = Awesome!</title>
		<link>http://aimeegurl.com/2008/09/11/live-media-gps-awesome/</link>
		<comments>http://aimeegurl.com/2008/09/11/live-media-gps-awesome/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 01:47:42 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Software + Services]]></category>
		<category><![CDATA[Virtual Earth]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/09/11/live-media-gps-awesome/</guid>
		<description><![CDATA[I was browsing http://www.liveside.net&#160; last night and saw this article on a really killer Windows Mobile application called Live Media GPS. If some of you have heard of Qik, it’s the same concept. It has a software component that runs on your GPS enabled Windows Mobile phone and allows you to stream videos on the [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>I was browsing <a href="http://www.liveside.net">http://www.liveside.net</a>&#160; last night and saw <a href="http://liveside.net/main/archive/2008/09/10/stream-video-and-location-together-with-gps-enabled-mobile-video.aspx">this article</a> on a really killer Windows Mobile application called Live Media GPS. If some of you have heard of <a href="http://qik.com">Qik</a>, it’s the same concept. It has a software component that runs on your GPS enabled Windows Mobile phone and allows you to stream videos on the web. <a href="http://www.ix-m.com/gps-beta/Default.aspx">The portal</a> is not as rich as Qik’s portal yet. What happens is when you choose to broadcast a video, it won’t allow you to select off the bat that you want to publish your video right away. The mobile client has SMS notification though I haven’t tried it out yet. I’ll update this post when I get to try it out. The output is streamed via a Silverlight player, and on the right hand side, you’ll find the GPS location plotted on Virtual Earth. COOLNESS!!</p>
<p>Live Media GPS is an addition to their already existing Live Media application (which gets installed when you install the client) that allows much more functionality like making the video public, viewing your “buddy cams”, viewing the public broadcasts. Apparently, aside from videos, you can also stream other media such as images, presentations etc. Will have to find a buddy to test this out with. </p>
<p>Live Media also comes with a desktop client which I unfortunately have not been able to try because they don’t currently have a version that supports 64-bit *sob*. I’ll probably try it out on one of the other machines here once I have the time. </p>
<p><em>“This is a test of the emergency broadcast system…”</em></p>
<p>&#160;<iframe style="width: 613px; height: 422px" height="400" src="http://www.ix-m.com/gps-beta/PlayBroadcast.aspx?ixgps=jawss_27711_11092008030309&amp;embed=1&amp;style=0" frameborder="0" width="680"></iframe></p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
<p>If ever I get kidnapped, I’ll have a piece of software to help people find me.. provided they don’t keep me where the GPS &amp; 3G don’t show <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/09/11/live-media-gps-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SingTel Heart Race Test!</title>
		<link>http://aimeegurl.com/2008/08/15/singtel-heart-race-test/</link>
		<comments>http://aimeegurl.com/2008/08/15/singtel-heart-race-test/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 15:48:43 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[deepzoom]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/08/15/singtel-heart-race-test/</guid>
		<description><![CDATA[I had the great opportunity to help Crayon Digital get enabled on Silverlight for one of the projects they had to deliver for the SingTel Singapore Grand Prix and I have to say, they’ve come up with some pretty sleek stuff and I’m sure you GUYS will agree Check out the Heart Race Test which [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>I had the great opportunity to help <a href="http://www.crayondigital.net/">Crayon Digital</a> get enabled on Silverlight for one of the projects they had to deliver for the <a href="http://www.singtelrace.com">SingTel Singapore Grand Prix</a> and I have to say, they’ve come up with some pretty sleek stuff and I’m sure you GUYS will agree <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Check out the <a href="http://www.singtelrace.com/SingTel-Grid-Girls_Heart-Race.aspx">Heart Race Test</a> which the team has very impressively built in less than a month, including time taken to build the concept, assets as well as honing Silverlight development skills!</p>
<p>Loads of videos on the Grid Girls but my favorite is how they used Deep Zoom. <a href="http://www.singtelrace.com/SingTel-Grid-Girls_Heart-Race.aspx">Check the site out!</a></p>
<p><a href="http://www.singtelrace.com/SingTel-Grid-Girls_Heart-Race.aspx"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="436" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/08/image.png" width="644" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/08/15/singtel-heart-race-test/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yet another deep zoom application</title>
		<link>http://aimeegurl.com/2008/08/06/yet-another-deep-zoom-application/</link>
		<comments>http://aimeegurl.com/2008/08/06/yet-another-deep-zoom-application/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 19:18:50 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Cool Apps]]></category>
		<category><![CDATA[Deep Zoom]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/08/06/yet-another-deep-zoom-application/</guid>
		<description><![CDATA[Came across another really awesome Silverlight Application that makes use of Deep Zoom done by Kelly Blue Book which I believe they call The Perfect Car Finder. Tim Heuer talks about it more in his blog post. Building deep zoom applications can actually be pretty straightforward. All you need to do is make use of [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>Came across another really awesome Silverlight Application that makes use of Deep Zoom done by <a href="http://www.kbb.com">Kelly Blue Book</a> which I believe they call <a href="http://www.kbb.com/kbb/PerfectCarFinder/PhotoEdition.aspx">The Perfect Car Finder</a>. <a href="http://timheuer.com">Tim Heuer</a> talks about it more <a href="http://timheuer.com/blog/archive/2008/08/05/kelley-blue-book-uses-silverlight-and-deepzoom.aspx">in his blog post</a>. Building deep zoom applications can actually be pretty straightforward. All you need to do is make use of the <a href="http://www.liveside.net/blogs/main/archive/2008/08/03/deep-zoom-composer-updated-now-with-photo-stitching.aspx">Deep Zoom Composer</a> to stitch and compose your source image, and it will automatically generate the .xap (Silverlight package) as well as a default html test page for you. Now if you want to take Deep Zoom a step further, <a href="http://blog.kirupa.com/?p=212">here’s a post</a> by <a href="http://blog.kirupa.com/">KIRUPA.CHINNATHAMBI</a> that shows how you can implement a deep zoom application that allows you to filter by tag (code included). Cool stuff!</p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/08/06/yet-another-deep-zoom-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mix for Students: facebook development on .NET</title>
		<link>http://aimeegurl.com/2008/07/26/mix-for-students-facebook-development-on-net/</link>
		<comments>http://aimeegurl.com/2008/07/26/mix-for-students-facebook-development-on-net/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 11:03:40 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Code Bits]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/07/26/mix-for-students-facebook-development-on-net/</guid>
		<description><![CDATA[I did a session on facebook development using the facebook developer toolkit where I also showed how I integrated my Piss Off Silverlight application into a facebook app, which I now call PissBook. I’ve registered the pissbook url but have yet to point it to my app as it seems that facebook isn’t allowing me [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>I did a session on facebook development using the <a href="http://www.codeplex.com/FacebookToolkit">facebook developer toolkit</a> where I also showed how I integrated my <a href="http://innovativesingapore.com/blogs/jocelyn/archive/2008/07/02/bored-to-death.aspx">Piss Off</a> Silverlight application into a facebook app, which I now call <a href="http://apps.facebook.com/pissbook">PissBook</a>.<strike> I’ve registered the pissbook url but have yet to point it to my app as it seems that facebook isn’t allowing me to save it as “addable” on facebook <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </strike>&#160; I forgot to put in the post add URL ^_^</p>
<p>&#160;<a href="http://aimeegurl.com/wp-content/uploads/2008/07/image5.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="118" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb4.png" width="480" border="0" /></a> </p>
<p>What I did was take this silverlight app:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image6.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="568" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb5.png" width="487" border="0" /></a> </p>
<p>And showed how you can make it work with data from facebook (or any other datasource for that matter). If you are using the default page generated by the Silverlight project, you would have something like:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image7.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="48" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb6.png" width="457" border="0" /></a> </p>
<p>on the Page_Load event, you should then be able to add values from your Request variable, in this case the logged in user name, and the friend’s name which i picked up from facebook’s friend-selector component, and pass these as InitParameters to my Silverlight Application.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image8.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="204" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb7.png" width="422" border="0" /></a>     <br />I then needed to do a bit of tweaking in my App.xaml file on the Application_Startup method where I parsed the initialization Parameters and passed it to the constructor on my Page user control, which is basically my Silverlight application.</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image9.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="311" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb8.png" width="467" border="0" /></a> </p>
<p>I then created a new constructor for my Page.xaml, which is more or less the same as the original one, except this accepts some parameters and assigns them to the textboxes in my application:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image10.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="245" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb9.png" width="462" border="0" /></a> </p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image11.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="282" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb10.png" width="469" border="0" /></a> </p>
<p>A simple application but it basically shows you how you can integrate your Silverlight applications with dynamic datasources through its InitParams property.</p>
<p>&#160;</p>
<p><a href="http://apps.facebook.com/facebooksession"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="541" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image12.png" width="494" border="0" /></a> </p>
<p>Code and slides are here:</p>
<p><iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 26px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-bdfb7845c22e26b6.skydrive.live.com/embedrow.aspx/Presentations/Mix%20For%20Students" frameborder="0" scrolling="no"></iframe></p>
<p>* NOTE: for some reason, when you’re not logged in, facebook gives a 404 when i try to access the app directly from <a href="http://apps.facebook.com/facebooksession">http://apps.facebook.com/facebooksession</a> I’ll update this as soon as I find out a resolution.</p>
<p>this is apparently a 6-month old bug <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a title="http://bugs.developers.facebook.com/show_bug.cgi?id=1406" href="http://bugs.developers.facebook.com/show_bug.cgi?id=1406">http://bugs.developers.facebook.com/show_bug.cgi?id=1406</a> still unresolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/07/26/mix-for-students-facebook-development-on-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embed a font</title>
		<link>http://aimeegurl.com/2008/07/25/embed-a-font/</link>
		<comments>http://aimeegurl.com/2008/07/25/embed-a-font/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 09:05:15 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Code Bits]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/07/25/embed-a-font/</guid>
		<description><![CDATA[If you want to embed a font into your Silverlight applications, add the font into your project: Set the Build Action file property to embedded resource: Use the following code snippet to use the font as a font source for your components: Assembly ass = Assembly.GetExecutingAssembly(); Stream stream = ass.GetManifestResourceStream(&#34;EmbeddedResource.Font.pricedow.ttf&#34;); this.test.FontSource = new FontSource(stream); this.test.FontFamily [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<p>If you want to embed a font into your Silverlight applications, add the font into your project:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image2.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="178" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb1.png" width="174" border="0" /></a> </p>
<p>Set the Build Action file property to embedded resource:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image3.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="251" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb2.png" width="263" border="0" /></a> </p>
<p>Use the following code snippet to use the font as a font source for your components:</p>
<pre class="code"><span style="color: #2b91af">Assembly </span>ass = <span style="color: #2b91af">Assembly</span>.GetExecutingAssembly();
<span style="color: #2b91af">Stream </span>stream =</pre>
<pre class="code">ass.GetManifestResourceStream(<span style="color: #a31515">&quot;EmbeddedResource.Font.pricedow.ttf&quot;</span>);
<span style="color: blue">this</span>.test.FontSource = <span style="color: blue">new </span><span style="color: #2b91af">FontSource</span>(stream);
<span style="color: blue">this</span>.test.FontFamily = <span style="color: blue">new </span><span style="color: #2b91af">FontFamily</span>(<span style="color: #a31515">&quot;Pricedown&quot;</span>);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>XAML looking something like:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">Grid </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;LayoutRoot&quot; </span><span style="color: red">Background</span><span style="color: blue">=&quot;White&quot;&gt;
    &lt;</span><span style="color: #a31515">Canvas</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">TextBlock </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;test&quot; </span><span style="color: red">FontFamily</span><span style="color: blue">=&quot;annifont.ttf#Annifont&quot; </span></pre>
<pre class="code"><span style="color: red">         Text</span><span style="color: blue">=&quot;grand theft auto IV&quot; </span><span style="color: red">FontSize</span><span style="color: blue">=&quot;30&quot;/&gt;
    &lt;/</span><span style="color: #a31515">Canvas</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">Grid</span><span style="color: blue">&gt;</span></pre>
<p>And the result:</p>
<p><a href="http://aimeegurl.com/wp-content/uploads/2008/07/image4.png"><img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="205" alt="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image-thumb3.png" width="354" border="0" /></a></p>
<p>Source: </p>
<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:26px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-bdfb7845c22e26b6.skydrive.live.com/embedrow.aspx/Projects/EmbeddedResource.zip"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/07/25/embed-a-font/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bored to death</title>
		<link>http://aimeegurl.com/2008/07/02/bored-to-death-2/</link>
		<comments>http://aimeegurl.com/2008/07/02/bored-to-death-2/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 13:37:00 +0000</pubDate>
		<dc:creator>Aimee</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://aimeegurl.com/2008/07/02/bored-to-death-2/</guid>
		<description><![CDATA[It was raining and I was a bit lazy to go home early so I decided to look for something to do. I wanted to try out some of the basic networking stuff with Silverlight and remembered googlefight I thought it was a simple enough concept to implement so I figured I’d give it a [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />It was raining and I was a bit lazy to go home early so I decided to look for something to do. I wanted to try out some of the basic networking stuff with <a href="http://www.silverlight.net">Silverlight</a> and remembered <a href="http://www.googlefight.com">googlefight</a></p>
<p><a href="http://www.googlefight.com"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px; border-right-width: 0px" title="image" src="http://aimeegurl.com/wp-content/uploads/2008/07/image.png" border="0" alt="image" width="240" height="227" /></a></p>
<p>I thought it was a simple enough concept to implement so I figured I’d give it a try. I had some time to kill before my 11:00pm conference call. So I came up with “<a href="http://www.technoeuphoria.com/pissoff">Piss Off!</a>”.</p>
<p>// I have a feeling this won’t be up here for long as it might offend some people <img src='http://aimeegurl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://aimeegurl.com/2008/07/02/bored-to-death-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

