<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9043655167088908709</id><updated>2012-02-16T03:16:30.251-08:00</updated><title type='text'>Silverlight C# Text and Graphics</title><subtitle type='html'>Microsoft Silverlight and C#</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-8191857545339742142</id><published>2009-07-17T05:01:00.000-07:00</published><updated>2009-07-17T06:42:15.540-07:00</updated><title type='text'>DomainUpDown Controls with Silverlight 3</title><content type='html'>The DomainUpDown control allows the user to spin through a collection of data objects, focusing on one at a time. DomainUpDown is one of the new controls available in the Silverlight 3 Toolkit.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_30faWJvthIk/SmB_nbHOzeI/AAAAAAAAAJ0/WDlXY8wmc_8/s1600-h/BlueDomain400.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 110px;" src="http://2.bp.blogspot.com/_30faWJvthIk/SmB_nbHOzeI/AAAAAAAAAJ0/WDlXY8wmc_8/s400/BlueDomain400.jpg" border="0" alt="DomainUpDown" id="BLOGGER_PHOTO_ID_5359423871840603618" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To begin this tutorial, set up a new navigation application project as per my &lt;a href="http://silverlemma.blogspot.com/2009/07/first-look-at-silverlight-3.html" target="_newtab"&gt;last post&lt;/a&gt;. This tutorial is informed by Jesse Liberty's video, which I recommend you watch on: &lt;a href="http://silverlight.net/learn/learnvideo.aspx?video=187310" target="_newtab"&gt;silverlight.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Data Classes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, we need to create two classes to store the data. We use a Book class to represent each book, storing the Name and Author.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class Book&lt;br /&gt;{&lt;br /&gt; public string Name { get; set; }&lt;br /&gt; public string Author { get; set; }&lt;br /&gt;&lt;br /&gt; public Book(string name, string author)&lt;br /&gt; {&lt;br /&gt;     Name = name;&lt;br /&gt;     Author = author;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The BookCollection object contains all of the books used in the tutorial:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class BookCollection&lt;br /&gt;{&lt;br /&gt; public static ObjectCollection Books&lt;br /&gt; {&lt;br /&gt;     get&lt;br /&gt;     {&lt;br /&gt;        ObjectCollection books = new ObjectCollection();&lt;br /&gt;&lt;br /&gt;        books.Add(new Book("Possession", "A.S. Byatt"));&lt;br /&gt;        books.Add(new Book("Lord of the Rings", "J.R.R Tolkein"));&lt;br /&gt;        books.Add(new Book("The Long Dark Tea-Time of the Soul", "Douglas Adams"));&lt;br /&gt;        books.Add(new Book("The Sandman", "Neil Gaiman"));&lt;br /&gt;&lt;br /&gt;        return books;&lt;br /&gt;     }&lt;br /&gt; }    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add references&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Turning to the Silverlight project in the Solution Explorer, add references to the following two DLLs, which can be found in your Silverlight toolkit installation:&lt;br /&gt;&lt;br /&gt;System.Windows.Controls.Toolkit&lt;br /&gt;System.Windows.Controls.Input.Toolkit&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add a Namespace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add the following namespace to the top of your page:&lt;br /&gt;&lt;br /&gt;xmlns:in="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add the DomainUpDown Control&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add the following code to the Grid in your xaml file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;    &amp;lt;ColumnDefinition Width="0.5*"/&amp;gt;&lt;br /&gt;    &amp;lt;ColumnDefinition Width="0.5*"/&amp;gt;&lt;br /&gt;&amp;lt;/Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;&amp;lt;Grid.RowDefinitions&amp;gt;&lt;br /&gt;    &amp;lt;RowDefinition Height="0.2*"/&amp;gt;&lt;br /&gt;    &amp;lt;RowDefinition Height="0.8*"/&amp;gt;&lt;br /&gt;&amp;lt;/Grid.RowDefinitions&amp;gt;&lt;br /&gt;&amp;lt;StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Bottom" Style="{StaticResource ContentPanelStyle}" &amp;gt;&lt;br /&gt;    &amp;lt;ContentControl Content="Domain Up Down" VerticalAlignment="Top" HorizontalAlignment="Left"/&amp;gt;&lt;br /&gt;    &amp;lt;in:DomainUpDown x:Name="DomainUD" ItemsSource="{Binding}" Height="90" FontSize="32" IsEditable="False"&amp;gt;&lt;br /&gt; &amp;lt;in:DomainUpDown.ItemTemplate&amp;gt;&lt;br /&gt;     &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;  &amp;lt;StackPanel&amp;gt;&lt;br /&gt;      &amp;lt;TextBlock Text="{Binding Name}" FontSize="32" Foreground="#66000000" Height="50"/&amp;gt;&lt;br /&gt;      &amp;lt;TextBlock Text="{Binding Author}" FontSize="24" Foreground="#33000000" Height="40" /&amp;gt;&lt;br /&gt;  &amp;lt;/StackPanel&amp;gt;&lt;br /&gt;     &amp;lt;/DataTemplate&amp;gt;&lt;br /&gt; &amp;lt;/in:DomainUpDown.ItemTemplate&amp;gt;&lt;br /&gt;    &amp;lt;/in:DomainUpDown&amp;gt;&lt;br /&gt;&amp;lt;/StackPanel&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Add the DataContext&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add the following line to your code-behind (.cs) page, just after the &lt;i&gt;InitializeComponent()&lt;/i&gt; line:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;DomainUD.DataContext = BookCollection.Books;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This will tell the binding engine to use our books collection. Once this step is done, we can press F5 and see our DomainUpDown control in action!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Editing the DomainUpDown&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You'll notice in the code above that the DomainUpDown has its &lt;i&gt;IsEditable&lt;/i&gt; attribute set to "False". If you set it to "True", you will need to add the following code to the Book object:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public override string ToString()&lt;br /&gt;{&lt;br /&gt;    return Name + " : " + Author;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The reason is that when the user clicks on the content of the DomainUpDown, a call is made to the Book's ToString() method (which by default will return what type of object it is). The code above overrides this default behaviour and returns a nicely formatted string containing the Name and Author fields.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cycling&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Another feature of the DomainUpDown is that you can set its IsCyclic attribute to "True" (it is False by default, restricting the user from browsing to a data object before the first, and after the last in the collection). Setting IsCyclic to "True" allows the user to cycle somewhat more seemlessly through the set of data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well that concludes this tutorial. I hope you have enjoyed learning how to create a DomainUpDown control, populate it with data, and how to tweak the control's attributes to change its behaviour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-8191857545339742142?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/8191857545339742142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/07/domainupdown-controls-with-silverlight.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8191857545339742142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8191857545339742142'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/07/domainupdown-controls-with-silverlight.html' title='DomainUpDown Controls with Silverlight 3'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_30faWJvthIk/SmB_nbHOzeI/AAAAAAAAAJ0/WDlXY8wmc_8/s72-c/BlueDomain400.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-1352346044999379768</id><published>2009-07-14T01:23:00.000-07:00</published><updated>2009-07-16T06:04:24.343-07:00</updated><title type='text'>A First Look at Silverlight 3</title><content type='html'>Silverlight 3 is here and there are a lot of new goodies to check out. Let's take a first look :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Installing Silverlight 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Naturally, you will need to have Visual Studio 2008 SP1 installed. Uninstall Silverlight 2 if you already have it installed, and then  install all the new Silverlight 3 tools, which you can download from &lt;a href="http://silverlight.net/GetStarted/" target="_newtab"&gt;Silverlight.net/GetStarted/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Make sure that you also install Expression Blend 3 with Sketchflow, as well as the Silverlight 3 browser plugin.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Hello Silverlight 3!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open Visual Studio and navigate to File &gt; New &gt; Project and choose 'Silverlight Navigation Application'. I called my project 'Hello', and clicked 'Ok'. If you are working on my computer, Visual Studio will crash at this point (&gt;.&lt;) but the project is created. If this happens to you as well, just open Visual Studio again and attach the Web and Silverlight projects by navigating to File &gt; Add &gt; Existing Project.&lt;br /&gt;&lt;br /&gt;Now we can build the project (by pressing F5) and see what it looks like in the browser. You can see placeholder text on the top left, 'Application Name' and on the top right you should see the navigation links to the 'home' and 'about' pages. In the browser's URL bar, you should see a URL ending with 'TestPage.html#/Home' or 'TestPage.html#/About' when you click on the 'about' link.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Adding Your Own Content&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open Mainpage.xaml and find the line below:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;TextBlock x:Name="ApplicationNameTextBlock" Style="{StaticResource ApplicationNameStyle}" Text="Application Name"/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Change the &lt;i&gt;Text="Application Name"&lt;/i&gt; attribute to read &lt;i&gt;Text="Hello Silverlight 3"&lt;/i&gt;. When you hit F5, you will see the text in the top right corner has changed.&lt;br /&gt;&lt;br /&gt;Now, let's add a new page by right-clicking on the 'Views' folder in the Silverlight project and choosing 'Add &gt; New Item &gt; Silverlight Page'. Call it 'Info.xaml' and add the following inside the default Grid:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}"&gt;&lt;br /&gt;&amp;lt;StackPanel x:Name="ContentStackPanel"&gt;&lt;br /&gt;    &amp;lt;TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}"&lt;br /&gt;    Text="Info"/&gt;&lt;br /&gt;    &amp;lt;TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}"&lt;br /&gt;    Text="This is the info page"/&gt;&lt;br /&gt;&amp;lt;/StackPanel&gt;&lt;br /&gt;&amp;lt;/ScrollViewer&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We need to add the info page to the navigation. In MainPage.xaml add the following lines after the 'about' hyperlink:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Rectangle x:Name="Divider2" Style="{StaticResource DividerStyle}"/&amp;gt;&lt;br /&gt;&amp;lt;HyperlinkButton x:Name="Link3" Style="{StaticResource LinkStyle}" NavigateUri="/Info" TargetName="ContentFrame" Content="info"/&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Themes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's choose a theme for our Silverlight application. First, go to the &lt;a href="http://gallery.expression.microsoft.com/en-us/site/search?f[0].Type=RootCategory&amp;f[0].Value=themes" target="_newtab"&gt;Microsoft Expression themes gallery&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can download &lt;i&gt;all&lt;/i&gt; the Silverlight 3 themes if you want to :)&lt;br /&gt;&lt;br /&gt;Each theme should contain a .png that shows a preview of what the theme looks like and a Styles.xaml file. You can just drag and drop the Styles.xaml file to replace the Styles.xaml in your assets folder, to give your application a vastly different (and quite professional looking) look and feel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-1352346044999379768?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/1352346044999379768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/07/first-look-at-silverlight-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1352346044999379768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1352346044999379768'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/07/first-look-at-silverlight-3.html' title='A First Look at Silverlight 3'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-8891041946745247571</id><published>2009-04-30T02:40:00.000-07:00</published><updated>2009-04-30T04:30:41.916-07:00</updated><title type='text'>Switching Pages and Passing Parameters in Silverlight</title><content type='html'>My latest project has a few pages in it and I wanted to learn the best way to switch between them. I watched Jesse Liberty's &lt;a href="http://silverlight.net/learn/learnvideo.aspx?video=56933"&gt;videos&lt;/a&gt; and they really gave me a good understanding of the mechanisms involved. I recommend you watch them both!&lt;br /&gt;&lt;br /&gt;I found the videos really informative, and wanted to write down a simple way of switching pages and passing parameters between them in Silverlight.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Setting the Landing Page&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can set the first page that loads when your Silverlight app starts up, by changing the following line in App.xaml.cs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;this.RootVisual = new MyProject.Login();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;My first page is a login page, where the user enters their name and password. If their login is successful, I want the page to change to the success page. I'm using Web Services to check their username and password, but we won't go into all that here :)&lt;br /&gt;&lt;br /&gt;(Do see my &lt;a href="http://silverlemma.blogspot.com/2009/04/web-services-and-silverlight.html"&gt;previous post&lt;/a&gt; to learn about Web Services though!)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Receiving Parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I put a textblock on the Success.xaml page, to show the parameters when they arrive:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;TextBlock Name="welcomeText"/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I add this method to the Success.xaml.cs page:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public void WelcomeMessage(String parm)&lt;br /&gt;{&lt;br /&gt;    this.parm = parm;&lt;br /&gt;    welcomeText.Text = "Welcome " + parm;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The &lt;span style="font-style:italic;"&gt;WelcomeMessage()&lt;/span&gt; method sets the &lt;span style="font-style:italic;"&gt;parm&lt;/span&gt; parameter to the welcomeText text block, creating a nice welcome message.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Changing the Page &amp; Sending Parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;My Login.xaml page has a textbox on it that folks use to enter their user names:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;TextBox Name="userText"/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I add the following three lines of code to the Login.xaml.cs page, wherever I want to change pages. This could be in a button click event handler, or in the case of my login app - the completed method of a web service call. So let's assume that the user has logged in successfully - and now it is time to switch to the success page:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Success page = new Success();&lt;br /&gt;page.WelcomeMessage(userText.Text);&lt;br /&gt;this.Content = page;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the first line, I create a new Success page object. Then, I pass the userText String parameter to the page object's &lt;span style="font-style:italic;"&gt;WelcomeMessage()&lt;/span&gt; method. In the third line, I have &lt;span style="font-style:italic;"&gt;this.Content = page&lt;/span&gt;, which loads the success page. When the success page loads, it will already have had the parameters passed to it, so it will display the welcome message ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-8891041946745247571?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/8891041946745247571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/04/switching-pages-and-passing-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8891041946745247571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8891041946745247571'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/04/switching-pages-and-passing-parameters.html' title='Switching Pages and Passing Parameters in Silverlight'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-3735894844554864818</id><published>2009-04-23T02:20:00.000-07:00</published><updated>2009-04-28T07:33:24.923-07:00</updated><title type='text'>Web Services and Silverlight</title><content type='html'>I wanted to create a step-by-step guide for making a web service that I can connect to from my Silverlight applications. There are certain steps, that need to be followed in a certain order, and I hope to make this process easier :)&lt;br /&gt;&lt;br /&gt;This tutorial is really great: &lt;a href="http://silverlight.net/learn/learnvideo.aspx?video=47177"&gt;(Video)&lt;/a&gt; Tim Heuer does an awesome job of explaining how to set up web services, so his video is highly recommended. Here is a link to his tutorial blog as well: &lt;a href="http://timheuer.com/blog/archive/2008/03/14/calling-web-services-with-silverlight-2.aspx"&gt;(Tutorial Blog)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am using Visual Studio 2008 with Silverlight enabled WCF services in this step-by-step guide:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1. Create the Project&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Visual Studio 2008 (with Silverlight installed), create a new Silverlight Application.&lt;br /&gt;&lt;br /&gt;Right click on the website project (not the one with the XAML pages) and Add &gt; New Item &gt; Silverlight enabled WCF service. I called it 'SilverWCF.svc'. &lt;br /&gt;&lt;br /&gt;Right-click on 'SilverWCF.svc' and choose 'View in Browser'. This is a very important step - and one to be repeated every time you make changes to the 'SilverWCF.svc.cs' file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2. Add your service code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Change the DoWork() method to do something useful, like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public string SayHello(string name)&lt;br /&gt;{&lt;br /&gt;    return "Hello " + name;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;3. Create the Interface&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On Page.xaml, add a stackpanel inside your Grid, containing a textbox, textblock and a button to create a simple interface:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;StackPanel&gt;&lt;br /&gt;    &amp;lt;TextBox Name="NameText"/&gt;&lt;br /&gt;    &amp;lt;TextBlock Name="ResultText"/&gt;&lt;br /&gt;    &amp;lt;Button Name="WCFButton" Content="Click" Click="Button_Click"/&gt;&lt;br /&gt;&amp;lt;/StackPanel&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can right click on "Button_Click" and choose 'Navigate to Event Handler' to generate the method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;4. Add a Service Reference&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Right-click on the Silverlight project and choose 'Add Service Reference'. Click on the Discover button and name the reference. I called it 'SilverSVC'.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;5. Set up the Event Handlers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The SayHelloAsync method calls the web service, passing it the value of the Text type in the NameText textbox. When the webservice completes, the SayHelloCompleted event handler puts the result string into the ResultText textblock:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;private void Button_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    SilverSVC.SilverWCFClient proxy = new webservice.SilverSVC.SilverWCFClient();&lt;br /&gt;    proxy.SayHelloCompleted += new EventHandler&lt;webservice.SilverSVC.SayHelloCompletedEventArgs&gt;(proxy_SayHelloCompleted);&lt;br /&gt;    proxy.SayHelloAsync(NameText.Text);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void proxy_SayHelloCompleted(object sender, webservice.SilverSVC.SayHelloCompletedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    ResultText.Text = e.Result;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's it, really - at this point you can build and run the project, type a name into the textbox, click the button and get a result from the web service :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-3735894844554864818?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/3735894844554864818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/04/web-services-and-silverlight.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3735894844554864818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3735894844554864818'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/04/web-services-and-silverlight.html' title='Web Services and Silverlight'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-3485805901386773856</id><published>2009-04-01T04:28:00.001-07:00</published><updated>2009-04-04T09:39:38.156-07:00</updated><title type='text'>New Poll</title><content type='html'>I wonder how many folks who visit this site have the Silverlight plug-in installed!&lt;br /&gt;&lt;br /&gt;This is a tutorial site for learning about Silverlight, so I pretty much assumed that every visitor would have Silverlight already installed :)&lt;br /&gt;&lt;br /&gt;It turns out that there are several folks who don't have Silverlight installed, so I have changed all the Silverlight controls into JPEG screen-shots for the moment. Now everyone can see what we are learning about.&lt;br /&gt;&lt;br /&gt;Please vote in the poll... &lt;br /&gt;&lt;br /&gt;(It's on the right of your screen - simply select 'yes' or 'no' and click VOTE)&lt;br /&gt;&lt;br /&gt;I'd love to get an idea of how many visitors to this blog have Silverlight installed!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-3485805901386773856?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/3485805901386773856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/04/new-poll.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3485805901386773856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3485805901386773856'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/04/new-poll.html' title='New Poll'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-7082206896765921368</id><published>2009-03-27T02:39:00.000-07:00</published><updated>2009-04-01T03:29:41.163-07:00</updated><title type='text'>Creating Pie Charts with C# and Silverlight</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/ScyfIDPk9EI/AAAAAAAAAF4/b6AvyVbuo4s/s1600-h/pie.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 203px; height: 204px;" src="http://3.bp.blogspot.com/_30faWJvthIk/ScyfIDPk9EI/AAAAAAAAAF4/b6AvyVbuo4s/s320/pie.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5317800220676125762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this post, we'll create a pie chart, using Silverlight. You can see an example of the finished pie chart in the diagram to the left.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below, I have listed the full page.xaml for the pie chart. It's quite simple - the chart itself is painted onto the canvas and there is a button to refresh the graph, using new data.&lt;br /&gt;&lt;br /&gt;I also added a TextBlock, which I used to display any test output was needed.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;UserControl x:Class="piechart.Page"&lt;br /&gt;    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" &lt;br /&gt;    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" &lt;br /&gt;    Width="400" Height="400"&gt;&lt;br /&gt;    &amp;lt;Grid x:Name="LayoutRoot" Background="White"&gt;&lt;br /&gt;        &amp;lt;Canvas Background="#ffffff" Name="graphc"&gt;&lt;br /&gt;&lt;br /&gt;            &amp;lt;TextBlock  Name="outtab" TextWrapping="Wrap" Canvas.Top="250"&gt;&amp;lt;/TextBlock&gt;&lt;br /&gt;            &amp;lt;Button Name="Button" Width="400" Height="30" Click="Button_Click" Canvas.Top="370" Content="New Graph"&gt;&amp;lt;/Button&gt;&lt;br /&gt;        &amp;lt;/Canvas&gt;&lt;br /&gt;    &amp;lt;/Grid&gt;&lt;br /&gt;&amp;lt;/UserControl&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;Below is a live, working version of the pie graph that you can click on :)&lt;br /&gt;&lt;br /&gt;Notice that if you mouse-over any of the pie slices, they will change colour.&lt;br /&gt;&lt;br /&gt;&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/piechart/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;br /&gt;Listed below is the Page.xaml.cs. The button click event refreshes the graph, using new randomly generated data.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Net;&lt;br /&gt;using System.Windows;&lt;br /&gt;using System.Windows.Controls;&lt;br /&gt;using System.Windows.Documents;&lt;br /&gt;using System.Windows.Input;&lt;br /&gt;using System.Windows.Media;&lt;br /&gt;using System.Windows.Media.Animation;&lt;br /&gt;using System.Windows.Shapes;&lt;br /&gt;&lt;br /&gt;namespace piechart&lt;br /&gt;{&lt;br /&gt;    public partial class Page : UserControl&lt;br /&gt;    {&lt;br /&gt;        String[] hex = { "#ff336699", "#ff339966", "#ff9999cc", "#ffcc6699", "#ff6699cc" };&lt;br /&gt;&lt;br /&gt;        Path[] paths = new Path[5];&lt;br /&gt;        int r = 100;    //the radius of the circle&lt;br /&gt;        piechart.Shape[] shapes = new piechart.Shape[5];&lt;br /&gt;        &lt;br /&gt;        public Page()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            outtab.Text = draw();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public String draw()&lt;br /&gt;        {&lt;br /&gt;            String output = "";&lt;br /&gt;&lt;br /&gt;            Point start = new Point(r, 0);&lt;br /&gt;            Point centre = new Point(0, 0);&lt;br /&gt;&lt;br /&gt;            //randomly assign data&lt;br /&gt;            Double total = 0.0;&lt;br /&gt;            Random rnd = new Random();&lt;br /&gt;            int[] randoms = new int[shapes.Length];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            for (int i = 0; i &lt; shapes.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                try&lt;br /&gt;                {&lt;br /&gt;                    randoms[i] = rnd.Next();&lt;br /&gt;                }&lt;br /&gt;                catch { }&lt;br /&gt;                &lt;br /&gt;                total += randoms[i];&lt;br /&gt;            }&lt;br /&gt;            Array.Sort(randoms);&lt;br /&gt;&lt;br /&gt;            double curangle = 0.0;&lt;br /&gt;&lt;br /&gt;            //Set up the array of shapes&lt;br /&gt;            for (int i = 0; i &lt; shapes.Length; i++ )&lt;br /&gt;            {&lt;br /&gt;                shapes[i] = new Shape(randoms[i], r, start, centre, hex[i]);&lt;br /&gt;                shapes[i].SetAngle(shapes[i].GetData()/total * 360);&lt;br /&gt;&lt;br /&gt;                paths[i] = shapes[i].Pie(curangle);&lt;br /&gt;                graphc.Children.Add(paths[i]);&lt;br /&gt;&lt;br /&gt;                //increment the angle&lt;br /&gt;                curangle += shapes[i].GetAngle();&lt;br /&gt;&lt;br /&gt;                output += "" + "\n";&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return output;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void Button_Click(object sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            for (int i = 0; i &lt; shapes.Length; i++)&lt;br /&gt;            {&lt;br /&gt;                graphc.Children.Remove(paths[i]);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (outtab.Text.Length &gt; 0)&lt;br /&gt;            {&lt;br /&gt;                outtab.Text = draw();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Below is Shape.cs. This class is responsible for creating the pie slices:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Net;&lt;br /&gt;using System.Windows;&lt;br /&gt;using System.Windows.Controls;&lt;br /&gt;using System.Windows.Documents;&lt;br /&gt;using System.Windows.Ink;&lt;br /&gt;using System.Windows.Input;&lt;br /&gt;using System.Windows.Media;&lt;br /&gt;using System.Windows.Media.Animation;&lt;br /&gt;using System.Windows.Shapes;&lt;br /&gt;&lt;br /&gt;namespace piechart&lt;br /&gt;{&lt;br /&gt;    public class Shape&lt;br /&gt;    {&lt;br /&gt;        int data = 0;&lt;br /&gt;&lt;br /&gt;        public void SetData(int data)&lt;br /&gt;        {&lt;br /&gt;            this.data = data;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public int GetData()&lt;br /&gt;        {&lt;br /&gt;            return data;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Point point;&lt;br /&gt;&lt;br /&gt;        public void SetPoint(Point point)&lt;br /&gt;        {&lt;br /&gt;            this.point = point;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public Point GetPoint()&lt;br /&gt;        {&lt;br /&gt;            return point;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        Double angle;&lt;br /&gt;&lt;br /&gt;        public void SetAngle(Double angle)&lt;br /&gt;        {&lt;br /&gt;            this.angle = angle;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public Double GetAngle()&lt;br /&gt;        {&lt;br /&gt;            return angle;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        String output;&lt;br /&gt;&lt;br /&gt;        public void SetOutput(String output)&lt;br /&gt;        {&lt;br /&gt;            this.output = output;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public String GetOutput()&lt;br /&gt;        {&lt;br /&gt;            return output;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        int r = 0;&lt;br /&gt;        Point start; &lt;br /&gt;        Point centre;&lt;br /&gt;        String hex = "";&lt;br /&gt;&lt;br /&gt;        public Shape(int data, int r, Point start, Point centre, String hex)&lt;br /&gt;        {&lt;br /&gt;            this.data = data;&lt;br /&gt;            this.r = r;&lt;br /&gt;            this.start = start;&lt;br /&gt;            this.centre = centre;&lt;br /&gt;            this.hex = hex;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public Path Pie(double rotangle)&lt;br /&gt;        {&lt;br /&gt;            Utils utils = new Utils();&lt;br /&gt;            Path path1 = new Path();&lt;br /&gt;&lt;br /&gt;            SolidColorBrush fb = new SolidColorBrush(utils.HexColor(hex));&lt;br /&gt;&lt;br /&gt;            PathGeometry pg1 = new PathGeometry();&lt;br /&gt;            PathFigure pf1 = new PathFigure();&lt;br /&gt;            pf1.StartPoint = start;&lt;br /&gt;&lt;br /&gt;            //calculate point&lt;br /&gt;&lt;br /&gt;            double theta = (2 * Math.PI) / 360 * angle;&lt;br /&gt;&lt;br /&gt;            double endX = (Math.Cos(theta) * r);&lt;br /&gt;            double endY = (Math.Sin(theta) * r);&lt;br /&gt;            SetPoint(new Point(endX, endY));&lt;br /&gt;&lt;br /&gt;            output += theta + " " + endX + " " + endY;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            PathSegmentCollection segments = new PathSegmentCollection();&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;            //arc1&lt;br /&gt;            ArcSegment arc1 = new ArcSegment();&lt;br /&gt;            arc1.Point = point;&lt;br /&gt;            arc1.Size = new Size(r, r);&lt;br /&gt;            if (angle &gt; 180)&lt;br /&gt;            {&lt;br /&gt;                arc1.IsLargeArc = true;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                arc1.IsLargeArc = false;&lt;br /&gt;            }&lt;br /&gt;            arc1.SweepDirection = SweepDirection.Clockwise;&lt;br /&gt;            segments.Add(arc1);&lt;br /&gt;            &lt;br /&gt;            //LineSegments&lt;br /&gt;            LineSegment ls1 = new LineSegment();&lt;br /&gt;            ls1.Point = start;&lt;br /&gt;            segments.Add(ls1);&lt;br /&gt;&lt;br /&gt;            LineSegment ls2 = new LineSegment();&lt;br /&gt;            ls2.Point = centre;&lt;br /&gt;            segments.Add(ls2);&lt;br /&gt;&lt;br /&gt;            LineSegment ls3 = new LineSegment();&lt;br /&gt;            ls3.Point = point;&lt;br /&gt;            segments.Add(ls3);&lt;br /&gt;&lt;br /&gt;            LineSegment ls4 = new LineSegment();&lt;br /&gt;            ls4.Point = start;&lt;br /&gt;            segments.Add(ls4);&lt;br /&gt;&lt;br /&gt;            TransformGroup trans = new TransformGroup();&lt;br /&gt;&lt;br /&gt;            //rotate&lt;br /&gt;            RotateTransform rt = new RotateTransform();&lt;br /&gt;            rt.Angle = rotangle;&lt;br /&gt;            trans.Children.Add(rt);&lt;br /&gt;            path1.RenderTransform = trans;&lt;br /&gt;&lt;br /&gt;            //translate&lt;br /&gt;            TranslateTransform tt = new TranslateTransform();&lt;br /&gt;            tt.X = 100;&lt;br /&gt;            tt.Y = 100;&lt;br /&gt;            trans.Children.Add(tt);&lt;br /&gt;            path1.RenderTransform = trans;&lt;br /&gt;&lt;br /&gt;            pf1.Segments = segments;&lt;br /&gt;            pg1.Figures.Add(pf1);&lt;br /&gt;            path1.Data = pg1;&lt;br /&gt;            path1.Fill = GetBrush(hex);&lt;br /&gt;            path1.Stroke = fb;&lt;br /&gt;            path1.SetValue(Canvas.TopProperty, 0.0);&lt;br /&gt;            path1.SetValue(Canvas.LeftProperty, 0.0);&lt;br /&gt;            path1.StrokeThickness = 0;&lt;br /&gt;            path1.MouseEnter += path_MouseEnter;&lt;br /&gt;            path1.MouseLeave += path_MouseLeave;&lt;br /&gt;&lt;br /&gt;            return path1;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        public Brush GetBrush(String hexcolor)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            LinearGradientBrush fillBrush = new LinearGradientBrush();&lt;br /&gt;&lt;br /&gt;            Color col = new Utils().HexColor(hexcolor);&lt;br /&gt;&lt;br /&gt;            fillBrush.StartPoint = new Point(0, 0.0);&lt;br /&gt;            fillBrush.EndPoint = new Point(0, 1.0);&lt;br /&gt;&lt;br /&gt;            // First Gradient stop&lt;br /&gt;            GradientStop gs1 = new GradientStop();&lt;br /&gt;            gs1.Color = Color.FromArgb(0, col.R, col.G, col.B);&lt;br /&gt;            gs1.Offset = 0.0;&lt;br /&gt;            fillBrush.GradientStops.Add(gs1);&lt;br /&gt;&lt;br /&gt;            // Second Gradient stop&lt;br /&gt;            GradientStop gs2 = new GradientStop();&lt;br /&gt;            gs2.Color = Color.FromArgb(col.A, col.R, col.G, col.B);&lt;br /&gt;            gs2.Offset = 0.1;&lt;br /&gt;            fillBrush.GradientStops.Add(gs2);&lt;br /&gt;&lt;br /&gt;            // Third Gradient stop&lt;br /&gt;            GradientStop gs3 = new GradientStop();&lt;br /&gt;            gs3.Color = col;&lt;br /&gt;            gs3.Offset = 1.0;&lt;br /&gt;            fillBrush.GradientStops.Add(gs3);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            return fillBrush;       &lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void path_MouseEnter(object o, MouseEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            Path path = (Path)o;&lt;br /&gt;            path.Fill = GetBrush("#6666cc");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void path_MouseLeave(object o, MouseEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            Path path = (Path)o;&lt;br /&gt;            path.Fill = GetBrush(hex);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally, note that I used the hex utility in a Utils.cs class. This just makes it convenient to convert from hex colours. You can read about this utility class in my post about &lt;a href="http://silverlemma.blogspot.com/2009/03/c-converting-from-hex-string-to-color.html"&gt;Converting from a Hex String to a Color object&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-7082206896765921368?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/7082206896765921368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/creating-pie-charts-with-c-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/7082206896765921368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/7082206896765921368'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/creating-pie-charts-with-c-and.html' title='Creating Pie Charts with C# and Silverlight'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/ScyfIDPk9EI/AAAAAAAAAF4/b6AvyVbuo4s/s72-c/pie.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-1589408874828148490</id><published>2009-03-19T02:35:00.000-07:00</published><updated>2009-03-19T03:22:14.902-07:00</updated><title type='text'>Transforms for Graphical Shapes in C#</title><content type='html'>In the previous post, we learned how to make a shape dynamically, using C#. Now we want to be able to position the shape, rotate it, or make it bigger or smaller. The way to do this is with Transforms.&lt;br /&gt;&lt;br /&gt;I have modified the draw() method that we used in the previous post, adding three transforms to the path (shape) object: ScaleTransform, TranslateTransform and RotateTransform.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public void draw()&lt;br /&gt;{&lt;br /&gt;    Path path2 = new Shapes().Pie();&lt;br /&gt;&lt;br /&gt;    TransformGroup trans = new TransformGroup();&lt;br /&gt;&lt;br /&gt;    //scale&lt;br /&gt;    ScaleTransform st = new ScaleTransform();&lt;br /&gt;    st.ScaleX = 0.5;&lt;br /&gt;    st.ScaleY = 0.5;&lt;br /&gt;    trans.Children.Add(st);&lt;br /&gt;    path2.RenderTransform = trans;&lt;br /&gt;&lt;br /&gt;    //translate&lt;br /&gt;    TranslateTransform tt = new TranslateTransform();&lt;br /&gt;    tt.X = 10;&lt;br /&gt;    tt.Y = 10;&lt;br /&gt;    trans.Children.Add(tt);&lt;br /&gt;    path2.RenderTransform = trans;&lt;br /&gt;&lt;br /&gt;    //rotate&lt;br /&gt;    RotateTransform rt = new RotateTransform();&lt;br /&gt;    rt.Angle = 15;&lt;br /&gt;    trans.Children.Add(rt);&lt;br /&gt;    path2.RenderTransform = trans;&lt;br /&gt;&lt;br /&gt;    graphc.Children.Add(path2);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ScaleTransform is used to change the size of the shape. Setting ScaleX and ScaleY to 0.5 as we have in the code snippet above, will have the effect of reducing the size of the shape by half - along both the X and Y axes.&lt;br /&gt;&lt;br /&gt;TranslateTransform is used to move the shape around the canvas in an X or Y direction.&lt;br /&gt;&lt;br /&gt;RotateTransform will rotate the shape in a clockwise direction, by the amount specified by the Angle property. The diagram below displays three ice-cream shapes with RotateTransforms applied to them:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_30faWJvthIk/ScIcoS_M-gI/AAAAAAAAAFw/JLizB_MgOg4/s1600-h/rotate.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 308px; height: 101px;" src="http://2.bp.blogspot.com/_30faWJvthIk/ScIcoS_M-gI/AAAAAAAAAFw/JLizB_MgOg4/s320/rotate.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5314841988867881474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Happy Designing! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-1589408874828148490?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/1589408874828148490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/transforms-for-graphical-shapes-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1589408874828148490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1589408874828148490'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/transforms-for-graphical-shapes-in-c.html' title='Transforms for Graphical Shapes in C#'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_30faWJvthIk/ScIcoS_M-gI/AAAAAAAAAFw/JLizB_MgOg4/s72-c/rotate.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-5107013420878194726</id><published>2009-03-19T02:14:00.000-07:00</published><updated>2009-03-19T03:01:56.818-07:00</updated><title type='text'>Creating Graphical Shapes Dynamically in C#</title><content type='html'>In the previous posts, we used XAML to create shapes in Silverlight. Now, let's take a look at how we can create shapes in the code-behind, using C#. The diagram shows what the end result will look like:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/ScIYAMyC4NI/AAAAAAAAAFo/uUctpYxXp5k/s1600-h/icecream.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 125px; height: 101px;" src="http://3.bp.blogspot.com/_30faWJvthIk/ScIYAMyC4NI/AAAAAAAAAFo/uUctpYxXp5k/s320/icecream.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5314836901960802514" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First, I added a draw() method to my Page.xaml.cs. The draw() method creates a Shapes object and sets up an ice-cream shaped path. The path is then added to the canvas.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public void draw()&lt;br /&gt;{&lt;br /&gt;    Path path1 = new Shapes().Icecream();&lt;br /&gt;    graphc.Children.Add(path1);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Shapes.cs just contains a method that builds up a path (shape) using LineSegments and ArcSegments.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public Path IceCream()&lt;br /&gt;{&lt;br /&gt;    //set up the color&lt;br /&gt;    Utils utils = new Utils();&lt;br /&gt;    SolidColorBrush fb = new SolidColorBrush(utils.HexColor("#ff336699"));&lt;br /&gt;&lt;br /&gt;    //set up the path &amp; the geometry&lt;br /&gt;    Path path1 = new Path();&lt;br /&gt;    PathGeometry pg1 = new PathGeometry();&lt;br /&gt;    PathFigure pf1 = new PathFigure();&lt;br /&gt;    pf1.StartPoint = new Point(40, 40);&lt;br /&gt;&lt;br /&gt;    //set up the segments collection&lt;br /&gt;    PathSegmentCollection segments = new PathSegmentCollection();&lt;br /&gt;&lt;br /&gt;    //arc1&lt;br /&gt;    ArcSegment arc1 = new ArcSegment();&lt;br /&gt;    arc1.Point = new Point(120, 40);&lt;br /&gt;    arc1.Size = new Size(12, 10);&lt;br /&gt;    arc1.IsLargeArc = false;&lt;br /&gt;    arc1.SweepDirection = SweepDirection.Clockwise;&lt;br /&gt;    segments.Add(arc1);&lt;br /&gt;&lt;br /&gt;    //LineSegments&lt;br /&gt;    LineSegment ls1 = new LineSegment();&lt;br /&gt;    ls1.Point = new Point(40, 40);&lt;br /&gt;    segments.Add(ls1);&lt;br /&gt;&lt;br /&gt;    LineSegment ls2 = new LineSegment();&lt;br /&gt;    ls2.Point = new Point(80, 100);&lt;br /&gt;    segments.Add(ls2);&lt;br /&gt;&lt;br /&gt;    LineSegment ls3 = new LineSegment();&lt;br /&gt;    ls3.Point = new Point(121, 40);&lt;br /&gt;    segments.Add(ls3);&lt;br /&gt;&lt;br /&gt;    LineSegment ls4 = new LineSegment();&lt;br /&gt;    ls4.Point = new Point(40, 40);&lt;br /&gt;    segments.Add(ls4);&lt;br /&gt;&lt;br /&gt;    //Set up the path&lt;br /&gt;    pf1.Segments = segments;&lt;br /&gt;    pg1.Figures.Add(pf1);&lt;br /&gt;    path1.Data = pg1;&lt;br /&gt;    path1.Fill = fb;&lt;br /&gt;    path1.Stroke = fb;&lt;br /&gt;    path1.SetValue(Canvas.TopProperty, 0.0);&lt;br /&gt;    path1.SetValue(Canvas.LeftProperty, 0.0);&lt;br /&gt;    path1.StrokeThickness = 0;&lt;br /&gt;&lt;br /&gt;    return path1;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Firstly, I set up a SolidColorBrush, using the hex color converter from the previous post. Next, I instantiate the PathGeometry, PathFigure and PathSegmentCollection that we will be using to create our ice-cream shape.&lt;br /&gt;&lt;br /&gt;The PathSegmentCollection segments allows us to add LineSegments and ArcSegments to it, until we are satisfied with our shape. Once we're done, we can add the PathFigure to the PathGeometry and then set the PathGeometry as the Data of the path we want to return.&lt;br /&gt;&lt;br /&gt;We can also set values for the path that we want to return, such as Fill and Stroke. In this example, I set them to use the same colour, as well as setting the StrokeThickness to zero, so it looks like one continuous shape.&lt;br /&gt;&lt;br /&gt;Just build the code and run it in your browser and voila! - a lovely ice-cream shape is added to your canvas :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-5107013420878194726?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/5107013420878194726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/creating-graphical-shapes-dynamically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5107013420878194726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5107013420878194726'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/creating-graphical-shapes-dynamically.html' title='Creating Graphical Shapes Dynamically in C#'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/ScIYAMyC4NI/AAAAAAAAAFo/uUctpYxXp5k/s72-c/icecream.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-8040311443222949893</id><published>2009-03-18T07:59:00.000-07:00</published><updated>2009-03-18T08:04:12.766-07:00</updated><title type='text'>C# Converting from a Hex String to a Color object</title><content type='html'>So far, we have been looking at Silverlight code examples in XAML. Today, I think it's time to get started with some C# code. The first thing I notice, working with shapes and colours in Silverlight, is that there is no easy way to make a Color class, using a hex String like "#336699".&lt;br /&gt;&lt;br /&gt;In Silverlight, you have to instantiate a Color object something like:&lt;br /&gt;&lt;br /&gt;Color c = Color.FromArgb(255, 255, 255, 255);&lt;br /&gt;&lt;br /&gt;(Which makes a white Color object)&lt;br /&gt;&lt;br /&gt;The first value in ARGB is Alpha, which determines the transparency of the colour. 0 is the lowest value, and indicates full transparency, while 255 indicates a fully opaque (non-transparent) Color.&lt;br /&gt;&lt;br /&gt;I am used to working with hex Strings though, like "#ffffff", which is a white colour in HTML. There are a few folks who have posted methods for creating Color objects from hex Strings, for example:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.geekpedia.com/KB8_How-do-I-convert-from-decimal-to-hex-and-hex-to-decimal.html"&gt;Geekpedia&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2008/04/29/colorconverter-in-silverlight-2.aspx"&gt;Alex Golesh&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I wanted to write a simple method that I could pass a hex String to, that returns a correctly instantiated Color object, something like:&lt;br /&gt;&lt;br /&gt;Color c = HexColor("#99ccff");&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public Color HexColor(String hex)&lt;br /&gt;{&lt;br /&gt; //remove the # at the front&lt;br /&gt; hex = hex.Replace("#", "");&lt;br /&gt;&lt;br /&gt; byte a = 255;&lt;br /&gt; byte r = 255;&lt;br /&gt; byte g = 255;&lt;br /&gt; byte b = 255;&lt;br /&gt;&lt;br /&gt; int start = 0;&lt;br /&gt;&lt;br /&gt; //handle ARGB strings (8 characters long)&lt;br /&gt; if (hex.Length == 8)&lt;br /&gt; {&lt;br /&gt;     a = byte.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);&lt;br /&gt;     start = 2;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; //convert RGB characters to bytes&lt;br /&gt; r = byte.Parse(hex.Substring(start, 2), System.Globalization.NumberStyles.HexNumber);&lt;br /&gt; g = byte.Parse(hex.Substring(start+2, 2), System.Globalization.NumberStyles.HexNumber);&lt;br /&gt; b = byte.Parse(hex.Substring(start+4, 2), System.Globalization.NumberStyles.HexNumber);&lt;br /&gt;&lt;br /&gt; return Color.FromArgb(a, r, g, b);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;First, we remove the preceding # character (if there is one), then declare the a, r, g and b bytes that will be used to instantiate the Color object.&lt;br /&gt;&lt;br /&gt;Next, we have to handle the two formats the String can appear in, either 8 characters of ARGB "ffffffff", or 6 characters of RGB "ffffff". If the string we have is 8 characters long, we substring the first two characters and do the conversion to a byte value.&lt;br /&gt;&lt;br /&gt;From here on, the two strings are substring-ed and parsed in the same manner, although of course the ARGB string will be two positions ahead of the RGB string. This difference is taken care of by the start integer.&lt;br /&gt;&lt;br /&gt;Once all of the bytes have been parsed, we use them to instantiate and return a Color object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-8040311443222949893?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/8040311443222949893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/c-converting-from-hex-string-to-color.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8040311443222949893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8040311443222949893'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/c-converting-from-hex-string-to-color.html' title='C# Converting from a Hex String to a Color object'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-5730541662530664370</id><published>2009-03-06T05:34:00.000-08:00</published><updated>2009-03-16T23:33:42.248-07:00</updated><title type='text'>Graphics 2D - Shapes</title><content type='html'>Today, let's look at displaying graphics in Microsoft Silverlight.&lt;br /&gt;I have created an example diagram that shows some of the commonly used shapes in Silverlight:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/Sb9Ds36y8FI/AAAAAAAAAEc/EoNMBAeKkz8/s1600-h/silverlight_graphics.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 289px; height: 120px;" src="http://3.bp.blogspot.com/_30faWJvthIk/Sb9Ds36y8FI/AAAAAAAAAEc/EoNMBAeKkz8/s320/silverlight_graphics.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5314040523524337746" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Diagram A is a JPEG image&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;(I've had a few folks visit the blog, without having Silverlight installed, so I thought I would add a screen shot of the control so they too can see some Silverlight graphics) :)&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/linegeo/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Diagram B above is a Silverlight image&lt;/span&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;If you can't see the graphics in Diagram B, please install Microsoft Silverlight by clicking on the link above.&lt;br /&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;This is the canvas I used in diagram B. Quite simple really.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Canvas x:Name="LayoutRoot" Background="White"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Rectangle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first two numbers in the Rect attribute (10,10) are the X and Y values for the top left corner of the Rectangle. The next two numbers are (60, 40) are X and Y for the bottom right corner. The RadiusX and RadiusY attributes are used to define the rounding of the corners. The higher the values, the more rounded the corners will become.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" Fill="#f0f0ff" StrokeThickness="1"&gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;RectangleGeometry Rect="10,10,60,40" RadiusX="5" RadiusY="5"/&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Circle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The circle in the example is simply created by making the RadiusX and RadiusY attributes equal. The Center attribute defines where the Eclipse will be placed on the Canvas.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" StrokeThickness="1" Fill="#f0f0ff"&gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;EllipseGeometry Center="120,30" RadiusX="20" RadiusY="20"/&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Ellipse&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" StrokeThickness="1" Fill="#f0f0ff"&gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;EllipseGeometry Center="190,30" RadiusX="20" RadiusY="12"/&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Triangle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The triangle in the example was created using a Path element. The LineSegments define the points that the Path must follow.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" StrokeThickness="1" Fill="#f0f0ff"&gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;PathGeometry&gt;&lt;br /&gt;     &amp;lt;PathGeometry.Figures&gt;&lt;br /&gt;  &amp;lt;PathFigure StartPoint="240,40"&gt;&lt;br /&gt;      &amp;lt;PathFigure.Segments&gt;&lt;br /&gt;   &amp;lt;LineSegment Point="240,40"/&gt;&lt;br /&gt;   &amp;lt;LineSegment Point="260,10"/&gt;&lt;br /&gt;   &amp;lt;LineSegment Point="280,40"/&gt;&lt;br /&gt;   &amp;lt;LineSegment Point="240,40"/&gt;&lt;br /&gt;      &amp;lt;/PathFigure.Segments&gt;&lt;br /&gt;  &amp;lt;/PathFigure&gt;&lt;br /&gt;     &amp;lt;/PathGeometry.Figures&gt;&lt;br /&gt; &amp;lt;/PathGeometry&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Line&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A Line defines a simple line between a StartPoint and an EndPoint.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" &gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;LineGeometry StartPoint="170,110" EndPoint="210,70"/&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;PolyLine&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A PolyLine defines two or more lines. The point couples are used to define the lines. First a line is drawn from 100,110 to 120,70, then a second line is drawn from 120,70 to 140,110.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Polyline Points="100,110 120,70 140,110" Stroke="#224488" StrokeThickness="1" /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ArcSegment&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ArcSegment is used to draw curved lines. Point defines the end point of the arc. IsLargeArc sets whether the arc should be more than 180 degrees. Size sets the X and Y radius of the arc.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Path Stroke="#224488" StrokeThickness="1"&gt;&lt;br /&gt;    &amp;lt;Path.Data&gt;&lt;br /&gt; &amp;lt;PathGeometry&gt;&lt;br /&gt;     &amp;lt;PathFigure StartPoint="10,110"&gt;&lt;br /&gt;  &amp;lt;ArcSegment Size="1,1" RotationAngle="0" IsLargeArc="True" SweepDirection="Clockwise" Point="70,110" /&gt;&lt;br /&gt;     &amp;lt;/PathFigure&gt;&lt;br /&gt; &amp;lt;/PathGeometry&gt;&lt;br /&gt;    &amp;lt;/Path.Data&gt;&lt;br /&gt;&amp;lt;/Path&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-5730541662530664370?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/5730541662530664370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/graphics-2d-shapes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5730541662530664370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5730541662530664370'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/graphics-2d-shapes.html' title='Graphics 2D - Shapes'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/Sb9Ds36y8FI/AAAAAAAAAEc/EoNMBAeKkz8/s72-c/silverlight_graphics.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-1002754100045019169</id><published>2009-03-06T05:04:00.000-08:00</published><updated>2009-04-01T03:59:33.485-07:00</updated><title type='text'>Elements - ListBox, ScrollViewer</title><content type='html'>&lt;span style="font-weight:bold;"&gt;ListBox&lt;/span&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/listbox/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/SdNIowWyhrI/AAAAAAAAAHI/ftJPRbjQwRw/s1600-h/listbox.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 124px; height: 123px;" src="http://3.bp.blogspot.com/_30faWJvthIk/SdNIowWyhrI/AAAAAAAAAHI/ftJPRbjQwRw/s320/listbox.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319675449867142834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ListBox Width="100" Height="100" Background="White"&gt;&lt;br /&gt;    &amp;lt;ListBox.Items&gt;&lt;br /&gt; &amp;lt;ListBoxItem&gt;&amp;lt;TextBlock Text="One"/&gt;&amp;lt;/ListBoxItem&gt;&lt;br /&gt; &amp;lt;ListBoxItem&gt;&amp;lt;TextBlock Text="Two"/&gt;&amp;lt;/ListBoxItem&gt;&lt;br /&gt; &amp;lt;ListBoxItem&gt;&amp;lt;TextBlock Text="Three"/&gt;&amp;lt;/ListBoxItem&gt;&lt;br /&gt; &amp;lt;ListBoxItem&gt;&amp;lt;TextBlock Text="Four"/&gt;&amp;lt;/ListBoxItem&gt;&lt;br /&gt;    &amp;lt;/ListBox.Items&gt;&lt;br /&gt;&amp;lt;/ListBox&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;ListBox allows you to display lists of ...whatever you want. Just add extra ListBoxItems as needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ScrollViewer&lt;/span&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/scrollviewer/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_30faWJvthIk/SdNI-gVkGvI/AAAAAAAAAHQ/hdf__xDiAe4/s1600-h/scrollviewer.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 201px; height: 202px;" src="http://4.bp.blogspot.com/_30faWJvthIk/SdNI-gVkGvI/AAAAAAAAAHQ/hdf__xDiAe4/s320/scrollviewer.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319675823524158194" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;ScrollViewer Canvas.Left="10" Canvas.Top="10" Width="200" Height="200" HorizontalScrollBarVisibility="Auto"&gt;&lt;br /&gt;&amp;lt;Grid Background="White" Height="250" Width="250"&gt;&lt;br /&gt;    &amp;lt;Grid.ColumnDefinitions&gt;&amp;lt;ColumnDefinition/&gt;&amp;lt;ColumnDefinition/&gt;&amp;lt;/Grid.ColumnDefinitions&gt;&lt;br /&gt;    &amp;lt;Grid.RowDefinitions&gt;&amp;lt;RowDefinition/&gt;&amp;lt;RowDefinition/&gt;&amp;lt;/Grid.RowDefinitions&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="#ffffff"&gt;&lt;br /&gt; &amp;lt;TextBlock&gt;(0,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;    &amp;lt;Border Grid.Row="1" Grid.Column="0" Background="#C3D9FF"&gt;&lt;br /&gt; &amp;lt;TextBlock&gt;(1,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;    &amp;lt;Border Grid.Row="1" Grid.Column="1" Background="#3D81EE"&gt;&lt;br /&gt; &amp;lt;TextBlock&gt;(1,1)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;&amp;lt;/Grid&gt;&lt;br /&gt;&amp;lt;/ScrollViewer&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ScrollViewer allows you to add scroll bars to an element that is too large to display in your application. In the example above, the user is able to scroll around the Grid.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-1002754100045019169?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/1002754100045019169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements-listbox-scrollviewer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1002754100045019169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1002754100045019169'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements-listbox-scrollviewer.html' title='Elements - ListBox, ScrollViewer'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/SdNIowWyhrI/AAAAAAAAAHI/ftJPRbjQwRw/s72-c/listbox.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-5214893908316514768</id><published>2009-03-06T04:57:00.000-08:00</published><updated>2009-04-01T03:55:10.679-07:00</updated><title type='text'>Elements - TextBlock, TextBox</title><content type='html'>&lt;span style="font-weight:bold;"&gt;TextBlock&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/textblock/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_30faWJvthIk/SdNHw5nr1CI/AAAAAAAAAG4/TdmgkCSB5Uk/s1600-h/textblock.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 181px; height: 117px;" src="http://4.bp.blogspot.com/_30faWJvthIk/SdNHw5nr1CI/AAAAAAAAAG4/TdmgkCSB5Uk/s320/textblock.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319674490281251874" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; &amp;lt;Border BorderBrush="#4488bb" BorderThickness="1" Background="#ffffff" Width="160" Height="100" Padding="3" CornerRadius="5"&gt;&lt;br /&gt;            &amp;lt;TextBlock TextWrapping="Wrap"&gt;&lt;br /&gt;                &amp;lt;Run FontSize="12" Text="Use"/&gt;&lt;br /&gt;                &amp;lt;Run FontSize="12" Foreground="#bb4400" FontStyle="Italic" Text="Run"/&gt;&lt;br /&gt;                &amp;lt;Run FontSize="12" Text="elements to create rich text."/&gt;&lt;br /&gt;                &amp;lt;LineBreak/&gt;&amp;lt;LineBreak/&gt;&lt;br /&gt;                &amp;lt;Run Foreground="#224488" FontSize="12" Text="Linebreaks are useful to control layout."/&gt;&lt;br /&gt;            &amp;lt;/TextBlock&gt;&lt;br /&gt; &amp;lt;/Border&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;TextBlock displays text content. You can use Run and LineBreak to format and lay out your text.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TextBox&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/textbox/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_30faWJvthIk/SdNH8khaUYI/AAAAAAAAAHA/wKgXCC3p-Vk/s1600-h/textbox.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 203px; height: 184px;" src="http://2.bp.blogspot.com/_30faWJvthIk/SdNH8khaUYI/AAAAAAAAAHA/wKgXCC3p-Vk/s320/textbox.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319674690776224130" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    &amp;lt;StackPanel x:Name="stack" Background="White" Orientation="Vertical"&gt;&lt;br /&gt;        &amp;lt;TextBox Height="150" Width="200" AcceptsReturn="True" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible"/&gt;&lt;br /&gt;        &amp;lt;TextBox Width="200" Height="30"/&gt;&lt;br /&gt;    &amp;lt;/StackPanel&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first TextBox above is much like the HTML textarea tag. It allows several lines of text to be entered by the user. The bottom TextBox is a single line text input area.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-5214893908316514768?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/5214893908316514768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements-textblock-textbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5214893908316514768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5214893908316514768'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements-textblock-textbox.html' title='Elements - TextBlock, TextBox'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_30faWJvthIk/SdNHw5nr1CI/AAAAAAAAAG4/TdmgkCSB5Uk/s72-c/textblock.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-5560431025550845356</id><published>2009-03-06T04:32:00.000-08:00</published><updated>2009-04-01T03:51:16.429-07:00</updated><title type='text'>Elements - Border, Buttons</title><content type='html'>In the previous posts, we learned how to lay out elements in Silverlight. Now let's take a look at some of the elements themselves.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Border&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/border/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/SdNGR9D-z6I/AAAAAAAAAGo/k4EFjSyH4Fc/s1600-h/border.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 187px; height: 86px;" src="http://3.bp.blogspot.com/_30faWJvthIk/SdNGR9D-z6I/AAAAAAAAAGo/k4EFjSyH4Fc/s320/border.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319672859117670306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        &amp;lt;Border BorderThickness="1" Width="180" Height="80" CornerRadius="2" Padding="3" BorderBrush="#3D81EE"&gt;&lt;br /&gt;            &amp;lt;TextBlock Text="This is some text inside the border. " TextWrapping="Wrap"/&gt;&lt;br /&gt;        &amp;lt;/Border&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Border allows you to add elements to it, all of which (by design) have a nice border around them :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Buttons&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/buttons/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_30faWJvthIk/SdNG-Zz2WkI/AAAAAAAAAGw/2Hq1ckRCQoc/s1600-h/buttons.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 183px; height: 181px;" src="http://1.bp.blogspot.com/_30faWJvthIk/SdNG-Zz2WkI/AAAAAAAAAGw/2Hq1ckRCQoc/s320/buttons.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319673622748879426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;        &amp;lt;CheckBox x:Name="checkBox" IsChecked="True" Content="True/False" Width="100"/&gt;&lt;br /&gt;        &amp;lt;CheckBox x:Name="checkBox3" IsChecked="" IsThreeState="True" Content="Three State" Width="100"/&gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;RepeatButton Width="100" Height="30" Content="Repeat Button"/&gt;&lt;br /&gt;        &amp;lt;Button Width="100" Height="30" Content="Normal Button" x:Name="button" /&gt;&lt;br /&gt;        &amp;lt;HyperlinkButton x:Name="hyperlinkButton" Width="100" Height="30" Content="Hyperlink Button" NavigateUri="http://silverlemma.blogspot.com/" TargetName="_new"/&gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;RadioButton x:Name="radio1" GroupName="radio" Content="One" Width="100"/&gt;&lt;br /&gt;        &amp;lt;RadioButton x:Name="radio2" GroupName="radio" Content="Two" Width="100" IsChecked="True"/&gt;&lt;br /&gt;        &amp;lt;RadioButton x:Name="radio3" GroupName="radio" Content="Three" Width="100"/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Buttons allow your users to interact with your application.&lt;br /&gt;&lt;br /&gt;Checkboxes can either be in two (Yes/No) or three states (Yes/No/Maybe).&lt;br /&gt;&lt;br /&gt;HyperlinkButtons work pretty much like HTML links (anchor tags). When the user clicks on the link, they are taken to the specified web URL. Notice that you can specify which tab, frame or window to load the destination site into, using the TargetName attribute.&lt;br /&gt;&lt;br /&gt;RadioButtons that share a group name will only allow one of the RadioButtons to be selected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-5560431025550845356?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/5560431025550845356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5560431025550845356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5560431025550845356'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/elements.html' title='Elements - Border, Buttons'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/SdNGR9D-z6I/AAAAAAAAAGo/k4EFjSyH4Fc/s72-c/border.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-8048760073441832808</id><published>2009-03-06T02:40:00.000-08:00</published><updated>2009-04-01T03:44:36.563-07:00</updated><title type='text'>Layout - TabControl</title><content type='html'>TabControl is a great way to present the user with a lot of information and application content, while keeping the interface neat and manageable.&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;devlive:slscontrol silverlightversion="2.0" src="/92178/tabcontrol/"&gt;&lt;/devlive:slscontrol&gt;--&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_30faWJvthIk/SdNFgpbGZAI/AAAAAAAAAGg/4oBJ3mlBge8/s1600-h/tab.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 210px; height: 206px;" src="http://2.bp.blogspot.com/_30faWJvthIk/SdNFgpbGZAI/AAAAAAAAAGg/4oBJ3mlBge8/s320/tab.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319672012032336898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;       &amp;lt;basics:TabControl&gt;&lt;br /&gt;           &amp;lt;basics:TabItem Header="Text"&gt;&lt;br /&gt;               &amp;lt;Canvas Background="#f0f0ff"&gt;&amp;lt;TextBlock TextWrapping="Wrap"&gt;Some Text&amp;lt;/TextBlock&gt;&amp;lt;/Canvas&gt;&lt;br /&gt;           &amp;lt;/basics:TabItem&gt;&lt;br /&gt;           &amp;lt;basics:TabItem Header="More Text"&gt;&lt;br /&gt;               &amp;lt;Canvas Background="#c0c0ff"&gt;&amp;lt;TextBlock TextWrapping="Wrap"&gt;Some More Text&amp;lt;/TextBlock&gt;&amp;lt;/Canvas&gt;&lt;br /&gt;           &amp;lt;/basics:TabItem&gt;&lt;br /&gt;           &amp;lt;basics:TabItem Header="Calendar"&gt;&lt;br /&gt;               &amp;lt;basics:Calendar/&gt;&lt;br /&gt;           &amp;lt;/basics:TabItem&gt;&lt;br /&gt;       &amp;lt;/basics:TabControl&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In the example above, there are three tabs. Two contain textblocks and the third contains a calendar control.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-8048760073441832808?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/8048760073441832808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/tabcontrol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8048760073441832808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/8048760073441832808'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/tabcontrol.html' title='Layout - TabControl'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_30faWJvthIk/SdNFgpbGZAI/AAAAAAAAAGg/4oBJ3mlBge8/s72-c/tab.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-1123757266132167934</id><published>2009-03-06T01:50:00.000-08:00</published><updated>2009-04-01T03:40:42.742-07:00</updated><title type='text'>Layout - Grid</title><content type='html'>Grids are used to layout elements in your Silverlight application, without having to specify co-ordinates for every element, in the way that Canvas does.&lt;br /&gt;&lt;!--&lt;br /&gt;&lt;devlive:slscontrol silverlightversion="2.0" src="/92178/grid/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_30faWJvthIk/SdNEczbwvHI/AAAAAAAAAGQ/FmMC5MAXbyc/s1600-h/grid.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 82px;" src="http://1.bp.blogspot.com/_30faWJvthIk/SdNEczbwvHI/AAAAAAAAAGQ/FmMC5MAXbyc/s320/grid.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319670846488362098" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   &amp;lt;Grid x:Name="grid" Background="White"&gt;&lt;br /&gt;       &amp;lt;Grid.ColumnDefinitions&gt;&lt;br /&gt;           &amp;lt;ColumnDefinition/&gt;&lt;br /&gt;           &amp;lt;ColumnDefinition/&gt;&lt;br /&gt;       &amp;lt;/Grid.ColumnDefinitions&gt;&lt;br /&gt;       &amp;lt;Grid.RowDefinitions&gt;&lt;br /&gt;           &amp;lt;RowDefinition/&gt;&lt;br /&gt;           &amp;lt;RowDefinition/&gt;&lt;br /&gt;       &amp;lt;/Grid.RowDefinitions&gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="#f0f0ff"&gt;&lt;br /&gt;           &amp;lt;TextBlock&gt;First grid item (0,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;       &amp;lt;Border Grid.Row="1" Grid.Column="0" Background="#4488bb"&gt;&lt;br /&gt;           &amp;lt;TextBlock&gt;Second grid item (1,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;       &amp;lt;Border Grid.Row="1" Grid.Column="1" Background="#d0d0ff"&gt;&lt;br /&gt;           &amp;lt;TextBlock&gt;Third grid item (1,1)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;   &amp;lt;/Grid&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The grid in the example above defines two columns and two rows. The first grid element has a ColumnSpan of 2, so it flows across two columns. ColumnSpan works in much the same way as the colspan attribute in an HTML table data element.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;GridSplitter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;GridSplitter is a more flexible version of Grid, that allows users to move the splitters between grids, resizing the contained grid elements.&lt;br /&gt;&lt;!--&lt;br /&gt;&lt;devlive:slscontrol silverlightversion="2.0" src="/92178/gridsplitter/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/SdNEmmVDNOI/AAAAAAAAAGY/bX9Vesy1WZE/s1600-h/gridsplit.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 304px; height: 103px;" src="http://3.bp.blogspot.com/_30faWJvthIk/SdNEmmVDNOI/AAAAAAAAAGY/bX9Vesy1WZE/s320/gridsplit.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319671014769243362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;       &amp;lt;Grid.ColumnDefinitions&gt;&amp;lt;ColumnDefinition/&gt;&amp;lt;ColumnDefinition/&gt;&amp;lt;/Grid.ColumnDefinitions&gt;&lt;br /&gt;       &amp;lt;Border Grid.Row="0" Grid.Column="0" Background="#f0f0ff"&gt;&lt;br /&gt;           &amp;lt;TextBlock&gt;First grid item (0,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;       &amp;lt;Border Grid.Row="0" Grid.Column="1" Background="#4488bb"&gt;&lt;br /&gt;           &amp;lt;TextBlock&gt;Second grid item (1,0)&amp;lt;/TextBlock&gt;&amp;lt;/Border&gt;&lt;br /&gt;       &amp;lt;basics:GridSplitter Grid.Row="0"/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-1123757266132167934?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/1123757266132167934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-grid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1123757266132167934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1123757266132167934'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-grid.html' title='Layout - Grid'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_30faWJvthIk/SdNEczbwvHI/AAAAAAAAAGQ/FmMC5MAXbyc/s72-c/grid.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-9006335731482114446</id><published>2009-03-06T00:38:00.001-08:00</published><updated>2009-04-01T03:37:23.991-07:00</updated><title type='text'>Layout - StackPanel</title><content type='html'>StackPanels are great for laying out form elements where test is displayed next to textboxes for input.&lt;br /&gt;&lt;!--&lt;br /&gt;&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/stackpanel/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_30faWJvthIk/SdND1QCYhpI/AAAAAAAAAGI/EoI2jGpKsVk/s1600-h/stack.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 268px; height: 20px;" src="http://3.bp.blogspot.com/_30faWJvthIk/SdND1QCYhpI/AAAAAAAAAGI/EoI2jGpKsVk/s320/stack.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319670166971778706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    &amp;lt;StackPanel x:Name="stack" Background="White" Orientation="Horizontal"&gt;&lt;br /&gt;        &amp;lt;TextBlock Text=" Username "/&gt;&lt;br /&gt;        &amp;lt;TextBox Width="200" Height="20" VerticalAlignment="Top"/&gt;&lt;br /&gt;    &amp;lt;/StackPanel&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the example above, we have a Username label (TextBlock, really) neatly next to a TextBox that users can type into.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-9006335731482114446?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/9006335731482114446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-stackpanel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/9006335731482114446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/9006335731482114446'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-stackpanel.html' title='Layout - StackPanel'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_30faWJvthIk/SdND1QCYhpI/AAAAAAAAAGI/EoI2jGpKsVk/s72-c/stack.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-3883325263495979487</id><published>2009-03-05T23:24:00.000-08:00</published><updated>2009-04-01T03:34:03.478-07:00</updated><title type='text'>Layout - Canvas</title><content type='html'>Silver light has several layout elements. The first is 'Canvas', which is like a blank ... canvas to draw on.&lt;br /&gt;&lt;br /&gt;Canvas uses a co-ordinate system to define where all the elements are placed, measured from the top and left.&lt;br /&gt;&lt;!--&lt;br /&gt;&lt;devlive:slscontrol silverlightVersion="2.0" src="/92178/canvas/"&gt;&lt;/devlive:slscontrol&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_30faWJvthIk/SdNDCKqDzrI/AAAAAAAAAGA/YmiuTJLpVx4/s1600-h/canvas.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 67px;" src="http://1.bp.blogspot.com/_30faWJvthIk/SdNDCKqDzrI/AAAAAAAAAGA/YmiuTJLpVx4/s320/canvas.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319669289354251954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;Canvas x:Name="LayoutRoot" Background="#f0f0ff"&amp;gt;&lt;br /&gt;        &amp;lt;TextBlock Canvas.Left="10" Canvas.Top="10" FontSize="12"&amp;gt;&lt;br /&gt;            A Canvas can contain display elements such as TextBlocks.&lt;br /&gt;        &amp;lt;/TextBlock&amp;gt;&lt;br /&gt;        &amp;lt;Canvas Canvas.Top="30" Canvas.Left="10" Background="#4488bb" Width="380" Height="60"&amp;gt;&lt;br /&gt;            &amp;lt;TextBlock Canvas.Left="10" Canvas.Top="10" TextWrapping="Wrap"&amp;gt;&lt;br /&gt;                &amp;lt;Run Foreground="#ffffff"&amp;gt;This nested Canvas has its own co-ordinate system.&amp;lt;/Run&amp;gt;&lt;br /&gt;            &amp;lt;/TextBlock&amp;gt;&lt;br /&gt;        &amp;lt;/Canvas&amp;gt;&lt;br /&gt;&amp;lt;/Canvas&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see in the example above, it is possible to nest a canvas within a canvas. The inner canvas has its own co-ordinate system, allowing you to place elements neatly inside of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-3883325263495979487?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/3883325263495979487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-canvas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3883325263495979487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/3883325263495979487'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/layout-canvas.html' title='Layout - Canvas'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_30faWJvthIk/SdNDCKqDzrI/AAAAAAAAAGA/YmiuTJLpVx4/s72-c/canvas.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-1882240503929001288</id><published>2009-03-05T22:25:00.000-08:00</published><updated>2009-03-06T03:43:06.312-08:00</updated><title type='text'>Getting Started</title><content type='html'>&lt;span style="font-weight: bold;"&gt;What is Silverlight?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Silverlight is Microsoft's technology for delivering rich Internet application content to the web browser. Silverlight enables animations, vector graphics and video, as well as a full set of application controls, such as buttons, textboxes, listboxes and 2D elements like lines, rectangles and circles.&lt;br /&gt;&lt;br /&gt;(See &lt;a href="http://en.wikipedia.org/wiki/Silverlight" target="new"&gt;This Wiki article&lt;/a&gt; for more information)&lt;br /&gt;&lt;br /&gt;The user interface is defined using XAML (said 'zammel'), which is a user interface markup language used in several .NET Framework 3.0 technologies, including Silverlight and Windows Presentation Foundation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://silverlight.net/" target="new"&gt;The Official Silverlight Home Page&lt;/a&gt; is an awesome source for info about Silverlight. If you are completely new to Silverlight, head over there now and click on 'Get Started'!&lt;br /&gt;&lt;br /&gt;If you can't see the Silverlight controls, just click on the Silverlight icon to install the Silverlight plug-in for your browser. Reading the posts won't be the same without it installed :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-1882240503929001288?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/1882240503929001288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/getting-started.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1882240503929001288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/1882240503929001288'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/getting-started.html' title='Getting Started'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9043655167088908709.post-5405710307876078287</id><published>2009-03-05T10:16:00.000-08:00</published><updated>2009-03-06T02:29:53.337-08:00</updated><title type='text'>Welcome to my blog!</title><content type='html'>I'll be writing here about my experiences as I learn to design with Silverlight. Please feel free to add any comments and post links to helpful sites that expand on the discussion here.&lt;br /&gt;&lt;br /&gt;Let's learn Silverlight together :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9043655167088908709-5405710307876078287?l=silverlemma.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://silverlemma.blogspot.com/feeds/5405710307876078287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://silverlemma.blogspot.com/2009/03/welcome-to-my-blog-ill-be-writing-here.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5405710307876078287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9043655167088908709/posts/default/5405710307876078287'/><link rel='alternate' type='text/html' href='http://silverlemma.blogspot.com/2009/03/welcome-to-my-blog-ill-be-writing-here.html' title='Welcome to my blog!'/><author><name>SilverLemma</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_30faWJvthIk/SdNSlz3vi2I/AAAAAAAAAHY/k5mvg2G-pcg/S220/jessi.jpg'/></author><thr:total>1</thr:total></entry></feed>
