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

<channel>
	<title>PeterKellner.net &#187; Silverlight</title>
	<atom:link href="http://peterkellner.net/category/silverlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://peterkellner.net</link>
	<description>Microsoft Focused, JavaScript,HTML5 (ExtJS, SenchaTouch &#38; Windows 8 Metro)</description>
	<lastBuildDate>Fri, 11 May 2012 16:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Sitting At MIX10 In Michael Scherotter&#8217;s Presentation of the Silverlight 4 Search Analytics Framework</title>
		<link>http://peterkellner.net/2010/03/15/silverlight4-mix10-analyticsframework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlight4-mix10-analyticsframework</link>
		<comments>http://peterkellner.net/2010/03/15/silverlight4-mix10-analyticsframework/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 21:53:33 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[MIX10]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2010/03/15/silverlight4-mix10-analyticsframework/</guid>
		<description><![CDATA[ As usual, Michael’s doing a great job of presenting enthusiastically the new Silverlight Analytics Frameworks.&#160; I’m hugely impressed with how easy it is going to be to add analytics to a Silverlight app.&#160; It seems Microsoft has gotten all the major vendors of Web Analytics to play.
One thing Michael said that really made me [...]]]></description>
			<content:encoded><![CDATA[<p> As usual, <a href="http://blogs.msdn.com/synergist/">Michael’s</a> doing a great job of presenting enthusiastically the new <a href="http://team.silverlight.net/announcement/the-microsoft-silverlight-analytics-framework-is-releasing-at-mix-2010/">Silverlight Analytics Frameworks</a>.&#160; I’m hugely impressed with how easy it is going to be to add analytics to a <a href="http://silverlight.net/">Silverlight</a> app.&#160; It seems Microsoft has gotten all the major vendors of Web Analytics to play.</p>
<p>One thing <a href="http://blogs.msdn.com/user/Profile.aspx?UserID=34284">Michael</a> said that really made me take notice is that all web pages should have a “Privacy Statement” prominently displayed on their main page.&#160; It should say (and you need to abide by it) that you don’t track any user identifiable data associated with tracking data collected.&#160; Great advice I won’t forget.</p>
<p> <span id="more-1166"></span>
<p>It was a sell out crowd, they let us in, but only after security decided we were OK to add to the overflow.</p>
<p>Here we are!</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/SittingAtMIX10InMichaelScherottersPresen_D167/IMG_1530.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_1530" border="0" alt="IMG_1530" src="http://peterkellner.net/FilesForWebDownload/SittingAtMIX10InMichaelScherottersPresen_D167/IMG_1530_thumb.jpg" width="447" height="336" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/03/15/silverlight4-mix10-analyticsframework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authentication and Authorization Using RIA Services (Article 7 of 7)</title>
		<link>http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=authentication-and-authorization-using-ria-services-article-7-of-7</link>
		<comments>http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:25:12 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VS2010]]></category>
		<category><![CDATA[RIA Service Presentation]]></category>
		<category><![CDATA[RIA Services Bay.Net Presentation]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/</guid>
		<description><![CDATA[



&#160;
Title Of Each Article
Video Included With Each Post


Part 1
Introduction To RIA Services In Silverlight (This Article)
7 Minutes


Part 2
Basic RIA Services And DataGrid With&#160; VS 2010 Tooling
14 Minutes


Part 3
Adding A DataGrid With Connect The Dots DataBinding in VS 2010
13 Minutes


Part 4
Adding a Navigation Page to a Silverlight Business Application Template
11 Minutes


Part 5
Adding Speakers Page Template With [...]]]></description>
			<content:encoded><![CDATA[<p>
<table width="90%">
<tbody>
<tr>
<td width="70">&nbsp;</td>
<td>Title Of Each Article</td>
<td width="150" style="width: 100px;">Video Included With Each Post</td>
</tr>
<tr>
<td width="70">Part 1</td>
<td><a href="http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/">Introduction To RIA Services In Silverlight (This Article)</a></td>
<td width="150" style="width: 100px;">7 Minutes</td>
</tr>
<tr>
<td width="70">Part 2</td>
<td><a href="http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/">Basic RIA Services And DataGrid With&nbsp; VS 2010 Tooling</a></td>
<td width="150" style="width: 100px;">14 Minutes</td>
</tr>
<tr>
<td width="70">Part 3</td>
<td><a href="http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/">Adding A DataGrid With Connect The Dots DataBinding in VS 2010</a></td>
<td width="150" style="width: 100px;">13 Minutes</td>
</tr>
<tr>
<td width="70">Part 4</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-navigation-page-to-a-silverlight-business-application-template-article-4-of-7/">Adding a Navigation Page to a Silverlight Business Application Template</a></td>
<td width="150" style="width: 100px;">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 5</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-speakers-page-template-with-converters-in-visual-studio-2010-beta2-article-5-of-7/">Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2</a></td>
<td width="150" style="width: 100px;">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 6</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/">Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2</a></td>
<td width="150" style="width: 100px;">10 Minutes</td>
</tr>
<tr>
<td width="70">Part 7</td>
<td><a href="http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/">Basic Authentication and Authorization In RIA Services</a></td>
<td width="150" style="width: 100px;">5 Minutes</td>
</tr>
</tbody>
</table>
<p> 
<br /><img src="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P7_AuthenticationAndAuthorization_Thumb.jpg" alt="media" /><br />

<p>This article is very short.&#160; In the actual presentation, there was not much time to talk about this so a brief overview was done.&#160; Basically, it’s all standard WCF stuff.&#160; The idea is that the Silverlight Business Template adds logging in and supports Authentication just like an asp.net application does.&#160; It uses the DomainDataSource to do the bridging between the silverlight clientside app, and the web application.&#160; Authorization is built into the login module also so that you can assign attributes to your domainservice classes to restrict access.</p>
<p> <span id="more-484"></span>
<p>That is, if you only want people who are logged in able to access one of your methods, you simply tag it as follows with the [RequiresAuthentication] attribute.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AuthenticationandAuthorizationUsingRIASe_E1CB/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AuthenticationandAuthorizationUsingRIASe_E1CB/image_thumb.png" width="694" height="222" /></a></p>
<p>If you only want a certain logged in user role to be able to access a certain method, you tag it as follows</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AuthenticationandAuthorizationUsingRIASe_E1CB/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AuthenticationandAuthorizationUsingRIASe_E1CB/image_thumb_3.png" width="710" height="151" /></a></p>
<p>This of course solve the server side only.&#160; On the client side, you need to call methods that are exposed through the domain data.&#160; <a title="http://www.silverlightshow.net/items/Silverlight-3-with-Ria-Authentication-service.aspx" href="http://www.silverlightshow.net/items/Silverlight-3-with-Ria-Authentication-service.aspx">http://www.silverlightshow.net/items/Silverlight-3-with-Ria-Authentication-service.aspx</a> discusses much of this on the client side.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<enclosure url="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P7_AuthenticationAndAuthorization.flv" length="1" type="video/x-flv"/>
	</item>
		<item>
		<title>Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2 (Article 6 of 7)</title>
		<link>http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7</link>
		<comments>http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:22:47 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/</guid>
		<description><![CDATA[&#160;



&#160;
Title Of Each Article
Video Included With Each Post


Part 1
Introduction To RIA Services In Silverlight (This Article)
7 Minutes


Part 2
Basic RIA Services And DataGrid With&#160; VS 2010 Tooling
14 Minutes


Part 3
Adding A DataGrid With Connect The Dots DataBinding in VS 2010
13 Minutes


Part 4
Adding a Navigation Page to a Silverlight Business Application Template
11 Minutes


Part 5
Adding Speakers Page Template With [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<table width="90%">
<tbody>
<tr>
<td width="70">&#160;</td>
<td>Title Of Each Article</td>
<td style="width: 100px" width="150">Video Included With Each Post</td>
</tr>
<tr>
<td width="70">Part 1</td>
<td><a href="http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/">Introduction To RIA Services In Silverlight (This Article)</a></td>
<td style="width: 100px" width="150">7 Minutes</td>
</tr>
<tr>
<td width="70">Part 2</td>
<td><a href="http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/">Basic RIA Services And DataGrid With&#160; VS 2010 Tooling</a></td>
<td style="width: 100px" width="150">14 Minutes</td>
</tr>
<tr>
<td width="70">Part 3</td>
<td><a href="http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/">Adding A DataGrid With Connect The Dots DataBinding in VS 2010</a></td>
<td style="width: 100px" width="150">13 Minutes</td>
</tr>
<tr>
<td width="70">Part 4</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-navigation-page-to-a-silverlight-business-application-template-article-4-of-7/">Adding a Navigation Page to a Silverlight Business Application Template</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 5</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-speakers-page-template-with-converters-in-visual-studio-2010-beta2-article-5-of-7/">Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 6</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/">Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2</a></td>
<td style="width: 100px" width="150">10 Minutes</td>
</tr>
<tr>
<td width="70">Part 7</td>
<td><a href="http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/">Basic Authentication and Authorization In RIA Services</a></td>
<td style="width: 100px" width="150">5 Minutes</td>
</tr>
</tbody>
</table>
<br /><img src="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P6_AddingSessionsPageWithRequestParam_Thumb.jpg" alt="media" /><br />

<p>In this section, we will talk about what happens when the users presses the “Sessions” hyperlink from the speakers page.&#160; If you remember from the last article, we used a special converter on the Speakers.xaml page and bound that to the hyperlink titled sessions as shown below.</p>
<p> <span id="more-482"></span>
<p>&#160;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingASessionsPageThatIncludesaQueryPar_DF36/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingASessionsPageThatIncludesaQueryPar_DF36/image_thumb.png" width="376" height="323" /></a></p>
<p>&#160;</p>
<p>When this link is clicked, the navigation created is as follows:</p>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode"><a href="http://localhost:9951/Presentation1TestPage.aspx#/Sessions?SpeakerId=903">http://localhost:9951/Presentation1TestPage.aspx#/Sessions?SpeakerId=903</a></pre>
<p><!-- code formatted by http://manoli.net/csharpformat/ --></p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}</p>
<p>.csharpcode pre { margin: 0em; }</p>
<p>.csharpcode .rem { color: #008000; }</p>
<p>.csharpcode .kwrd { color: #0000ff; }</p>
<p>.csharpcode .str { color: #006080; }</p>
<p>.csharpcode .op { color: #0000c0; }</p>
<p>.csharpcode .preproc { color: #cc6633; }</p>
<p>.csharpcode .asp { background-color: #ffff00; }</p>
<p>.csharpcode .html { color: #800000; }</p>
<p>.csharpcode .attr { color: #ff0000; }</p>
<p>.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}</p>
<p>.csharpcode .lnum { color: #606060; }
</style>
<div class="csharpcode">
<pre class="alt"><span class="rem">// Executes when the user navigates to this page.</span></pre>
<pre><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatedTo(NavigationEventArgs e)</pre>
<pre class="alt">{</pre>
<pre>    <span class="rem">//Handle SpeakerId</span></pre>
<pre class="alt">    var qs = NavigationContext.QueryString;</pre>
<pre>    <span class="kwrd">if</span> (qs.ContainsKey(<span class="str">"SpeakerId"</span>))</pre>
<pre class="alt">    {</pre>
<pre>        <span class="kwrd">this</span>.sessionsOverviewDomainDataSource.FilterDescriptors =</pre>
<pre class="alt">            <span class="kwrd">new</span> FilterDescriptorCollection();</pre>
<pre>        <span class="kwrd">this</span>.sessionsOverviewDomainDataSource.FilterDescriptors.Add(</pre>
<pre class="alt">              <span class="kwrd">new</span> FilterDescriptor(<span class="str">"AttendeeId"</span>,</pre>
<pre>                  FilterOperator.IsEqualTo, qs[<span class="str">"SpeakerId"</span>]));</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
</div>
<p>This simply adds a filter to the current DomainDataSource that filters the column AttendeeId with the passed in query parameter SpeakerId.</p>
<p>&#160;</p>
<p>The resulting page looks as follows assuming <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&amp;id=151">Peter Kellner’s Session link</a> was clicked.</p>
<p>&#160;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingASessionsPageThatIncludesaQueryPar_DF36/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingASessionsPageThatIncludesaQueryPar_DF36/image_thumb_3.png" width="523" height="207" /></a></p>
<p>&#160;</p>
<p>The video referenced in this article goes into building this page in more details, but fundamentally, the major point is just the query parameter.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<enclosure url="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P6_AddingSessionsPageWithRequestParam.flv" length="1" type="video/x-flv"/>
	</item>
		<item>
		<title>Basic RIA Services And DataGrid With VS 2010 Tooling (Article 2 of 7)</title>
		<link>http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7</link>
		<comments>http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:51:23 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/</guid>
		<description><![CDATA[ 



&#160;
Title Of Each Article
Video Included With Each Post


Part 1
Introduction To RIA Services In Silverlight (This Article)
7 Minutes


Part 2
Basic RIA Services And DataGrid With&#160; VS 2010 Tooling
14 Minutes


Part 3
Adding A DataGrid With Connect The Dots DataBinding in VS 2010
13 Minutes


Part 4
Adding a Navigation Page to a Silverlight Business Application Template
11 Minutes


Part 5
Adding Speakers Page Template [...]]]></description>
			<content:encoded><![CDATA[<p> <br />
<table width="90%">
<tbody>
<tr>
<td width="70">&#160;</td>
<td>Title Of Each Article</td>
<td style="width: 100px" width="150">Video Included With Each Post</td>
</tr>
<tr>
<td width="70">Part 1</td>
<td><a href="http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/">Introduction To RIA Services In Silverlight (This Article)</a></td>
<td style="width: 100px" width="150">7 Minutes</td>
</tr>
<tr>
<td width="70">Part 2</td>
<td><a href="http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/">Basic RIA Services And DataGrid With&#160; VS 2010 Tooling</a></td>
<td style="width: 100px" width="150">14 Minutes</td>
</tr>
<tr>
<td width="70">Part 3</td>
<td><a href="http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/">Adding A DataGrid With Connect The Dots DataBinding in VS 2010</a></td>
<td style="width: 100px" width="150">13 Minutes</td>
</tr>
<tr>
<td width="70">Part 4</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-navigation-page-to-a-silverlight-business-application-template-article-4-of-7/">Adding a Navigation Page to a Silverlight Business Application Template</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 5</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-speakers-page-template-with-converters-in-visual-studio-2010-beta2-article-5-of-7/">Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 6</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/">Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2</a></td>
<td style="width: 100px" width="150">10 Minutes</td>
</tr>
<tr>
<td width="70">Part 7</td>
<td><a href="http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/">Basic Authentication and Authorization In RIA Services</a></td>
<td style="width: 100px" width="150">5 Minutes</td>
</tr>
</tbody>
</table>
<p> 
<br /><img src="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P2_BasicRIANoTooling_Thumb.jpg" alt="media" /><br />

<p>&#160;</p>
<p>In this article, we will&#160; build from scratch, using Visual Studio 2010 Beta 2 a simple application that lets us view <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp</a> Attendees that have authorized us to share their data.&#160; We will be using no special RIA Services Visual Studio 2010 design tools to do this.&#160; We will:</p>
<ul>
<li>Create the <a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx">Entity Framework</a> Repository </li>
<li>Create the Domain Service </li>
<li>Wire up an Appropriate Get Method that Returns in <a href="http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx">IQueryable</a> </li>
<li>Call From the Client Code the Domain Service </li>
<li>Show The Results </li>
<li>Observations </li>
</ul>
<p>First, we need to create a new Visual Studio Project.&#160; We do that by using the File/New Project and chose “Silverlight Business Application”.</p>
<p> <span id="more-478"></span>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb.png" width="441" height="246" /></a></p>
<h2>Create The Entity Framework</h2>
<p>Then, we need to create an Entity Framework Repository that will be the target of our Domain Service.&#160; We do that by adding to the web project (not the top, <a href="http://silverlight.net/">Silverlight</a> project), we just created and “ADO.NET Entity Data Model”.&#160; We’ll call it ModelSVCC for Model Silicon Valley Code Camp.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_3.png" width="456" height="258" /></a></p>
<p>We use the option “Generate From Database” as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_4.png" width="320" height="284" /></a></p>
<p>Choose the appropriate connection (in our case svcodecamp on our local Sql Server 2008 database).</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_5.png" width="343" height="305" /></a></p>
<p>For simplicity, choose all tables and views as follows.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_6.png" width="340" height="302" /></a></p>
<p>Do a Rebuild/All to make sure all the template code get’s generated and we are done with our first step.</p>
<h2>Create the Domain Service</h2>
<p>Next, create the Domain Service.&#160; This is done by adding again to the web project the Domain Service as follows.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_7.png" width="372" height="211" /></a></p>
<p>Name it DomainServiceSVCC.cs again for Silicon Valley Code Camp.</p>
<p>Next check all tables and views, make sure “Enable Client Access” is checked and also “Generate associated classes for meta data”.&#160; Enable Client Access adds an attribute to the generated domain class which tell Visual Studio (on building) to generate the same domain classes on the client (Silverlight) side.&#160; This means that you are writing both your client and server code at the same time!&#160; Very convenient.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_8.png" width="259" height="316" /></a> <a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_9.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_9.png" width="354" height="189" /></a></p>
<p>Now, to the method generated in the Domain Service class add an OrderBy Linq command so that the method GetAttendeesWithShare has an implicit order and Skip and Take LINQ will work and the total number of records can be easily obtained (notice the yellow highlighing is the code we added, the rest was there before).</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_10.png" width="623" height="166" /></a></p>
<p>Finally, Rebuild/All again and we are done creating the domain service class for this example.</p>
<h2>Wire up an Appropriate Get Method that Returns in IQueryable</h2>
<p>Now that we have our Domain Service built on the Server side (and of course it get’s exposed on the client side with Visual Studio 2010 template generating magic), we can go to one of the pages built in the default template, add a Silverlight DataGrid and assign our Domain Context to that. Let’s add the list of attendees to our Home Page.&#160; We do that by going to the View\Home.xaml file and simply add a DataGrid tag to the page (see below highlighted in yellow, we simply typed that in or could have dragged it from the toolbar if we are so included).</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_11.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_11.png" width="429" height="376" /></a></p>
<p>Then, we go to the code behind of this page and add the following code to the “OnNavigateTo” enent of the Home.xaml page.</p>
<pre class="csharpcode"> var context = <span class="kwrd">new</span> DomainServiceSVCC();
 dataGrid1.ItemsSource = context.AttendeesWithShares;
 context.Load(context.GetAttendeesWithSharesQuery());</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_12.png" width="502" height="147" /></a></p>
<p>Now, when we rebuild all and run, we get:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_13.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_13.png" width="317" height="172" /></a></p>
<p>When we click on the Id’s column header, we get the data sorted in reverse Id order, even though we never code an event for that!</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_14.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_14.png" width="317" height="172" /></a></p>
<h2>Observations</h2>
<p>So, what have we done?&#160; Well, we’ve done a lot. first, we’ve create a Domain Service that uses WCF on the server side.&#160; We created code on the Silverlight client that called this domain service.&#160; We got databinding right through to our output.&#160; Be very clear that in our code we added to the OnNavigate Event (repeated here)</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="/FilesForWebDownload/BasicRIAWithMinimalVS2010ToolingArticle2_DD97/image_thumb_12.png" width="322" height="96" /></a></p>
<p>we made a clear step across the network boundary.&#160; We created the DataService context and when we loaded it, all the async magic just happened for us.&#160; No wsdl’s, proxies to code, keep updated, etc.&#160; All that actually happens for us, but we don’t have to worry about it.&#160; I think I’m in love.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<enclosure url="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P2_BasicRIANoTooling.flv" length="1" type="video/x-flv"/>
	</item>
		<item>
		<title>Adding A DataGrid With Connect The Dots DataBinding in VS 2010 (Article 3 of 7)</title>
		<link>http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7</link>
		<comments>http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 19:41:20 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://peterkellner.net/?p=461</guid>
		<description><![CDATA[ 



&#160;
Title Of Each Article
Video Included With Each Post


Part 1
Introduction To RIA Services In Silverlight (This Article)
7 Minutes


Part 2
Basic RIA Services And DataGrid With&#160; VS 2010 Tooling
14 Minutes


Part 3
Adding A DataGrid With Connect The Dots DataBinding in VS 2010
13 Minutes


Part 4
Adding a Navigation Page to a Silverlight Business Application Template
11 Minutes


Part 5
Adding Speakers Page Template [...]]]></description>
			<content:encoded><![CDATA[<p> <br />
<table width="90%">
<tbody>
<tr>
<td width="70">&nbsp;</td>
<td>Title Of Each Article</td>
<td style="width: 100px" width="150">Video Included With Each Post</td>
</tr>
<tr>
<td width="70">Part 1</td>
<td><a href="http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/">Introduction To RIA Services In Silverlight (This Article)</a></td>
<td style="width: 100px" width="150">7 Minutes</td>
</tr>
<tr>
<td width="70">Part 2</td>
<td><a href="http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/">Basic RIA Services And DataGrid With&nbsp; VS 2010 Tooling</a></td>
<td style="width: 100px" width="150">14 Minutes</td>
</tr>
<tr>
<td width="70">Part 3</td>
<td><a href="http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/">Adding A DataGrid With Connect The Dots DataBinding in VS 2010</a></td>
<td style="width: 100px" width="150">13 Minutes</td>
</tr>
<tr>
<td width="70">Part 4</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-navigation-page-to-a-silverlight-business-application-template-article-4-of-7/">Adding a Navigation Page to a Silverlight Business Application Template</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 5</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-speakers-page-template-with-converters-in-visual-studio-2010-beta2-article-5-of-7/">Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 6</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/">Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2</a></td>
<td style="width: 100px" width="150">10 Minutes</td>
</tr>
<tr>
<td width="70">Part 7</td>
<td><a href="http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/">Basic Authentication and Authorization In RIA Services</a></td>
<td style="width: 100px" width="150">5 Minutes</td>
</tr>
</tbody>
</table>
<p> 
<br /><img src="http://video.peterkellner.net//video/RIAServicesBayNet20090120/P3_DataGridWithVSToolingBusyIndicatorAndPaging_Thumb.jpg" alt="media" /><br />

<p> 
<p>In this article, we will use the the Visual Studio 2010 Beta2 Tooling to create a Sessions DataGrid.&nbsp; We will add a Pager to it as well as a Silverlight busy indicator which will show while the data is loading.&nbsp; In Article 1, we build a simple DataGrid with code behind, in this article, it will all be declarative in XAML built with the Visual Studio 2010 designer.</p>
<p><span id="more-461"></span>
<p>First thing we need to do is add a new Silverlight Navigation Page to the Silverlight project (not the web project) in the Views folder.</p>
<p>&nbsp;<a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb.png" width="433" height="183"></a></p>
<p>Then, copy the code from the Home Page to get the top two default sections that appear on every page as follows:</p>
<p>&nbsp;<a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_3.png" width="437" height="163"></a></p>
<p>And the actual code:</p>
<p><!-- code formatted by http://manoli.net/csharpformat/ --><br />
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}</p>
<p>.csharpcode pre { margin: 0em; }</p>
<p>.csharpcode .rem { color: #008000; }</p>
<p>.csharpcode .kwrd { color: #0000ff; }</p>
<p>.csharpcode .str { color: #006080; }</p>
<p>.csharpcode .op { color: #0000c0; }</p>
<p>.csharpcode .preproc { color: #cc6633; }</p>
<p>.csharpcode .asp { background-color: #ffff00; }</p>
<p>.csharpcode .html { color: #800000; }</p>
<p>.csharpcode .attr { color: #ff0000; }</p>
<p>.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}</p>
<p>.csharpcode .lnum { color: #606060; }
</style>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">StackPanel</span> <span class="attr">x:Name</span><span class="kwrd">="ContentStackPanel"</span>
            <span class="attr">Style</span><span class="kwrd">="{StaticResource ContentStackPanelStyle}"</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">TextBlock</span> <span class="attr">x:Name</span><span class="kwrd">="HeaderText"</span> <span class="attr">Style</span><span class="kwrd">="{StaticResource HeaderTextStyle}"</span>
               <span class="attr">Text</span><span class="kwrd">="{Binding Path=ApplicationStrings.HomePageTitle,
               Source={StaticResource ResourceWrapper}}"</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">TextBlock</span> <span class="attr">x:Name</span><span class="kwrd">="ContentText"</span> <span class="attr">Style</span><span class="kwrd">="{StaticResource ContentTextStyle}"</span>
               <span class="attr">Text</span><span class="kwrd">="Home page content"</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">Image</span> <span class="attr">Height</span><span class="kwrd">="393"</span> <span class="attr">Name</span><span class="kwrd">="image1"</span> <span class="attr">Stretch</span><span class="kwrd">="Uniform"</span> <span class="attr">Width</span><span class="kwrd">="467"</span>
               <span class="attr">Source</span><span class="kwrd">="/Presentation1;component/Images/IMG_1504.JPG"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">StackPanel</span><span class="kwrd">&gt;</span></pre>
<p>Change text to “Speaker page content” and change the resource string to ApplicationString.SpeakerPageTitle and update the ApplicationStrings.resx file as follows:</p>
<p>&nbsp;<a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_4.png" width="405" height="286"></a></p>
<p>Then, drag a DataGrid to the Speaker.xaml design surface (after removing the image tag which was the picture on the home page we copied over).</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_5.png" width="549" height="213"></a></p>
<p>Now, we do what Microsoft calls “Connect the Dots DataBinding”.&nbsp; That is, we go to the Data Sources Tab</p>
<p>&nbsp;<a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_6.png" width="352" height="168"></a></p>
<p>Drag the SpeakersShort2009 box (shown in yellow below) to the DataGrid showing on the design surface.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_7.png" width="348" height="149"></a></p>
<p>That automatically creates a bunch of xaml including the RIA Domain DataSource, which includes a reference to the correct query method and the correct Domain Context.&nbsp; Very nice!</p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}</p>
<p>.csharpcode pre { margin: 0em; }</p>
<p>.csharpcode .rem { color: #008000; }</p>
<p>.csharpcode .kwrd { color: #0000ff; }</p>
<p>.csharpcode .str { color: #006080; }</p>
<p>.csharpcode .op { color: #0000c0; }</p>
<p>.csharpcode .preproc { color: #cc6633; }</p>
<p>.csharpcode .asp { background-color: #ffff00; }</p>
<p>.csharpcode .html { color: #800000; }</p>
<p>.csharpcode .attr { color: #ff0000; }</p>
<p>.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}</p>
<p>.csharpcode .lnum { color: #606060; }
</style>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">riaControls:DomainDataSource</span> <span class="attr">AutoLoad</span><span class="kwrd">="True"</span> <span class="attr">Height</span><span class="kwrd">="0"</span>
                                      <span class="attr">LoadedData</span><span class="kwrd">="speakersShort2009DomainDataSource_LoadedData"</span>
                                      <span class="attr">Name</span><span class="kwrd">="speakersShort2009DomainDataSource"</span>
                                      <span class="attr">QueryName</span><span class="kwrd">="GetSpeakersShort2009Query"</span> <span class="attr">Width</span><span class="kwrd">="0"</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">riaControls:DomainDataSource.DomainContext</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">my:DomainServiceSVCC</span> <span class="kwrd">/&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">riaControls:DomainDataSource.DomainContext</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">riaControls:DomainDataSource</span><span class="kwrd">&gt;</span></pre>
<p>
<pre class="csharpcode"><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_8.png" width="599" height="195"></a></pre>
<pre class="csharpcode"></pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } -->Now, we do the same thing with the DataPager (which may have to add to the toolbox with “Choose Items” That gives us some xaml that looks like the following.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_9.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_9.png" width="423" height="287"></a></p>
<p>&nbsp;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_10.png" width="419" height="246"></a></p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">data:DataPager</span> <span class="attr">Height</span><span class="kwrd">="26"</span>
                <span class="attr">HorizontalAlignment</span><span class="kwrd">="Left"</span> <span class="attr">Margin</span><span class="kwrd">="720,325,0,0"</span>
                <span class="attr">Name</span><span class="kwrd">="dataPager1"</span> <span class="attr">VerticalAlignment</span><span class="kwrd">="Top"</span>
                <span class="attr">Width</span><span class="kwrd">="200"</span>
                <span class="attr">PageSize</span><span class="kwrd">="10"</span><span class="kwrd">/&gt;</span></pre>
<pre class="csharpcode"><span class="kwrd"></span>&nbsp;</pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Notice that I put PageSize in.&nbsp; That does not happen by default, and in my presentation, I forgot this and for a while could not figure out why the paging was not working.&nbsp; Try and not make the same mistake!</p>
<p>Then, drag the same DataSource as we dragged to the DataGrid and drop it on the Paging control as follows:</p>
<p>&nbsp;<a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_11.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_11.png" width="412" height="135"></a></p>
<p>That automatically binds the DataPager to the same DomainDataSource as the DataGrid’s DomainDataSource.&nbsp; Here is the XAML created.</p>
<pre class="csharpcode"> <span class="kwrd">&lt;</span><span class="html">data:DataPager</span> <span class="attr">Height</span><span class="kwrd">="26"</span> <span class="attr">Name</span><span class="kwrd">="dataPager1"</span> <span class="attr">Width</span><span class="kwrd">="200"</span>
   <span class="attr">Source</span><span class="kwrd">="{Binding ElementName=speakersShort2009DomainDataSource, Path=Data}"</span> <span class="kwrd">/&gt;</span></pre>
<pre class="csharpcode"></pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } -->The next thing is to use the new “Reset-All” for styling.&nbsp; It’s very simple.&nbsp; Right click on the design surface and simply click “Layout/Reset” as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_12.png" width="244" height="176"></a></p>
<p>Now, when we run this, we get:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_13.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_13.png" width="380" height="366"></a></p>
<p>Finally, to put a “Busy Indicator” control on the page, we simply drag out the busy Indicator onto the design surface. It likely will not be in your toolbox, so like the DataPager, you will need to add it to the toolbar as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_14.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_14.png" width="396" height="252"></a></p>
<p>Then, drag it from the toolbox right onto the DataGrid as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_15.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_15.png" width="297" height="314"></a></p>
<p>Then, once it’s on the DataGrid (and in the XAML), you need to right click on it and change some of it’s properties.</p>
<p>First, set the “IsBusy” property by checking the checkbox, then resize the control itself so it shows the text and is a pleasant size.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_16.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_16.png" width="428" height="280"></a></p>
<p>The next step is a little more tricky.&nbsp; You need to find the property in the BusyIndicator called DataContext. Right click on that as follows and press “Apply Data Binding”.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_17.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_17.png" width="428" height="257"></a></p>
<p>Now, you are setting the Source so first select “ElementName”, then chose speakersShort2009DomainDataSource as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_18.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_18.png" width="431" height="296"></a></p>
<p>Then, go to the “Path:” and set the property “DomainContext” and the method to “IsLoading” as follows:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_19.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_19.png" width="436" height="254"></a></p>
<p>What this has done is created a binding expression using a very nice Visual Studio 2010 Tool.&nbsp; It’s assigned that binding expression to the DataContext of the DomainDataSource.</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">riaControls:DomainDataSource</span> <span class="attr">AutoLoad</span><span class="kwrd">="True"</span> <span class="attr">Height</span><span class="kwrd">="0"</span>
         <span class="attr">LoadedData</span><span class="kwrd">="speakersShort2009DomainDataSource_LoadedData_2"</span>
                              <span class="attr">Name</span><span class="kwrd">="speakersShort2009DomainDataSource"</span>
                              <span class="attr">QueryName</span><span class="kwrd">="GetSpeakersShort2009Query"</span> <span class="attr">Width</span><span class="kwrd">="0"</span>
   <span class="attr">DataContext</span><span class="kwrd">="{Binding ElementName=speakersShort2009DomainDataSource, Path=DomainContext.IsLoading}"</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">riaControls:DomainDataSource.DomainContext</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">my:DomainServiceSVCC</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">riaControls:DomainDataSource.DomainContext</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">riaControls:DomainDataSource</span><span class="kwrd">&gt;</span></pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } -->Now, when we finally run our program, we first get the busy indicator as the data is being asynchrously loaded which looks like this:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_20.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_20.png" width="514" height="180"></a></p>
<p>Then, when the data finally loads, looks like the following:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_21.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/AddingDataGridWithVS2010ToolingArticle3o_E48C/image_thumb_21.png" width="523" height="449"></a></p>
<p>Notice the paging control at the bottom, and notice the BusyIndicator has gone away.</p>
<p>That’s it for this article.&nbsp; In the next article, we will style this page as well as add Converts to show the Speakers picture and add a hyperlink to the sessions associated with each speaker.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<enclosure url="http://video.peterkellner.net//video/RIAServicesBayNet20090120/P3_DataGridWithVSToolingBusyIndicatorAndPaging.flv" length="1" type="video/x-flv"/>
	</item>
		<item>
		<title>Introduction To Using RIA Services In Silverlight (Article 1 of 7)</title>
		<link>http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=riaservices-silverlight-4-tutorial-svcc-part1of7-introduction</link>
		<comments>http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 19:12:09 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[VS2010]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://peterkellner.net/?p=405</guid>
		<description><![CDATA[This series of video presentations goes through the process of building a Speaker and Sessions Viewer for Silicon Valley Code Camp’s data using Silverlight 4 and RIA Services (Using Visual Studio 2010 Beta 2).&#160; It starts with a brief introduction of RIA Services and is followed by screen casts and blog posts the parallel each [...]]]></description>
			<content:encoded><![CDATA[<p>This series of video presentations goes through the process of building a Speaker and Sessions Viewer for Silicon Valley Code Camp’s data using <a href="http://blogs.msdn.com/brada/">Silverlight 4</a> and <a href="http://silverlight.net/getstarted/riaservices/">RIA Services</a> (Using Visual Studio 2010 Beta 2).&#160; It starts with a brief introduction of RIA Services and is followed by screen casts and blog posts the parallel each screen cast.</p>
<p>The actual <a href="http://peterkellner.net/2010/01/13/baynet-presentation-riaservices/">presentation</a> was done at the Microsoft office in San Francisco. </p>
<p> <span id="more-405"></span><br />
<table width="90%">
<tbody>
<tr>
<td width="70">&#160;</td>
<td>Title Of Each Article</td>
<td style="width: 100px" width="150">Video Included With Each Post</td>
</tr>
<tr>
<td width="70">Part 1</td>
<td><a href="http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/">Introduction To RIA Services In Silverlight (This Article)</a></td>
<td style="width: 100px" width="150">7 Minutes</td>
</tr>
<tr>
<td width="70">Part 2</td>
<td><a href="http://peterkellner.net/2010/01/25/basic-ria-services-and-datagrid-with-vs-2010-tooling-article-2-of-7/">Basic RIA Services And DataGrid With&#160; VS 2010 Tooling</a></td>
<td style="width: 100px" width="150">14 Minutes</td>
</tr>
<tr>
<td width="70">Part 3</td>
<td><a href="http://peterkellner.net/2010/01/23/adding-a-datagrid-with-connect-the-dots-databinding-in-vs-2010-article-3-of-7/">Adding A DataGrid With Connect The Dots DataBinding in VS 2010</a></td>
<td style="width: 100px" width="150">13 Minutes</td>
</tr>
<tr>
<td width="70">Part 4</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-navigation-page-to-a-silverlight-business-application-template-article-4-of-7/">Adding a Navigation Page to a Silverlight Business Application Template</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 5</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-speakers-page-template-with-converters-in-visual-studio-2010-beta2-article-5-of-7/">Adding Speakers Page Template With Converters In Visual Studio 2010 Beta2</a></td>
<td style="width: 100px" width="150">11 Minutes</td>
</tr>
<tr>
<td width="70">Part 6</td>
<td><a href="http://peterkellner.net/2010/01/25/adding-a-sessions-page-that-includes-a-query-parameter-in-silverlight-vs2010-article-6-of-7/">Adding A Sessions Page That Includes a Query Parameter In Silverlight VS2010 Beta2</a></td>
<td style="width: 100px" width="150">10 Minutes</td>
</tr>
<tr>
<td width="70">Part 7</td>
<td><a href="http://peterkellner.net/2010/01/25/authentication-and-authorization-using-ria-services-article-7-of-7/">Basic Authentication and Authorization In RIA Services</a></td>
<td style="width: 100px" width="150">5 Minutes</td>
</tr>
</tbody>
</table>
<p> 
<br /><img src="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P1_Intro_Thumb.jpg" alt="media" /><br />

<p>I’ve heavily borrowed from Brad Abrams <a href="http://blogs.msdn.com/brada/archive/2009/11/19/pdc09-talk-building-amazing-business-applications-with-silverlight-4-ria-services-and-visual-studio-2010.aspx">PDC09 presentation</a> here and am very thankful for the help.&#160; I’m personally very excited about the opportunities <a href="http://silverlight.net/getstarted/riaservices/">RIA Services</a> gives us as developers to efficiently build powerful multi tier applications without compromise.</p>
<p>I’d recommend going to Brad Abrams PDC09 presentation mentioned above to get a better understanding of what Microsoft was thinking and its plans for RIA Services. The way I see it is RIA Services is built on the WCF Stack.&#160; It basically is a technology that let’s the developer create both client and server code at the same time.&#160; It essentially removes the middle layer form a development perspective, but keeps it there in a very physical way using all the power of WCF.&#160; For example, you create you logic on the server side and that code automatically gets migrated to the client for simplicity of calling.</p>
<p>For those interested where the motivation came from to to this, it’s an interesting story.&#160; Last week, <a href="http://blog.brandewinder.com/">Mathias Brandewinder</a>, the organizer of our local Bay.Net San Francisco user group emailed and asked if I could fill in last minute for the upcoming (actually today’s) bay.net meeting and, could I talk about RIA Services.&#160; Well, 2 years or so ago, I did a quite extensive Silverlight 1.1 project for Leverage Software using the first beta of the .CLR release of Silverlight (C#).&#160; I have to say, it was an awful experience.&#160; So, now at <a href="http://www.silverlight.net/">Silverlight</a> 4.0, RIA Services, I’m back and very excited. </p>
<p>By way of people that have helped me in the last week to get this far, just to name a few:&#160; <a href="http://blogs.msdn.com/brunoterkaly/default.aspx">Bruno Terkaly</a>, offering to do whatever he could and giving me tech tips, <a href="http://blogs.msdn.com/synergist/">Michael Scherotter</a> in “going to town” as he says to make the Speaker’s page look really nice in a live meeting, <a href="http://victorgaudioso.wordpress.com/">Victor Gaudioso</a> in taking time on his busy weekend to call me&#160; and offer help, <a href="http://blogs.msdn.com/brada/archive/2010/01/17/great-ria-services-overview-in-dr-dobbs.aspx">Brad Abrams</a> putting up with my list of naive questions and patiently responding, a slew of <a href="http://aspinsiders.com/default.aspx">ASPInsiders</a> who pointed me at an excellent place to host the videos, and <a href="http://hackingsilverlight.blogspot.com/">David Kelly</a> for giving me a nicely styled Silverlight player to show the videos on this blog.</p>
<p>I’m sitting in the mall below the <a href="http://www.microsoft.com/about/companyinformation/usaoffices/northwest/sanfrancisco.mspx">Microsoft Office in San Francisco</a> where the presentation will be in about 2 hours.&#160; Hopefully, I’ll finish all seven articles and get them posted to the internet very soon.&#160; I did the videos as just practice for my presentation.&#160; They are not polished or edited.&#160; I’m taking the chance of posting them in the hopes that they help someone struggling with all the new features like I have been during the last week.</p>
<p>Finally, this demo is built on live <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp</a> Data that has been collected over the past 4 years.&#160; I can’t really publish that database along with the completed solution before I clean and randomize the attendee data.&#160; Meanwhile, I will post the project code but it will not work until I’ve had a chance to clean up the database.&#160; My thinking is that it’s all positive and better to release the code now rather than wait until I have the database cleaned up.</p>
<p>Below is what the end result of what we are building will look like (if you make it through all the articles and videos).</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/UsingRIAServicesWithVisualStudio2010Beta_94F1/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/UsingRIAServicesWithVisualStudio2010Beta_94F1/image_thumb.png" width="414" height="494" /></a></p>
<p>Attached here is source that you can build with Visual Studio 2010 Beta 2 and it will work with No Database.&#160; The Domain Class is heavily modified from what is presented, but it will allow you to actually run and play with real data. </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:f125b32d-a630-4c3b-838b-1dc56760eeb7" class="wlWriterSmartContent">
<p><a href="http://peterkellner.net/FilesForWebDownload/UsingRIAServicesWithVisualStudio2010Beta_94F1/RIAService_BayNet_NoDatabase.zip" target="_blank">Solution Zip File</a></p>
</p></div>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:758c6f86-44c4-4139-b6fe-133a4e6f71b4" class="wlWriterSmartContent">
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:8eb9d37f-1541-4f29-b6f4-1eea890d4876:758c6f86-44c4-4139-b6fe-133a4e6f71b4" class="wlWriterSmartContent"></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2010/01/20/riaservices-silverlight-4-tutorial-svcc-part1of7-introduction/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<enclosure url="http://video.peterkellner.net/video/RIAServicesBayNet20090120/P1_Intro.flv" length="1" type="video/x-flv"/>
	</item>
		<item>
		<title>Great Discussion With Nikhil Kothari About RIA Services</title>
		<link>http://peterkellner.net/2009/11/18/ria-services-silverlight-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ria-services-silverlight-4</link>
		<comments>http://peterkellner.net/2009/11/18/ria-services-silverlight-4/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 04:58:04 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/11/18/ria-services-silverlight-4/</guid>
		<description><![CDATA[&#160;

http://twitpic.com/pxclg
One of my goals for PDC this year has been to better understand the Microsoft data story about how to work with clients better (Silverlight, JavaScript, Forms, etc.).&#160; RIA services has been on my radar for quite some time.&#160; I was hoping to get some good conversations about this, but never expected to get almost [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/GreatDiscussionWithNikhilKothariAboutRIA_8FC1/43546372.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="43546372" border="0" alt="43546372" src="http://peterkellner.net/FilesForWebDownload/GreatDiscussionWithNikhilKothariAboutRIA_8FC1/43546372_thumb.jpg" width="184" height="244" /></a></p>
<p><a title="http://twitpic.com/pxclg" href="http://twitpic.com/pxclg">http://twitpic.com/pxclg</a></p>
<p>One of my goals for PDC this year has been to better understand the <a href="http://www.microsoft.com/en/us/default.aspx">Microsoft</a> data story about how to work with clients better (<a href="http://www.silverlight.net/">Silverlight</a>, JavaScript, Forms, etc.).&#160; RIA services has been on my radar for quite some time.&#160; I was hoping to get some good conversations about this, but never expected to get almost an hour with <a href="http://www.nikhilk.net/">Nikhil</a>, the inventor of <a href="http://www.silverlight.net/getstarted/riaservices/">RIA services</a>.</p>
<p> <span id="more-383"></span>
<p>Today, I spent about 2 hours in the RIA booth writing my first RIA services, Silverlight 4 App with VS2010.&#160; I love it!&#160; surprisingly mature for a new product like this.&#160; All I can say for now is “RIA Services removes about 4 acronyms between the client and the server”.</p>
<p>I’ll be blogging more about this later, but I’m loving it.&#160; The ability to not have to reproduce data structures down to the client is a great dream and something I think this will bring us.&#160; Listening to the keynote now from <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a>, <a href="http://www.hanselman.com/blog/">Scott Hanselman</a>, <a href="http://blogs.msdn.com/bgold/">Brian Goldfarb</a>, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/11/18/ria-services-silverlight-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Great 2 Day Silverlight Training Event with Michael Scherotter (AKA the Synergist)</title>
		<link>http://peterkellner.net/2008/06/15/silverlight-blend-training/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlight-blend-training</link>
		<comments>http://peterkellner.net/2008/06/15/silverlight-blend-training/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 16:03:38 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Expressions Blend Training]]></category>
		<category><![CDATA[Synergist]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/06/15/silverlight-blend-training/</guid>
		<description><![CDATA[<br />Michael Scherotter does a great 2 day training presentation on Silverlight focussing on Expression Blend 2.5.  Michael is a Microsoft Developer Evangelist and Silverlight Expert.  I highly recommend going to one of these if Michael chooses to do another one.<br />]]></description>
			<content:encoded><![CDATA[<p>Last month, <a href="http://blogs.msdn.com/synergist/" target="_blank">Michael Scherotter</a>, a Microsoft Developer Evangelist and <a href="http://www.microsoft.com/silverlight/" target="_blank">Silverlight</a> expert did a great 2 day even in San Francisco on Silverlight.&#160; His aim was to focus on designer, but as a developer, I like to see how the other half thinks.&#160; Seemed like about 30 people were there and I&#8217;d say everyone got good stuff from it.&#160; I had never met Michael before but have been a regular reader of his blog.&#160; One of the things I really liked was that Mike seemed to have a great handle from both the dev side (like me) and the designer side.&#160;&#160;&#160; His focus was around <a href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend" target="_blank">Expression Blend 2.5</a> Turns out he is an real architect (builds buildings not code) by training and from what I know, that brings a discipline into design that is similar to the way us Dev&#8217;s think.</p>
<p> <span id="more-116"></span>
<p>If he ever does this again, I highly recommend you go if you can.</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/06/img-0563.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IMG_0563" src="http://peterkellner.net/wp/wp-content/uploads/2008/06/img-0563-thumb.jpg" width="415" height="313" /></a></p>
<p>&#160;</p>
<p>BTW, here is the agenda he followed.</p>
<p>&#160;</p>
<h3>Agenda</h3>
<p>1. System Configuration</p>
<p>2. Overview of Silverlight</p>
<p>3. Expression Blend</p>
<p>a. Graphical Elements</p>
<p>b. Paths</p>
<p>c. Gradients</p>
<p>d. Transforms</p>
<p>e. Animation</p>
<p>f. Controls</p>
<p>g. Styling &amp; Skinning</p>
<p>4. Debugging</p>
<p>5. Event Handling and code behind</p>
<p>6. Controlling Media</p>
<p>7. Controlling animation</p>
<p>8. DOM Page interaction</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/06/15/silverlight-blend-training/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silicon Valley Code Camp 07 at Foothill College, Great Success!!!</title>
		<link>http://peterkellner.net/2007/10/29/codecamppanews/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecamppanews</link>
		<comments>http://peterkellner.net/2007/10/29/codecamppanews/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 03:13:41 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/10/29/codecamppanews/</guid>
		<description><![CDATA[<p>We all really out did ourselves this year.  Not only did we attract an outstanding panel of speakers, an awesome collection of attendees, but the local newspapers recognized the event for what it was and ran a front page story about it.
</p>
<img src="http://peterkellner.net/wp/Images/svcodecamp07/PaloAltoNewsCodeCamp_t.jpg" alt="Silicon Valley Code Camp Palo Alto Daily News"  />]]></description>
			<content:encoded><![CDATA[<p>We just wrapped up Silicon Valley Code Camp.&#160; It was an awesome event.&#160; This year was our second time around the block so the preparation wasn&#8217;t quite as draining as last year.&#160; We did have a new dean (Timothy Woods) to work with at Foothill College and when we initially found that out, I was worried.&#160; What if he doesn&#8217;t want to do this?&#160; Well, turns out, that could not have further from the case.&#160; Tim was a stellar partner and everything that could go right did.&#160; The weather was perfect, lots of people chipped in for both planning as well as execution, and everything really came together.&#160; We had over 900 registered, 75 sessions, and about 400 on Saturday attending and 250 on Sunday.</p>
<p> <span id="more-84"></span>
<p>Last year, we had the help of giving away 400 copies of Vista Ultimate to draw attendees.&#160; This year, all we had was code!&#160; Lots and lots of code.&#160; They came, they saw, and from what I can see, they are going home and blogging.&#160; Last minute, Microsoft gave us 5 copies of Vista Ultimate to raffle off so that was nice.&#160; Foothill gave away a free class and there were lots of other fun things.</p>
<p>Well, my personal highlight for today (the Monday after code camp) is that the Palo Alto Daily News ran a front page picture of me.&#160; One of my good friends walked by the newspaper stand and my understanding is she broke out laughing when she saw my picture (I bet Arnold&#8217;s friends don&#8217;t do this when they see him on the cover).&#160; At any rate, here is the front page below.</p>
<p>To all those reading that participated in Code Camp in one way or another, thank you thank you thank you.&#160; I&#8217;d say we all did a great job.</p>
<table cellpadding="50">
<tbody>
<tr>
<td rowspan="2"><a href="http://peterkellner.net/wp/Images/svcodecamp07/PaloAltoNewsCodeCamp.jpg"><img class="style1" alt="Silicon Valley Code Camp Palo Alto Daily News" src="http://peterkellner.net/wp/Images/svcodecamp07/PaloAltoNewsCodeCamp_t.jpg" /></a></td>
<td><strong><em>(Below is the paragraph directly below my picture)             <br /><img class="style1" alt="Silicon Valley Code Camp Palo Alto Daily News" src="http://peterkellner.net/wp/Images/svcodecamp07/PaloAltoNewsCodeCampJustWords.jpg" /></em></strong></td>
</tr>
<tr>
<td>&#160;</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/10/29/codecamppanews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silicon Valley Code Camp Presentation Sunday 10/28, 1:15 at Foothill College</title>
		<link>http://peterkellner.net/2007/10/22/codecampsv07presentationtime/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampsv07presentationtime</link>
		<comments>http://peterkellner.net/2007/10/22/codecampsv07presentationtime/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 22:25:06 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/10/22/codecampsv07presentationtime/</guid>
		<description><![CDATA[Please come join me for my presentation at Foothill College this coming weekend on Silverlight.]]></description>
			<content:encoded><![CDATA[<h2>I&#8217;m Speaking at Silicon Valley Code Camp on Silverlight</h2>
<h3>Sunday at 1:15PM, October 27th. Foothill College</h3>
<p><a href="http://www.siliconvalley-codecamp.com">     <br />http://www.siliconvalley-codecamp.com</a></p>
<p>This coming Sunday, October 27th at 1:15PM, I&#8217;m giving a presentation about a Silverlight application I developed for Microsoft and Leverage Software.&#160; It will be a pretty technical session on all the things I learned and the tricks I had to use to make things work.&#160; The session can be found <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;amp;id=125">here</a>.</p>
<p> <span id="more-82"></span>
<p>I worked very closely with a very talented designer (Uday Gajendar) who is also doing a session after mine titled &quot;<a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=160">Life     <br />on the Other Side: A UI Designer&#8217;s story</a>&quot;.&#160; I plan on going to that one also.</p>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/10/22/codecampsv07presentationtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Dev Camp San Francisco, Saturday, The Main Show!</title>
		<link>http://peterkellner.net/2007/09/16/silverlightsfcampday2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightsfcampday2</link>
		<comments>http://peterkellner.net/2007/09/16/silverlightsfcampday2/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 00:09:11 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/09/16/silverlightsfcampday2/</guid>
		<description><![CDATA[<br />
<p>On Day 2 of the Silverlight Dev Camp In San Francisco there were lots of great presentations.   I gave one on adding animation to a silverilght application using blend, then wiring it up to work with Silverlight Alpha 1.1.  I also showed Searchlight and DiggPopular.  Two Silverlight applications I've written.  This post includes my slide deck and source for what I demonstrated.   </p>
<br />
<img src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/petertalking1_t.jpg" alt="Peter Presenting Searchlight and DiggPopular at 4:30 to 5PM" />]]></description>
			<content:encoded><![CDATA[<table cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td><img alt="Peter Presenting Searchlight and DiggPopular at 4:30 to 5PM" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/petertalking_t.jpg" /></td>
<td><img alt="Peter Presenting Searchlight and DiggPopular at 4:30 to 5PM" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/petertalking1_t.jpg" /></td>
</tr>
</tbody>
</table>
<p>Day 2 (Saturday) was packed full of interesting presentations.&#160; From about 4:30 to 5:00, I did a presentation on how to build animations with blend and use them in Silverlight.&#160; Here is the description:</p>
<p> <span id="more-79"></span>
<p><span style="font-family: &quot;Arial&quot;,&quot;sans-serif&quot;; font-size: 10pt">In this presentation, I&#8217;ll talk about the implementation details of building the picture slider used in the Community Media Browser preview hosted at <a href="http://labs.leveragesoftware.com/gallery.html">http://labs.leveragesoftware.com/gallery.html</a> .&#160; In this informal talk I&#8217;ll discuss how LoadXaml() was critical to this process as well as other tricks.&#160; Because the picture slider is running from a live web feed, there      <br />is no way to know ahead of time how many picture we may have to scroll so clipping type solutions just don&#8217;t make sense.&#160; Time permitting, we&#8217;ll talk about other issues involved in building this application and of course take questions.<o  :p></o></span></p>
<p>The slides and presentation are all bundled up in this zip file if you would like to download them.</p>
<p><a href="http://peterkellner.net/misc/SilverLightSF.zip">     <br />http://peterkellner.net/misc/SilverLightSF.zip</a></p>
<table cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td colspan="2"><a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/peterclass.jpg">           <br /><img class="style1" alt="Class Room for Silverlight Dev Camp Before Presentation" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/peterclass_t.jpg" /></a></td>
</tr>
<tr>
<td colspan="2"><a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/landmark1.jpg">           <br /><img class="style1" alt="Landmark Building San Francisco" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/landmark1_t.jpg" /></a></td>
</tr>
<tr>
<td colspan="2"><img alt="Landmark Building San Francisco" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/landmark2_t.jpg" /></td>
</tr>
</tbody>
</table>
<p><a href="http://technorati.com/tag/silverlightdevcamp" rel="tag"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0.4em; vertical-align: middle; border-left-width: 0px" alt=" " src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=silverlightdevcamp" />silverlightdevcamp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/09/16/silverlightsfcampday2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight Dev Camp San Francisco, Friday Night Opening Ceremonies!</title>
		<link>http://peterkellner.net/2007/09/15/silverlightdevcampsf/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightdevcampsf</link>
		<comments>http://peterkellner.net/2007/09/15/silverlightdevcampsf/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 16:49:04 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/09/15/silverlightdevcampsf/</guid>
		<description><![CDATA[<p>Silverlight Dev Camp starts out with a bang!  Lots of attendees and lots of fun.</p>
<a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SilverlightDevCampLeadersFridayNight.jpg">
<img src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SilverlightDevCampLeadersFridayNight_t.jpg" alt="Joe Kleinschmidt promising more beer for everyone" class="style1" /></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SilverlightDevCampLeadersFridayNight.jpg"><img class="style1" alt="Joe Kleinschmidt promising more beer for everyone" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SilverlightDevCampLeadersFridayNight_t.jpg" /></a></p>
<p>For those that have never been to a <a href="http://barcamp.org/SilverlightDevCampSF">Silverlight Dev Camp</a> (OK, maybe nobody has ever been to one), this is an event where people on he (b)leading edge get together and talk about how much fun they are having and share war stories.&#160; For me, life couldn&#8217;t get any better.&#160; Well, as one of the other moderators on asp.net forums recently pointed out to me&#8230; Get a life.</p>
<p> <span id="more-78"></span>
<p>Just a week ago, it seemed there were only a couple dozen signups for this event which is being hosted by Microsoft in their nice San Francisco office in the Landmark Office Building (1 Market Street, Thanks Anand),&#160; Somehow, now, there are over 100 people signed up.&#160; I was talking to <a href="http://barcamp.org/SilverlightDevCampSF#Organizers">Kevin Marshall and Kurt Brockett</a> (the main organizers) and I asked them how they rocketed attendance 5x in the last week.&#160; They said things like Twitter and lots of    <br />email.&#160; Since most (OK all) of you know I&#8217;m organizing <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley&#8217;s second code camp</a> at the end of October I was taking careful notes.&#160; We currently have 260 signed up and I&#8217;m thinking&#8230; 260 x 5 = ???&#160; Wow, I need to pay attention.&#160; Then <a href="http://www.leveragesoftware.com/company/management.html">Joe Kleinschmidt, CTO of LeverageSoftware</a> mentioned that he had announced about a week ago that he&#8217;d buy beer for everyone.</p>
<p>Where was I.&#160; Oh yes, Sitting in a Starbucks in San Francisco waiting for day two to start, wondering why my notebook&#160; is not charging, and of course just signed up for twitter.</p>
<p>So, last night was a big group presentation of Silverlight.&#160; Today is lots of smaller discussions about <a href="http://silverlight.net/Default.aspx">Silverlight</a>.&#160; I&#8217;ve got one at 4PM where I&#8217;ll be talking about my latest Silverlight apps, <a href="http://searchlight.peterkellner.net/Default.html">Searchlight</a> and <a href="http://diggpopular.peterkellner.net/Default.html">DiggPopular</a>.&#160; It&#8217;s only 30 minutes and I could easily talk all day about it.&#160; If you sign up for twitter, you can read about how I did!</p>
<p>Time to go, That&#8217;s about it for now besides some pictures.&#160; Enjoy.</p>
<p>&#160;<a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/JoekPromisingMoreBeet.jpg">     <br /><img class="style1" alt="Joe Kleinschmidt promising more beer for everyone" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/JoekPromisingMoreBeet_t.jpg" /></a></p>
<p><a href="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SLCampFullHouse.jpg">     <br /><img class="style1" alt="Full House" src="http://peterkellner.net/wp/Images/SilverLightDevCampSF/SLCampFullHouse_t.jpg" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p><a href="http://technorati.com/tag/silverlightdevcamp" rel="tag"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0.4em; vertical-align: middle; border-left-width: 0px" alt=" " src="http://static.technorati.com/static/img/pub/icon-utag-16x13.png?tag=silverlightdevcamp" />silverlightdevcamp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/09/15/silverlightdevcampsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking Saturday 9/15 4PM at Silverlight DevCamp, San Francisco</title>
		<link>http://peterkellner.net/2007/09/13/silverlightbarcamp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightbarcamp</link>
		<comments>http://peterkellner.net/2007/09/13/silverlightbarcamp/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 05:24:19 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/09/13/silverlightbarcamp/</guid>
		<description><![CDATA[<br />
<p><strong>Topic:  Building animation into "Community Media Browser" for Leverage Software with Silverlight Alpha 1.1</strong></p>
<br />
<a href="http://barcamp.org/SilverlightDevCampSF">
<img src="http://peterkellner.net/wp/Images/silverlightDevCamp_sf_t.png" class="style1" /></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Topic: Building animation into &quot;Community Media Browser&quot; for Leverage Software with Silverlight Alpha 1.1</strong></p>
<p><a href="http://barcamp.org/SilverlightDevCampSF"></a></p>
<p><img class="style1" src="http://peterkellner.net/wp/Images/silverlightDevCamp_sf.png" /></p>
<p> <span id="more-77"></span>
<p>SilverlightDevCampSF is an upcoming gathering, inspired by <a href="http://www.barcamp.org">BarCamp</a>, to build <a href="http://silverlight.net">Silverlight</a> applications, It&#8217;s organized by volunteers &amp; Silverlight enthusiasts, with attendance free to all. At this event, I will be presenting a 30 minute presentation on how to build animation into a Silverlight application. I&#8217;ll talk about the implementation details of building the picture slider used in the <a href="http://labs.leveragesoftware.com/silverlight.html">Community Media Browser</a> preview hosted at     <br /><a href="http://labs.leveragesoftware.com/gallery.html">     <br />http://labs.leveragesoftware.com/gallery.html</a> .&#160; In this informal talk I&#8217;ll discuss how LoadXaml() was critical to this process as well as other tricks.&#160; Because the picture slider is running from a live web feed, there is no way to know ahead of time how many picture we may have to scroll so clipping type solutions just don&#8217;t make sense.&#160; Time permitting, we&#8217;ll talk about other issues involved in building this application and of course take     <br />questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/09/13/silverlightbarcamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Media Browser Using Silverlight 1.1 Alpha and Leverage Software&#8217;s REST API</title>
		<link>http://peterkellner.net/2007/09/13/searchlightpart1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=searchlightpart1</link>
		<comments>http://peterkellner.net/2007/09/13/searchlightpart1/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 01:24:22 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/09/13/searchlightpart1/</guid>
		<description><![CDATA[<br />
<p>Searchlight was born from the desire to show the outstanding ability of
Silverlight to create a compelling web application using existing infrastructure
technology.&#160; The products was developed working with
<a href="http://www.leveragesoftware.com/">Leverage Software, </a>a
San Francisco company dedicated to delivering first class communities for it&#39;s
customer&#39;s, <a href="http://peterkellner.net/about/">Peter Kellner</a> (the Silverlight technology guy), and
<a href="http://udanium.com/about_me.html">Uday Gajendar</a>, the design
specialist.&#160; Our efforts can be viewed by going to the
<a href="http://labs.leveragesoftware.com/silverlight.html">LeverageSoftware Labs Link Here</a>.&#160;
Simply follow the directions on that web page to run the web application.&#160;
In this article, many of the Silverlight features in
Searchlight are discussed.&#160; </p>

<a href="http://searchlight.peterkellner.net/Default.html">
<img alt="click here if you have Silverlight Alpha 1.1 Installed" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image001t.jpg" class="style1"  /></a>
<br />]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Searchlight was born from the desire to show the outstanding ability of Silverlight to create a compelling web application using existing infrastructure technology.&#160; The products was developed working with <a href="http://www.leveragesoftware.com/">Leverage Software, </a>a     <br />San Francisco company dedicated to delivering first class communities for it&#8217;s customer&#8217;s, <a href="http://peterkellner.net/about/">Peter Kellner</a> (the Silverlight technology guy), and <a href="http://udanium.com/about_me.html">Uday Gajendar</a>, the design specialist.&#160; Our efforts can be viewed by going to the <a href="http://labs.leveragesoftware.com/silverlight.html">LeverageSoftware Labs Link Here</a>.&#160; Simply follow the directions on that web page to run the web application. In this article, many of the Silverlight features in Searchlight are discussed. </p>
<h2>Background</h2>
<p>Searchlight was built to run with the first Alpha 1.1 version of Silverlight shipped from Microsoft.&#160; Searchlight takes advantage of Leverage Software&#8217;s extensive web service api to provide real time data based on those web feeds.&#160; Currently, Leverage Software&#8217;s&#160; main access to the Dwell Community is an html application that can be found at    <br /><a href="http://dwell.leveragesoftware.com/">http://dwell.leveragesoftware.com/</a>.&#160; Using the Silverlight Alpha 1.1 combined with </p>
<p> <span id="more-76"></span>
<p><a href="http://www.microsoft.com/expression/products/overview.aspx?key=blend">Microsoft&#8217;s Expression Blend</a>, a new compelling interface to the Dwell Community was built.&#160; Below is a screen shot of the application running after it has been loaded for the first time.</p>
<p><img src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image001.jpg" width="624" height="408" /></p>
<h2>Dynamic Data Content</h2>
<p>Silverlight supports access to remote data feeds. This allows for interactive applications to be built that rely on external datasources seamlessly.&#160; For example, when the user clicks on the Furniture Menu choice, a query is sent to the Dwell on line community and all members who have pictures tagged with the word furniture are retrieved.</p>
<h2>Responsiveness</h2>
<p>Silverlight runs on the client side which means all user interaction (events) are processed in the browser and do not require a round trip to the server. For example, when the user wants to scroll pictures right to left they would press the green right arrow button and the pictures will scroll.&#160; Notice also the nice halo affect when you mouse over the green scroll button.</p>
<p><img alt="sl2.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image004.jpg" width="90" height="107" /></p>
<p>Again, because Silverlight is all client side, the speed at which the pictures scroll is determined by how long the user holds down the mouse over the arrow key before releasing. If the user quickly clicks the green arrow button, the pictures move quickly, if they click and hold for a second, then release, the picture will&#160; scroll more slowly.&#160; In addition the little green dots give you immediate feedback of how many pictures are in the entire scrollable region, and where you are in that list.&#160; For example, if you look at the second line of pictures (Wimlarch), you’ll notice that there are    <br />6 green dots with 5 illuminated on the left (as shown below).</p>
<p><img alt="sl3.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image006.jpg" width="111" height="66" /></p>
<p>This means, you are looking at 5/6ths of the pictures (83 percent), and that you are scrolled all the way to the left. If half the green dots were illuminated, then you would only be looking at half the pictures for that particular person (line). Again, because this is a completely client side programming model (Silverlight), as you scroll, the green dots automatically change and there is no server load and no traffic on the internet (with the exception of the actual    <br />images being downloaded if they have not previously been cached in the browser).</p>
<h2>Layout/Size Management</h2>
<p>It’s important for a real functioning application to be able to manage the information inside it’s borders. The amount of screen area available to the program is different depending on how big the users browser is, as well as how much space the user has allocated to the browser window.</p>
<p>Silverlight exposes a class called the HttpBrowserClass which allows the client software (Silverlight) to react and adjust based on screen size. For example, if the browser size is reduced, the number of rows showing is reduced to the correct number (two in this case) and the pictures showing on each row is reduced to 4. Of course the little green dots adjust also. Here is a screen showing that situation.</p>
<p><img src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image007.jpg" width="624" height="394" /></p>
<p>Notice also that the menu choices are closer together. The point here is that each Silverlight control can change its position dynamically depending on external inputs such as browser size changes.</p>
<h2>Special Effects.</h2>
<p>Silverlight shines when it comes to special effects. Many effects can be achieved, while only a few are demonstrated here. The effects demonstrated here are as follows.</p>
<h3>Picture Growth On Mouse Over </h3>
<p>This means that as you mouse over a picture it slightly grows and when you mouse out it shrinks again.&#160; This is to give you an idea that you can click on it.</p>
<h3>Picture Flipping to the opposite side</h3>
<p>When you click on a picture in the user’s collection, the picture fades in at a higher resolution as below.</p>
<p><img alt="sl5.JPG" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image010.jpg" width="397" height="295" /></p>
<p>If you click on the little orange triangle on the lower right corner of the picture, the picture actually flips over simulating a 3d flip and the information about the picture is displayed on the back side.</p>
<p><img alt="sl6.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image012.jpg" width="389" height="298" /></p>
<h3>Accents On Mouse Over</h3>
<p>Another Silverlight effect is what happens when you mouse over one of the green left or right arrow buttons.&#160; Small expanding circles grow out of the button to indicate that this is something that can be pressed.</p>
<h3>Links to External Web Sites</h3>
<p>Silverlight supports many features of standard web browsers including the ability to link to external web sites. If you bring up the Credits screen by pressing the “Credits” button in the upper right corner, you will see the screen below.</p>
<p><img alt="sl7.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image014.jpg" width="624" height="458" /></p>
<p>Notice that under each of our names, there is a “View Website” button.&#160; When this button is pressed, a new browser window is opened containing the information about one of us.&#160; You can also get to more information about one of the members by clicking on their picture on the far left of the picture row.</p>
<h3>Asynchronous Processing</h3>
<p>Silverlight allows multiple things to be done at the same time. For example, when the program first loads, an initial web feed from the dwell community is retrieved. This can take several seconds so instead of nothing happening, a small image is displayed with dynamic content.</p>
<p><img alt="sl8.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image016.jpg" width="134" height="170" /></p>
<p>The little dial circles showing time passing. When the web download is complete, Silverlight has the built in capability to notify the running program that the work is complete so it can continue and bring all the controls and pictures to life.</p>
<h3>Multiple Ways to See Similar Data</h3>
<p>Silverlight has a complete custom programming model that allows the developer to show the data in lots of different ways. On the opening screen, if the user presses the “View Gallery” button on any of the picture rows, they will get a screen that looks like what is below.</p>
<p><img alt="sl10.jpg" src="http://peterkellner.net/wp/Images/SearchLightPart1/clip_image018.jpg" width="624" height="452" /></p>
<p>Notice that as the picture is scrolled through the artists collection, the title and information about the picture is displayed. Again, this all happens with no server interaction or traffic.</p>
<h2>Conclusions</h2>
<p>Silverlight is indeed a compelling technology to build applications that can be run anywhere on the internet.&#160; Searchlight demonstrates just a small number of Silverlight&#8217;s great features.&#160; Understanding that there are always lots of ways to deliver the same result, Silverlight does give a way to deliver very rich content using the Microsoft development stack.&#160; In this case, that includes Visual Studio, Microsoft Expressions Blend and of course the    <br />.Net Programming language c#.&#160; Many of the features of Silverlight .net alpha 1.1 are not yet available, so we anticipate when the final production release comes, we will be able to deliver even more functionality, even more efficiently than we can do it now.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/09/13/searchlightpart1/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Code Camp Presentation Coming 10/27-28/2008 on Silverlight, Los Altos, California</title>
		<link>http://peterkellner.net/2007/09/12/codecampsv07presentation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampsv07presentation</link>
		<comments>http://peterkellner.net/2007/09/12/codecampsv07presentation/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 05:06:19 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/09/12/codecampsv07presentation/</guid>
		<description><![CDATA[I'll be presenting a session at the upcoming Code Camp in Silicon Valley's Foothill College on October 27th-28th.  Details can be found at <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&#38;id=125">
http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&#38;id=125</a>.
<br />
<a href="http://www.SiliconValley-Codecamp.com/Home.aspx"  ><img src="http://www.siliconvalley-codecamp.com/DisplayAd.ashx?ImageType=2" alt="CodeCamp at FootHill College.  Click Here for Details and Registration" longdesc="" /></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m presenting a session on Silverlight 1.1 at Silicon Valley Code Camp October 27-28, 2007. this event will be held at Foothill College. If you can make it, please register here:   <br /><a href="http://www.siliconvalley-codecamp.com/AttendeeRegistration.aspx">     <br />http://www.siliconvalley-codecamp.com/AttendeeRegistration.aspx</a></p>
<p>So, you might be wondering, what is a code camp, and what does it cost? Well, it&#8217;s completely free and completely staffed by volunteers. It&#8217;s a place you can share your passion for technology with others like yourself, it&#8217;s a place you can give a presentation on your favorite topic to a receptive audience, as well as go to sessions by others who want to share the knowledge. Typically, there are sessions on all kinds of technologies from Microsoft&#8217;s latest stuff to Java,   <br />Ruby, Python, JavaScript, and even more obscure technologies. It&#8217;s basically formatted like a 1 day PDC/Teched/JavaOne style event where sessions are pre arranged and you just choose what interests you. Session sign up closes a week before the event so you know what you&#8217;ll be in for ahead of time and you can plan.</p>
<p> <span id="more-75"></span>
<p>At any rate, my session is at this URL:</p>
<p><a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&amp;id=125">     <br />http://www.siliconvalley-codecamp.com/Sessions.aspx?ForceSortBySessionTime=true&amp;id=125</a></p>
<p>The more people come, the more fun it will be.</p>
<p>See you at Camp!</p>
<p><a href="http://www.SiliconValley-Codecamp.com/Home.aspx"><img alt="CodeCamp at FootHill College.  Click Here for Details and Registration" src="http://www.siliconvalley-codecamp.com/DisplayAd.ashx?ImageType=4" longdesc="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/09/12/codecampsv07presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Images with the Silverlight Downloader in Alpha 1.1</title>
		<link>http://peterkellner.net/2007/07/03/silverlightdownloader/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightdownloader</link>
		<comments>http://peterkellner.net/2007/07/03/silverlightdownloader/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 04:38:34 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Page Handlers]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/07/03/silverlightdownloader/</guid>
		<description><![CDATA[<br /><p>This article gives you a way to download images from remote servers on different domains using the downloader object of Silverlight.  Without this, you can not easily keep track of when images are downloaded to your Silverlight Application and deal with that event.  You simply can set the source tag and the image arrives when it arrives.</p>]]></description>
			<content:encoded><![CDATA[<p><strong>From Non-Local Servers Asynchronously</strong></p>
<p>This issue has come up several times for me.&#160; That is, you have an image&#160; url you want to display in your silverlight .net 1.1 application that comes from&#160; some foreign server.&#160; That is, you want this to work:&#160; (and of course    <br />it does not).</p>
<h2>The Problem</h2>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader1.jpg" /></p>
<p> <span id="more-67"></span>
<p>Even though, you can do this:</p>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader2a.jpg" /></p>
<p>There seems to be a subtle difference having to do with cross domain security&#160; that I just don&#8217;t get but since it&#8217;s there, we have to deal with it.</p>
<h2>The Solution</h2>
<p>So first, why do you even care.&#160; Why not just do the one that works?&#160; Well, the answer is that you want to be able to deal with what happens while an image is being downloaded.&#160; My particular problem has to do with what happens when you bring up a picture in a modal dialog type thing.&#160; That is, you click on a small thumbnail, and a larger ones comes up.&#160; In my case, I&#8217;m getting the image url from a web service so I don&#8217;t have the luxury of opening it locally.&#160; I have to use a foreign (remote) url.&#160; And, the reason I don&#8217;t want to open it by simply setting the source tag is that I&#8217;m    <br />reusing a control.&#160; This means that I&#8217;m simply hiding it and unhiding it. If I just set the source and unhide it, the wrong image comes up.&#160; That is, the one from the previous request. Then, a few seconds later, the correct image     <br />comes up.&#160; Bad.</p>
<p>We really want to use the Downloader object.&#160; A very cool control, but not if it doesn&#8217;t work cross domain IMHO.</p>
<p>The work around for this is to write a http handler that runs in your local asp.net project that you pass the url you want to display. Then, that web service turns around, calls the cross domain server, gets the image and returns it to your Downloader object.&#160; Simple in concept, but the devil is in the details.&#160; How, for example to you pass a url (that may include all kinds of stuff like &amp;&#8217;s to a local web service.&#160; The answer is encode it!&#160; Then decode it at the web service.&#160; I&#8217;m sure you all can whip that up quickly, but since I did already, why bother.&#160; I&#8217;m going to paste the code below with brief explanations to help.&#160; Here goes:</p>
<h3>The Silverlight UserControl That Calls the web service</h3>
<p>The way I did the code in the silverlight control is to encode the real URL I want.&#160; That is the one cross domain.&#160; I think build a URL that calls my local web service passing the parameter encoded as a base64 value as one of    <br />the url parameters.&#160; I&#8217;m using a property in my usercontrol to set this value just because that&#8217;s kind of convenient.&#160; Here is what the code looks like:</p>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader3.jpg" /></p>
<p>Just to give you a hint of what the might look like, in my case, this is what it is:</p>
<p><a href="http://localhost:49803/WebService/DisplayImage.ashx?URL=aHR0cDov...NDE0NzU2LkpQRw==&amp;Width=400">     <br />http://localhost:49803/WebService/DisplayImage.ashx?URL=aHR0cDov&#8230;NDE0NzU2LkpQRw==&amp;Width=400</a></p>
<p>(I put a bunch of &#8230;&#8217;s in the middle, but it was longer than that originally)</p>
<p>Silverlight is kind of limited on conversion functions so I had to write this little one called EncodeTo64 which is pasted below.&#160; I&#8217;m sure there are better ways to do it, but this one works.</p>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader5.jpg" /></p>
<p>And, don&#8217;t forget that you need to have the completed event code in your silverlight side to handle setting the source tag when the image is fully downloaded.&#160; Here is that function.</p>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader6a.jpg" /></p>
<h3>The Http Handler (DisplayImage.ashx file)</h3>
<p>To make all this come to live, you need an http handler that will make the call to the cross domain server.&#160; Below is that code.&#160; I added an extra parameter for width so that if you know the image you need is smaller than the one across the internet, you can just get downloaded what you need.&#160; Here is the code for the handler:</p>
<p><img alt="does not work" src="http://peterkellner.net/misc/downloader7.jpg" /></p>
<p>&#160;</p>
<h2>Conclusion</h2>
<p>I&#8217;m guessing that this problem will go away in the next alpha or beta release of Silverlight .net.&#160; In the mean time, this works very well for me and hopefully will for you also.&#160; I don&#8217;t have this in a good sample application and really just wanted to get it posted because I know others were having the same problems.&#160; If someone goes through and makes a good demo of this, please post a comment with the code for others to download.</p>
<p>Thanks for reading, and best of luck with your Silverlight Development!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/07/03/silverlightdownloader/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>One Last Gotcha for debugging Web Service Projects with Silverlight</title>
		<link>http://peterkellner.net/2007/06/20/silverlightdebugonemorething/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightdebugonemorething</link>
		<comments>http://peterkellner.net/2007/06/20/silverlightdebugonemorething/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 01:09:27 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/06/20/silverlightdebugonemorething/</guid>
		<description><![CDATA[<br /><p>So you followed all my directions and you still can't debug your Silverlight Project with a web service?  Read on.</p>]]></description>
			<content:encoded><![CDATA[<h2>Project / Properties / Startup Options</h2>
<p>All of a sudden, I could no longer debug my project. After poking around for a while, I discovered that if I went to the webserver projects property tab, startup options I had to select &quot;Silverlight Project&quot;. I don&#8217;t remember unchecking this, but none the less, there you go.</p>
<p><img src="http://peterkellner.net/misc/sldebugc.jpg" width="500" /></p>
<p> I&#8217;m of course referring to my article of a couple days ago at:&#160; <br /><a href="http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/">     <br />http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/06/20/silverlightdebugonemorething/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Integrating Web Services and Silverlight with .Net 1.1 Alpha</title>
		<link>http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=silverlightdebugwebservicedotnet</link>
		<comments>http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/#comments</comments>
		<pubDate>Tue, 19 Jun 2007 01:18:25 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/</guid>
		<description><![CDATA[<p>This article gives you a step by step of how to build a Silverlight .net Alpha 1.1 project that includes a web service.  Its real goal is to help you set up an environment that lets you debug in spite of the cross domain security issues you will ultimately run into.</p>]]></description>
			<content:encoded><![CDATA[<h2>The Short Story:</h2>
<p>So, I&#8217;m working on a Silverlight .net project where the main source of data is a webservice.&#160; It&#8217;s not a huge amount of data, but it is not small either. In general it&#8217;s about 20K to 50K per download.&#160; My original plan was to use the <a href="http://www.silverlight.net/QuickStarts/Remote/default.aspx">quickstart method</a> (POX) and basically parse the xml using the XMLReader classes that are available on Silverlight.&#160; That didn&#8217;t work so well for     <br />me, so I switched to the proxy classes and did not have much more luck. The primary problem is I could not figure out how to debug the code on the Silverlight side.&#160; Ultimately, I ended up figuring out how to do debugging and in the next few paragraphs I&#8217;ll go through the steps including screen shots showing how to do it.</p>
<p> <span id="more-65"></span><br />
<h2>The Details</h2>
<h3>The Solution</h3>
<p>So, let&#8217;s start from the beginning.&#160; First thing to do is create an empty solution.&#160; In my case, I&#8217;m going to call that solution SearchLightMain.&#160; I&#8217;m going to use Orcas rather than vs2005 because that is required for Silverlight. Ultimately, the web services project will deploy on .net 2.0 but the development envirnoment is still Orcas.&#160; (File/New Project/Other Project Types/Empty Solution)</p>
<h3>The Silverlight Side</h3>
<p>Next, right mouse on the solution explorer and choose Add/New Project/C#/Silverlight.&#160; Leave your solutions directory in the Location textbox and put the name of your silverlight project in the name field.&#160; In my case, the name will be SearchLight.</p>
<p><img src="http://peterkellner.net/misc/sldebug1.jpg" />&#160;</p>
<p>After the project is created, my preference is to add a textblock to the page.xaml file and some color to the background so when I run it I can tell it is actually working.&#160; Here is what it looks like now&#160; after I&#8217;ve done that if right mouse and run TestPage.html.&#160; This is what you get.</p>
<p><img src="http://peterkellner.net/misc/sldebug2.jpg" /></p>
<p>And the Xaml looksl like this:</p>
<p><img src="http://peterkellner.net/misc/sldebug3.jpg" /></p>
<p>Now you have the silverlight project done.&#160; Let&#8217;s create the Web Service Project now inside of the same solution we made first.</p>
<h3>The Web Service</h3>
<p>On the solution explorer, right click on the top of the tree (solution) and say &quot;Add/New Website&quot;.&#160; Choose ASP.NET web site.&#160; (remember, this is Orcas we are still in).&#160; Make it a &quot;File System&quot;, &quot;C#&quot; project. and for the location put the directory where you have your empty solution followed by the name \WebService.&#160; In my case, the name is: C:\Users\pkellner\Documents\Visual Studio Codename Orcas\Projects\SearchLightMain\WebService&#160; Also, change the framework to .NET Framework 2.0 in the upper right hand corner of the screen &quot;Add New Website&quot;.</p>
<p>Now, your solution explorer should look like this:</p>
<p><img src="http://peterkellner.net/misc/sldebug4.jpg" /></p>
<p>And, the layout on your hard disk will look like this:</p>
<p><img src="http://peterkellner.net/misc/sldebug5.jpg" /></p>
<p>Now, we need to make the web service.&#160; The easiest thing to do is grab the code from the quickstart and paste it into a webservice if you don&#8217;t have your own.&#160; The URL where you can grab the code is:&#160; <br /><a href="http://www.silverlight.net/QuickStarts/Remote/UsingJSON.aspx">     <br />http://www.silverlight.net/QuickStarts/Remote/UsingJSON.aspx</a></p>
<p>One thing I found was that if you downgrade to .net 2.0 from .net 3.5 as we did earlier, the webservices that use the tag [System.Web.Script.Services.ScriptService] do not work. My solution was to create an Ajax enabled web site with vs2005 and copy that web.config into this project.</p>
<p>Continuing on, the next thing I did was to copy the files TestPage.html, TestPage.html.js and Silverlight.js from the SearchLight project into the WebService project.&#160; This is because we will actually be running the project from the webservices project.</p>
<p>Finally, to complete the linking, right click on the webservice project and select &quot;Add Silverlight Link&#8230;&quot; (not sure what the &#8230; means).&#160; Here is what it looks like.</p>
<p><img src="http://peterkellner.net/misc/sldebug6.jpg" /></p>
<p>&#160;</p>
<p>Now, do a Build/Rebuild all and the xaml files from your silverlight project as well as the ClientBin directory will be imported (copied) into your web services project.&#160; Here is what we have now.</p>
<p><img src="http://peterkellner.net/misc/sldebug7.jpg" /></p>
<p>Now, verify that your web service actually works by right mousing on the asmx file and pressing browse.&#160; If it&#8217;s working, you should be able to run it and get a screen something like this.</p>
<p><img src="http://peterkellner.net/misc/sldebug8.jpg" /></p>
<p>The next step is not what you are expecting.&#160; The quickstart says go ahead and create a web reference and run that.&#160; That&#8217;s great as long as you don&#8217;t want to run this project on a real server (port 80).&#160; Best I can tell, it hardwires the port to whatever the debugger is set to.&#160; I tried without much luck to change the property in the localhost control created but    <br />without much luck.&#160; I believe a better solution is to run the tool called slwsdl.exe which is part of the orcas distribution.&#160; essentially, you run it with the /SilverlightClient option and point it at your web service. for example, when I ran mine, the command was:</p>
<p><img src="http://peterkellner.net/misc/sldebug9.jpg" /></p>
<p>This created a file called WebService.cs which I put in my silverlight project.&#160; It becomes my proxy.&#160; The nice thing is I can modify the line that reaches out to the webservice to be whatever I want.&#160; By default it is the local server with the debug port set, but when I deploy to a real server I can change that address to the real name.&#160; Here is the code you    <br />change:</p>
<p><img src="http://peterkellner.net/misc/sldebuga.jpg" /></p>
<p>Finally, now you can debug.</p>
<p>Go to your SearchLight project and add some code to the Page.xaml.cs file.&#160; then, run the project from the webservice/testpage.html and vwala!&#160; You can debug.&#160; Here is proof (really, not bull).</p>
<p><img src="http://peterkellner.net/misc/sldebugb.jpg" /></p>
<h2>Final thoughts</h2>
<p>So, why go through all this trouble?&#160; It think I forgot to mention that it&#8217;s to avoid the dreaded Cross-Domain issue.&#160; That is, your Silverlight client can not call a webservice that is not in the same root domain and running on the same port as your silverlight app.&#160; Also, while I was writing this article to help others avoid some of the pain I&#8217;ve been through, I put a project    <br />together from scratch.&#160; A couple things I noticed along the way.</p>
<ul>
<li>When you copy xaml files from one project to another, you can no longer run them.&#160; You need to change their property from Silverlight Page to Embedded Property or the page can not be read in it&#8217;s codebehind. </li>
<li>It&#8217;s very important to go to debug/exceptions and turn on all exceptions, otherwise you will not know what is killing your app (see      <br />previous item). </li>
<li>It&#8217;s a cold cruel world out there on the bleeding edge. </li>
</ul>
<p>Good luck with your Silverlight development.&#160; There are lots of opportunities out there.&#160; Indeed, a target rich environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/06/18/silverlightdebugwebservicedotnet/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>My Interview on Channel 9 at MIX</title>
		<link>http://peterkellner.net/2007/05/14/my-interview-on-channel-9-at-mix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-interview-on-channel-9-at-mix</link>
		<comments>http://peterkellner.net/2007/05/14/my-interview-on-channel-9-at-mix/#comments</comments>
		<pubDate>Mon, 14 May 2007 16:40:37 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/05/14/my-interview-on-channel-9-at-mix/</guid>
		<description><![CDATA[Anand Iyers's Channel 9 Interview of me (Peter Kellner) and Elisa Johnson of the ADO.NET team at MIX07.]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.visitmix.com/">MIX07</a>, <a href="http://blogs.msdn.com/aniyer/archive/2007/05/09/mix-07-sound-bytes.aspx">Anand Iyer&#8217;s</a> (Microsoft Developer Evangelist) interviewed both myself and Elisa Johnson (Microsoft Program Manager on the Data Programmability team about the conference. Except for me having trouble remembering the new name of WPF/E (Silverlight), it was a lot of fun. Elisa talks about upcoming projects out of her group, and I talk about the <a href="http://mvp.support.microsoft.com/gp/mvpexecsum">MVP program</a> and a little about our upcoming <a href="http://www.siliconvalley-codecamp.com/">code camp</a> (end of October, Silicon Valley California).</p>
<p>The Podcast:&#160;&#160; <br /><a href="http://channel9.msdn.com/Showpost.aspx?postid=306463"> http://channel9.msdn.com/Showpost.aspx?postid=306463</a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/05/14/my-interview-on-channel-9-at-mix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XamlWebPad, View Your Raw Silverlight XAML without Blend or VS.</title>
		<link>http://peterkellner.net/2007/05/13/xamlwebpad/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=xamlwebpad</link>
		<comments>http://peterkellner.net/2007/05/13/xamlwebpad/#comments</comments>
		<pubDate>Sun, 13 May 2007 16:37:41 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2007/05/13/xamlwebpad/</guid>
		<description><![CDATA[<p>XamlWebPad is a free tool build by Peter Kellner that allows you to see your own Silverlight Xaml rendered.  Because
Blend does not give us an easy way to tell what tags are in the Silverlight WPF subset, this tool makes working with a
Xaml designer much easier.  The designer can now check there work before sending it back to a developer.</p>
<a href="http://peterkellner.net/">
<img src="http://peterkellner.net/wp/Images/misc/xamlwebpadt.jpg" alt="http://PeterKellner.net" class="style1" />
</a>]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="http://silverlight.net/Default.aspx">Silverlight</a>, is the new name for WPF/E which was formally introduced at the&#160; <a href="http://www.visitmix.com/">MIX07</a> conference in Las Vegas a couple weeks ago.&#160; Basically, it&#8217;s a stripped down version of full WPF Xaml that works on the web by installing a custom plug-in in them most popular browsers in a similar way to how flash works.&#160; The great thing about this technology is that it works cross platform.&#160; Mac&#8217;s, Linux, etc.&#160; The other major announcement at MIX07&#160; was that it supports programming in .NET.&#160; This means that Silverlight applications can be developed in c#, my favorite programming language.&#160; I&#8217;m not that great a JavaScript so this is great news for me because I want to be able to build highly interactive applications, and so far, with asp.net and little JavaScript, this has&#160; been very limiting for me personally. <span id="more-61"></span> </p>
<p><strike>For those not wanting to read on and just try it, here is the link:&#160; <a href="http://xamlwebpad.peterkellner.net/">http://xamlwebpad.peterkellner.net/</a></strike></p>
<p>There is another application that you might try:&#160; <a href="http://blogs.msdn.com/silverlight_sdk/archive/2007/05/13/Using-Silverlight-Pad-to-Test-XAML-Content.aspx">Silverlight Pad</a>(Updated 4/19/2008 Peter Kellner)</p>
<h2>My First Production Silverlight Project</h2>
<p>Fast forwarding to now, I&#8217;m currently building my first production Silverlight application.&#160; Believe it or not, my JavaScript skills are significantly better than my actual design skills.&#160; Fortunately, XAML allows me to more easily work with a professional designer who can provide me with Xaml.&#160; I&#8217;ve been very fortunate in this current project to be working with an outstanding designer, who like me, is just learning the new Silverlight platform.&#160; We are of course using the latest beta of   <br /><a href="http://www.microsoft.com/Expression/products/download.aspx?key=blend2maypreview">     <br />Blend</a> which is very helpful.&#160; There is a problem however.&#160; While the May Beta of Blend provides help in using the correct subset of xaml for Silverlight, it does not give you any errors if you import Xaml from other sources (such as Adobe Illustrator exports).&#160; This means, you feel like you have good Xaml but you really don&#8217;t.</p>
<h2>We are not in Kansas anymore</h2>
<p>So, how is this a problem?&#160; The problem shows up when the designer hands off code to the programmer (me in this case).&#160; The code doesn&#8217;t work and when I send it back to the designer, he has no good way of fixing it.&#160; Microsoft has acknowledged this as a problem and my guess is that in an upcoming release (beta or production) of Blend, they will have something that shows errors if you set your xaml to &quot;Silverlight Mode&quot;.&#160; for now though, what do do?</p>
<h2>XamlWebPad to the rescue</h2>
<p>In comes the new <a href="http://peterkellner.net">XamlWebPad (obsolete)</a>! Though you can suggest to the designer that he or she review the <a href="http://msdn2.microsoft.com/en-us/library/bb188567.aspx">Silverlight SDK</a> for what tags to use, you will likely not be very popular. It would be very painful to go tag by tag and figure out what works and what doesn&#8217;t.&#160; To make the designer&#8217;s life easier, I&#8217;ve created a simple web app using asp.net 2.0 and Silverlight that lets the designer cut and paste their code into a textbox and then press the &quot;Process    <br />XAML&quot; button and see how it will render.&#160; If there are errors, a MessageBox will pop up showing the errors (one at a time, sorry) with the tags that did not work.</p>
<h2>Is XamlWebPad Perfect or even done?</h2>
<p>Most certainly it&#8217;s not perfect, or even done (time permitting).&#160; I wrote it on a plane ride from Miami returning from my <a href="http://peterkellner.net/2007/05/10/vslive06gadgets/">Gadget Presentation at VSLive in Orlando</a> last week.&#160; One glaring hole is that it does not support showing images.&#160; <br />That is because you are only uploading your Xaml, not your images.&#160; If you really want to see an image, you can of course point your image to a remote source as I&#8217;ve pasted below.&#160; Then you will see it working but you will have to change it to a relative image in your final Xaml most likely.&#160; It&#8217;s not a very pretty app, but it does the job.&#160; Feel free to use it and certainly post suggestions to the comments of this blog post.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">canvas</span> <span class="attr">xmlns</span><span class="kwrd">="http://schemas.microsoft.com/client/2007"</span></pre>
<pre>    <span class="attr">xmlns:x</span><span class="kwrd">="http://schemas.microsoft.com/winfx/2006/xaml"</span></pre>
<pre class="alt">    <span class="attr">Width</span><span class="kwrd">="640"</span> <span class="attr">Height</span><span class="kwrd">="480"</span><span class="kwrd">&gt;</span></pre>
<pre>    <span class="kwrd">&lt;</span><span class="html">textblock</span> <span class="attr">Width</span><span class="kwrd">="253"</span> <span class="attr">Height</span><span class="kwrd">="72"</span> <span class="attr">Canvas</span>.<span class="attr">Left</span><span class="kwrd">="28"</span> <span class="attr">Canvas</span>.<span class="attr">Top</span><span class="kwrd">="81"</span> <span class="attr">Text</span><span class="kwrd">="TextBlock"</span></pre>
<pre class="alt">     <span class="attr">TextWrapping</span><span class="kwrd">="Wrap"</span><span class="kwrd">/&gt;</span></pre>
<pre>    <span class="kwrd">&lt;</span><span class="html">path</span> <span class="attr">Fill</span><span class="kwrd">="#FFFFFFFF"</span> <span class="attr">Stretch</span><span class="kwrd">="Fill"</span> <span class="attr">Stroke</span><span class="kwrd">="#FF000000"</span> <span class="attr">Width</span><span class="kwrd">="205.027"</span></pre>
<pre class="alt">     <span class="attr">Height</span><span class="kwrd">="52.03"</span> <span class="attr">Canvas</span>.<span class="attr">Left</span><span class="kwrd">="45.5"</span></pre>
<pre>       <span class="attr">Canvas</span>.<span class="attr">Top</span><span class="kwrd">="98.47"</span> <span class="attr">Data</span><span class="kwrd">="M46,150 C257,73 250,106 250,106"</span><span class="kwrd">/&gt;</span></pre>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">image</span> <span class="attr">Width</span><span class="kwrd">="100"</span> <span class="attr">Height</span><span class="kwrd">="100"</span></pre>
<pre>      <span class="attr">Source</span><span class="kwrd">="http://PetersBlogCDN.s3.amazonaws.com/wp/wp-content/themes/arzel_xt2/images/bearflag.jpg"</span></pre>
<pre class="alt">      <span class="attr">Stretch</span><span class="kwrd">="Fill"</span><span class="kwrd">/&gt;</span></pre>
<pre><span class="kwrd">&lt;/</span><span class="html">canvas</span><span class="kwrd">&gt;</span></pre>
</div>
<p>Feel free to use it as much as you want and good luck with your Silverlight projects.&#160; Look for my posts on the forums and I will of course be looking for yours.&#160; The crew at Silverlight asked me to be a moderator at the <a href="http://silverlight.net/forums/">Silverlight forums</a> I guess because they think because I&#8217;m a moderator on the <a href="http://forums.asp.net/">asp.net forums</a> I know what I&#8217;m doing.&#160; It&#8217;s a great place to get answers, and the more of us that use it, the more useful it will be.</p>
<p>There is another application that you might try:&#160; <a href="http://blogs.msdn.com/silverlight_sdk/archive/2007/05/13/Using-Silverlight-Pad-to-Test-XAML-Content.aspx">Silverlight Pad</a>(Updated 4/19/2008 Peter Kellner) Happy coding.</p>
<p><a href="http://peterkellner.net/"><br />
    <br /><img class="style1" alt="http://PeterKellner.net" src="http://peterkellner.net/wp/Images/misc/xamlwebpad.jpg" /></p>
<p></a></p>
<p>(Above is a screen shot of what the web page looks like.&#160; Click on it to be taken to the real deal)</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2007/05/13/xamlwebpad/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 34/48 queries in 0.015 seconds using disk: basic
Content Delivery Network via Amazon Web Services: S3: PetersBlogCDN.s3.amazonaws.com

Served from: peterkellner.net @ 2012-05-22 11:05:46 -->
