<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33103276</id><updated>2012-01-30T17:17:55.422-08:00</updated><category term='Threading'/><category term='xml'/><category term='silverlight 4'/><category term='transactionscope DTC'/><category term='linq'/><category term='MVVM'/><category term='Prism'/><category term='Silverlight 3 video'/><category term='WCF RIA'/><category term='RIA Data services silverlight'/><category term='tutorial'/><category term='RIA Data services'/><category term='WP7'/><category term='Azure'/><category term='silverlight custom control'/><category term='MIX 10'/><category term='t-sql wcf interconnect'/><category term='silverlight2  on-demand'/><category term='silverlight2'/><category term='MEF'/><category term='silverlight2 custom control'/><category term='richtextarea'/><category term='transactions'/><category term='WCF'/><category term='two-way data binding'/><category term='SQL Azure'/><category term='n-tier web app'/><category term='CommandButtonsVisibility'/><category term='wcf tutorial'/><category term='Silverlight 3'/><category term='Silverlight'/><title type='text'>Silverlight,LINQ , WCF, Prism , MEF and Windows 7 Phone Development</title><subtitle type='html'>The purpose of this blog is to share some of my experience in developing 'Rich web Apps" using ASP.NET, focusing on LINQ , WCF , Silverlight 3/4 and MEF</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default?start-index=101&amp;max-results=100'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>103</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33103276.post-6934412897807644848</id><published>2012-01-14T07:38:00.000-08:00</published><updated>2012-01-14T07:38:16.751-08:00</updated><title type='text'>Sencha</title><content type='html'>I have completed my first Sencha app and wrapped it with PhoneGap to create a Droid version of my new Traffic application. I am very pleased with the result as this is the ideal class of app to use with Sencha as the UI is mostly Google maps. Sencha gave me the tools to write in a MVC pattern with Javascript. This is the best part and PhoneGap was dead easy to generate the "native" app for the Droid once I found this plugin for &lt;a href="http://wiki.phonegap.com/w/page/34483744/PhoneGap%20Eclipse%20PlugIn%20for%20Android"&gt;Eclipse&lt;/a&gt; . &lt;br /&gt;&amp;nbsp;&amp;nbsp; I also have a Win8 Metro application that allows me to enter information on the web cameras into&lt;br /&gt;my Azure database. Once the info is in the Cloud any of my phone apps have access to it as I am using JSONP to call the Azure WCF service. my next step is to see the results on a real Droid phone that I just ordered and then publish the app. Next I will publish a series of videos on the whole experience&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6934412897807644848?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6934412897807644848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6934412897807644848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6934412897807644848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6934412897807644848'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2012/01/sencha.html' title='Sencha'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-7587832541150441054</id><published>2011-12-23T07:23:00.000-08:00</published><updated>2011-12-29T13:47:12.348-08:00</updated><title type='text'>Sencha Touch</title><content type='html'>I am starting to believe that it is time to look at tools for doing cross phone development and as such have started playing with Sencha Touch. They are lacking WP7 phone support at this time but I think they will soon have it and one must concede that the WP7 market is tiny anyways. My goal is to use Sencha or a tool like it to develop apps that run across most of phones and tablets and consume Azure services. So far I really like the Javascript based tools and their use of MVC, I think that combined with PhoneGap&amp;nbsp;&amp;nbsp;and KnockoutJS for MVVM and binding I can build apps that are robust enough for most applications. There will always be the demanding UX that will require truly native apps.&lt;br /&gt;&lt;br /&gt;So, should you build a mobile web app or a native one? If you're building an app that's graphically involved or involves any computationally expensive operations, go native for sure as the tools aren't quite there yet to make the job easy for mobile web apps. If you're building something fairly simple and you don't need any native styling or design polish, go the mobile web route. I think a great example is the first PhoneGap app on the WP7 which is Property Finder UK, it&amp;nbsp;has great looks and function however the giveaway that is not native is&amp;nbsp; the slow scrolling but overall this is minor given the functionality. The author can then move the same app to IOS , and Droids&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-7587832541150441054?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/7587832541150441054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=7587832541150441054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7587832541150441054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7587832541150441054'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/12/sencha-touch.html' title='Sencha Touch'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2022015436138226059</id><published>2011-12-23T07:02:00.000-08:00</published><updated>2011-12-23T07:13:12.746-08:00</updated><title type='text'>Phone as a Remote Control</title><content type='html'>I have always been interested in sockets programming as this was all we had years ago before things like WCF. Peter Kuhn has wriiten this amazing code that he discusses in this &lt;a href="http://paarc.codeplex.com/documentation"&gt;Article&lt;/a&gt;. The idea is to use the WP7 as a remote control for your desktop.&lt;br /&gt;&lt;br /&gt;In summary he has a beautifully architected solution that provides libraries for UDP and TCP. I really like the way that Peter has encorported things like :&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;IApplicationContext&amp;nbsp;to define services&lt;br /&gt;&lt;span style="color: black; font-family: Times New Roman; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-family: Consolas; font-size: x-small;"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: white;"&gt;As JeremyLikness of Wintellect says:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: white; font-size: small;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: white;"&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;“In my experience working with Silverlight applications,probably one of the most underused features I've witnessed is the ability toabstract application-level functionality using the &lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;IApplicationService&lt;/span&gt;&lt;/code&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;and &lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;IApplicationLifetimeAware&lt;/span&gt;&lt;/code&gt;&lt;span style="font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt; interfaces”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: #222222; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;&lt;span style="color: #990000;"&gt;Portable Libaries&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: #222222; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;&lt;span style="color: #990000;"&gt;&lt;span style="color: white;"&gt;allows you to target multiple platforms like Silverlight, Windows Phone and .NET with a single project and assembly. To support this, you need to install the &lt;/span&gt;&lt;a href="http://paarc.codeplex.com/wikipage?title=http%3a%2f%2fvisualstudiogallery.msdn.microsoft.com%2fb0e0b5e9-e138-410b-ad10-00cb3caf4981%2f&amp;amp;referringTitle=CompileSourceCode"&gt;&lt;span style="color: white;"&gt;Portable Library Tools&lt;/span&gt;&lt;/a&gt;&lt;span style="color: white;"&gt; provided by Microsoft, which is a Visual Studio add-in, and a one-time thing to install.&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: #222222; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;&lt;span style="color: #990000;"&gt;NLog for tracing&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: white; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;Developing a socket application is impossible with out a tracing as breakpoints often change the timing. Nlog provides a great framework including remoting messages to a common log endpoint.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: white;"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: white;"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: white; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;I did have some issues with his implemenation of a Navigatable ViewModel as I was experiencing VS 2010 crashes when I opened XAML. I was able to unwind this and evert to a Navigatable views and this seemed to fix the issue.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: white;"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="color: white; font-family: &amp;quot;Aparajita&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;"&gt;There is much to learn from this application and as such my hat is off to Peter!&lt;/span&gt;&lt;/div&gt;&lt;span style="color: black; font-family: Times New Roman; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: black; font-family: Times New Roman; font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://paarc.codeplex.com/documentation"&gt;http://paarc.codeplex.com/documentation&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2022015436138226059?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2022015436138226059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2022015436138226059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2022015436138226059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2022015436138226059'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/12/phone-as-remote-control.html' title='Phone as a Remote Control'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4978314502619017771</id><published>2011-12-23T06:17:00.000-08:00</published><updated>2011-12-23T06:17:37.626-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Azure WCF service using SQL Azure database</title><content type='html'>Just posted a video in 2 chapters on developing a Azure hosted WCF service that comsumes a SQL Azure database using Entity Framework. Finally I show a WP7 app that consumes an Azure WCF service. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/azureChapter1.wmv"&gt;Chapter1&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.silverclouddevelopment.com/videos/azureChapter2.wmv"&gt;Chapter2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4978314502619017771?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4978314502619017771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4978314502619017771' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4978314502619017771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4978314502619017771'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/12/azure-wcf-service-using-sql-azure.html' title='Azure WCF service using SQL Azure database'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3810724485883408370</id><published>2011-10-11T16:39:00.000-07:00</published><updated>2011-10-11T16:52:58.563-07:00</updated><title type='text'>IIS Application Pool Identity Accounts</title><content type='html'>This is mostly one of those notes to self, but when develops a WCF service that accesses a database then you make sure that the account the IIS process is running under has rights to the database. There are built in accounts for the appPools that your service is running in. eg if I assign my FOO app to ASP.NET v4.0 pool then there is a default account IIS APPPOOL\ASP.NET v4.0 that is created for us. This is the account that we need to add to User list in SQL Management Studio for the database that FOO is accessing e.g TrafficCams.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-s25fxCemZo4/TpTVuVU13FI/AAAAAAAAACg/zoVpTXlfNBs/s1600/addUser.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 273px; height: 400px;" src="http://1.bp.blogspot.com/-s25fxCemZo4/TpTVuVU13FI/AAAAAAAAACg/zoVpTXlfNBs/s400/addUser.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5662385623486815314" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For a more complete description &lt;a href="http://learn.iis.net/page.aspx/624/application-pool-identities/"&gt;see&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3810724485883408370?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3810724485883408370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3810724485883408370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3810724485883408370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3810724485883408370'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/10/iis-application-pool-identity-accounts.html' title='IIS Application Pool Identity Accounts'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-s25fxCemZo4/TpTVuVU13FI/AAAAAAAAACg/zoVpTXlfNBs/s72-c/addUser.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8214814786358055727</id><published>2011-10-10T14:20:00.000-07:00</published><updated>2011-10-10T14:21:38.562-07:00</updated><title type='text'>Entity Framework 4.1 Code First</title><content type='html'>I just installed and used Code First in my new project and love it. For an Object kind of person this is a great solution as when you are starting a new project we can work with objects and NOT tables as all u need to do is:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Country&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Id { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Name { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LongName { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Description { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;State&amp;gt; States{ get; set; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; State&lt;br /&gt;    {&lt;br /&gt;    &lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Id { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Name { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LongName { get; set; }&lt;br /&gt;&lt;span class="rem"&gt;//        public List&amp;lt;City&amp;gt; { get; set; }&lt;/span&gt;&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we deine a DBContext that looks like :&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CamAccess : DbContext&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;public&lt;/span&gt; DbSet&amp;lt;Country&amp;gt; Countrys { get; set; }&lt;br /&gt;            &lt;span class="kwrd"&gt;public&lt;/span&gt; DbSet&amp;lt;State&amp;gt; States { get; set; }&lt;br /&gt;            &lt;span class="kwrd"&gt;public&lt;/span&gt; DbSet&amp;lt;City&amp;gt; Citys { get; set; }&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;This is all we need to do and we when we write some Linq code to use Countrys as in:&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;Country&amp;gt; GetCountrys()&lt;br /&gt;        {&lt;br /&gt;            CamAccess camdc = &lt;span class="kwrd"&gt;new&lt;/span&gt; CamAccess();&lt;br /&gt;            Database.SetInitializer&amp;lt;CamAccess&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; CamaccessInitializer());&lt;br /&gt;            List&amp;lt;Country&amp;gt; countrys = camdc.Countrys.ToList();&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; countrys;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then we have the tables Country and States generated for us including the Foreign keys. This will look something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-r1r-H9-3-OU/TpNfNpm6UaI/AAAAAAAAACY/652OdcJzgDI/s1600/Tables.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 375px; height: 282px;" src="http://2.bp.blogspot.com/-r1r-H9-3-OU/TpNfNpm6UaI/AAAAAAAAACY/652OdcJzgDI/s400/Tables.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5661973844646842786" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Note the call to Database.SetInitializer as this is great as it lets us not only recreate the tables as the model changes but populate the tables with data as the class looks like:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CamaccessInitializer : DropCreateDatabaseIfModelChanges&amp;lt;CamAccess&amp;gt;&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Seed(CamAccess context)&lt;br /&gt;            {&lt;br /&gt;                Country c = &lt;span class="kwrd"&gt;new&lt;/span&gt; Country();&lt;br /&gt;                c.Name = &lt;span class="str"&gt;"USA"&lt;/span&gt;;&lt;br /&gt;                c.LongName = &lt;span class="str"&gt;"United States"&lt;/span&gt;;&lt;br /&gt;                context.Countrys.Add(c);&lt;br /&gt;                &lt;span class="kwrd"&gt;base&lt;/span&gt;.Seed(context);&lt;br /&gt;            }&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8214814786358055727?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8214814786358055727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8214814786358055727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8214814786358055727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8214814786358055727'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/10/entity-framework-41-code-first.html' title='Entity Framework 4.1 Code First'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-r1r-H9-3-OU/TpNfNpm6UaI/AAAAAAAAACY/652OdcJzgDI/s72-c/Tables.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4019098887399276812</id><published>2011-09-26T12:22:00.000-07:00</published><updated>2011-09-26T12:26:37.096-07:00</updated><title type='text'>Windows 8 Metro Blog</title><content type='html'>After all the excitement at Build,I have decided to start a new blog dedicated to Windows 8 Metro and if you wish please check out this &lt;a href="http://metrowindows8.blogspot.com"&gt;link&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4019098887399276812?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4019098887399276812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4019098887399276812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4019098887399276812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4019098887399276812'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/09/windows-8-metro-blog.html' title='Windows 8 Metro Blog'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4563457391488830626</id><published>2011-02-18T06:42:00.000-08:00</published><updated>2011-02-18T06:43:51.840-08:00</updated><title type='text'>Companion Video for Chapter 3 of WP7 Stock app development</title><content type='html'>Companion Video for Chapter 2 of WP7 Stock app development &lt;br /&gt;This video is a companion to the tutorial Chapter 2 on Silverlight show where we build a stock quote app for WP7.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter3/slplayer/default.html"&gt;SILVERLIGHT Player&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter3/slplayer/chapter3.wmv"&gt;WMV&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4563457391488830626?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4563457391488830626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4563457391488830626' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4563457391488830626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4563457391488830626'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/02/companion-video-for-chapter-3-of-wp7.html' title='Companion Video for Chapter 3 of WP7 Stock app development'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2598542289447022980</id><published>2011-02-16T08:48:00.000-08:00</published><updated>2011-02-16T08:52:52.701-08:00</updated><title type='text'>Companion video for Chapter 2 of WP7 Stock App for WP7</title><content type='html'>Companion Video for Chapter 2 of WP7 Stock app development &lt;br /&gt;This video is a companion to the tutorial Chapter 2 on Silverlight show where we build a stock quote app for WP7.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter2/slplayer/default.html"&gt;SILVERLIGHT Player&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter2/slplayer/chapter2.wmv"&gt;WMV&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2598542289447022980?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2598542289447022980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2598542289447022980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2598542289447022980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2598542289447022980'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/02/companion-video-for-chapter-2-of-wp7.html' title='Companion video for Chapter 2 of WP7 Stock App for WP7'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-289361192633736961</id><published>2011-02-16T08:42:00.000-08:00</published><updated>2011-02-16T08:48:22.724-08:00</updated><title type='text'>Companion Video for Chapter 1 of WP7 Stock app development</title><content type='html'>This video is a companion to the tutorial Chapter 1 on Silverlight show where we build a stock quote app for WP7.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter1/slplayer/default.html"&gt;SILVERLIGHT Player&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverclouddevelopment.com/videos/StocksQuoteApp/Chapter1/slplayer/chapter1.wmv"&gt;WMV&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-289361192633736961?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/289361192633736961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=289361192633736961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/289361192633736961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/289361192633736961'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2011/02/companion-video-for-chapter-1-of-wp7.html' title='Companion Video for Chapter 1 of WP7 Stock app development'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4163682651023216109</id><published>2010-10-05T12:04:00.000-07:00</published><updated>2010-10-05T12:12:50.304-07:00</updated><title type='text'>WP7 Stock Quoting Demo  Tutorial</title><content type='html'>I just posted a series of articles on the Silverlightshow web site that are pretty advanced topics for Silverlight development and some that are specific to the new phone.Some of the topics:&lt;br /&gt;1. Threading&lt;br /&gt;2. WebClient access&lt;br /&gt;3. MVVM light&lt;br /&gt;4. Thread communication using Messaging&lt;br /&gt;5. Isolated store&lt;br /&gt;6. Linq &lt;br /&gt;7. Behaviors&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.silverlightshow.net/items/WP7-Stock-Quoting-Demo-Series-Part1.aspx"&gt;Check it out&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4163682651023216109?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4163682651023216109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4163682651023216109' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4163682651023216109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4163682651023216109'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/10/wp7-stock-quoting-demo-tutorial.html' title='WP7 Stock Quoting Demo  Tutorial'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3060262124056935346</id><published>2010-08-26T08:45:00.000-07:00</published><updated>2010-08-26T08:46:56.720-07:00</updated><title type='text'>WP7 tutorials</title><content type='html'>There is a great series of videos on Windows 7 Phone developent available  &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/1207b118-ce35-4471-9822-6d2dba902ce6 "&gt;at&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3060262124056935346?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3060262124056935346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3060262124056935346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3060262124056935346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3060262124056935346'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/08/wp7-tutorials.html' title='WP7 tutorials'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4654873774122174154</id><published>2010-07-28T06:43:00.000-07:00</published><updated>2010-07-28T06:50:27.006-07:00</updated><title type='text'>Windows 7 Phone and MEF</title><content type='html'>Actually there is no MEF for the Phone which is a little disappointing but I always program to interfaces anyway so just remove the MEF attributes when moving a SL app to the phone and manually instantiated the interface. There are of course those who have made MEF work such as &lt;a href="http://www.damonpayne.com/2010/06/25/MEFForWindowsPhone7.aspx"&gt;Damon Payne's&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4654873774122174154?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4654873774122174154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4654873774122174154' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4654873774122174154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4654873774122174154'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/windows-7-phone-and-mef.html' title='Windows 7 Phone and MEF'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-451035337684219913</id><published>2010-07-27T09:39:00.000-07:00</published><updated>2010-07-29T05:55:33.036-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MEF'/><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight 4'/><title type='text'>using a MEF imported interface on a background thread in Silverlight</title><content type='html'>I ran into an issue of using an MEF imported interface on a background thread. My interface that I wanted to compose on the background thread is IStockInfo. I want it to be callable on a background thread . I hit a wall in trying create my catalog on the background thread so came up with this solution that worked for me:&lt;br /&gt;&lt;div style="BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f4f4f4;  PADDING-LEFT: 4px; WIDTH: 97.5%; PADDING-RIGHT: 4px; HEIGHT: 200px; FONT-SIZE: 6pt; OVERFLOW: auto; BORDER-TOP: gray 1px solid; CURSOR: text; BORDER-RIGHT: gray 1px solid; PADDING-TOP: 4px"&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Class1&lt;br /&gt;    {&lt;br /&gt;        Thread t = &lt;span class="kwrd"&gt;new&lt;/span&gt; Thread()&lt;br /&gt;        t.start();&lt;br /&gt;        [import]&lt;br /&gt;        IStockInfo TheModel { get; set; } &lt;span class="rem"&gt;//this interface is in a composible part&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; t (Dispatcher mainThread)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="rem"&gt;//on the UI thread use the Parts to create our catalog from all the assemblies&lt;/span&gt;&lt;br /&gt;            &lt;span class="rem"&gt;//and make the calling thread wait till we are done&lt;/span&gt;&lt;br /&gt;            mainThread.BeginInvoke(() =&amp;gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var assemblyPart &lt;span class="kwrd"&gt;in&lt;/span&gt; Deployment.Current.Parts)&lt;br /&gt;                {&lt;br /&gt;                    Stream stream = Application.GetResourceStream(&lt;span class="kwrd"&gt;new&lt;/span&gt; Uri AssemblyPart.Source, UriKind.Relative)).Stream;&lt;br /&gt;                    Assembly assembly = assemblyPart.Load(stream);&lt;br /&gt;                    cat.Catalogs.Add(&lt;span class="kwrd"&gt;new&lt;/span&gt; AssemblyCatalog(assembly));&lt;br /&gt;                }&lt;br /&gt;                m_autoResetEvent.Set(); &lt;span class="rem"&gt;//we are done&lt;/span&gt;&lt;br /&gt;            });&lt;br /&gt;            m_autoResetEvent.WaitOne(); &lt;span class="rem"&gt;//wait for the UI thread&lt;/span&gt;&lt;br /&gt;            container = &lt;span class="kwrd"&gt;new&lt;/span&gt; CompositionContainer(cat);&lt;br /&gt;            CompositionHost.Initialize(container);&lt;br /&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                CompositionInitializer.SatisfyImports(&lt;span class="kwrd"&gt;this&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception e)&lt;br /&gt;            {&lt;br /&gt;            }&lt;br /&gt;                theModel.GetSomeThing();&lt;br /&gt;            }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The issues were:&lt;br /&gt;1 could not do the CompositionInitializer.SatisfyImports(this) on the UI Thread and pass theModel to the background thread as this results in a cross thread issue&lt;br /&gt;2. so I came up with method where I have to call Deployment.Current.Parts on the UI thread thus the Dispatcher delegate, I used a autoResetEvent to synchronize the two threads (could have used UISync.Send or other methods)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-451035337684219913?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/451035337684219913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=451035337684219913' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/451035337684219913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/451035337684219913'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/using-mef-imported-interface-on.html' title='using a MEF imported interface on a background thread in Silverlight'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-7376441543943512741</id><published>2010-07-26T13:18:00.000-07:00</published><updated>2010-07-26T13:21:25.535-07:00</updated><title type='text'>HP Slate</title><content type='html'>Finally there is an answer to the wonderful IPAD from the MS world. This looks like an interesting device that will be appeal to business world as well as consumers.&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=Y9yz5YccwjE&amp;feature=channel"&gt;Video&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-7376441543943512741?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/7376441543943512741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=7376441543943512741' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7376441543943512741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7376441543943512741'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/hp-slate.html' title='HP Slate'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3572753788897752058</id><published>2010-07-20T07:47:00.000-07:00</published><updated>2010-07-20T07:56:03.136-07:00</updated><title type='text'>Silverlight 3 and ValidationScope</title><content type='html'>if you are still stuck on Silverlight 3 as some of our projects are then most of the input controls take advantage of the Silverlight 3 Validation that depends on exceptions being thrown in Setter method in the domain object when a binding occurs. The exeception will result in Silverlight displaying the familar red box around the UI element. However this only solves part of the problem as the user can click on a some action button like Save without entering anything in the required input fields and of course the validation being setter based is not called. ValidationScope can help out here Josh Twist has a great blog posting  &lt;a href="http://www.thejoyofcode.com/Silverlight_Validation_and_MVVM_Part_II.aspx"&gt;at&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3572753788897752058?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3572753788897752058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3572753788897752058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3572753788897752058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3572753788897752058'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/silverlight-3-and-validationscope.html' title='Silverlight 3 and ValidationScope'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2557652712227079733</id><published>2010-07-15T10:58:00.000-07:00</published><updated>2010-07-28T11:42:58.708-07:00</updated><title type='text'>Silverlight 4 Commanding made simpler</title><content type='html'>Commanding in Silverlight 4 is a nice new feature if you are into MVVM and seems everyone and their dog is these days. However there is quite a lot of work in setting up the plumbing. John Papa helps reduce this effort in this very helpful &lt;a href="http://johnpapa.net/silverlight/5-simple-steps-to-commanding-in-silverlight/"&gt;blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As a result I can now write code that looks like:&lt;br /&gt;&lt;div style="BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f4f4f4;  PADDING-LEFT: 4px; WIDTH: 97.5%; PADDING-RIGHT: 4px; HEIGHT: 200px; FONT-SIZE: 8pt; OVERFLOW: auto; BORDER-TOP: gray 1px solid; CURSOR: text; BORDER-RIGHT: gray 1px solid; PADDING-TOP: 4px"&gt;&lt;br /&gt; &lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Class2&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; ICommand LoadFOOCommand { get; set; }&lt;br /&gt;        &lt;span class="kwrd"&gt;void&lt;/span&gt; PhoneVM()&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;new&lt;/span&gt; DelegateCommand(LoadFOO, CanFoo);&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadFOO(&lt;span class="kwrd"&gt;object&lt;/span&gt; param)&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; CanFoo(&lt;span class="kwrd"&gt;object&lt;/span&gt; param)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2557652712227079733?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2557652712227079733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2557652712227079733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2557652712227079733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2557652712227079733'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/silverlight-4-commanding-made-simpler.html' title='Silverlight 4 Commanding made simpler'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6833615336597563667</id><published>2010-07-15T05:56:00.000-07:00</published><updated>2010-07-15T06:01:34.322-07:00</updated><title type='text'>Great Silverlight Book</title><content type='html'>I really like &lt;strong&gt;Pro Silverlight 3 in C#&lt;/strong&gt; by Matthew MacDonald. This has great material for the novice and experienced developer. He has great examples and loved his FlipPanel control that so cleverly uses Storyboards and PlaneProjections.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6833615336597563667?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6833615336597563667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6833615336597563667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6833615336597563667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6833615336597563667'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/great-silverlight-book.html' title='Great Silverlight Book'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1460194959927367088</id><published>2010-07-15T04:01:00.000-07:00</published><updated>2010-07-29T04:30:42.097-07:00</updated><title type='text'>DataTemplate and Commanding</title><content type='html'>I have been quiet the last few months as I have been absorbed in a wonderful SilverLight project in the financial sector. However I am near the end and have&lt;br /&gt;some free cycles. I am also working of a Windows 7 phone app and will share a few things that apply to Silverlight in general.&lt;br /&gt;&lt;br /&gt;The first is working with SL4 Commanding and MVVM in a DataTemplated UI.Here is my template:&lt;br /&gt;&lt;div style="BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #f4f4f4;  PADDING-LEFT: 4px; WIDTH: 97.5%; PADDING-RIGHT: 4px; HEIGHT: 200px; FONT-SIZE: 8pt; OVERFLOW: auto; BORDER-TOP: gray 1px solid; CURSOR: text; BORDER-RIGHT: gray 1px solid; PADDING-TOP: 4px"&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;     local:StockServiceVM x:Key="vm"&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt; &lt;span class="attr"&gt;x:Key&lt;/span&gt;&lt;span class="kwrd"&gt;="QuoteTemplate"&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;="QuoteContainer"&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;="Vertical"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="290"&lt;/span&gt; &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="Gray"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt; &lt;span class="attr"&gt;Orientation&lt;/span&gt;&lt;span class="kwrd"&gt;="Horizontal"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path= Symbol, Mode=OneWay}"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="70"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="78"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Time}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;TextBlock&lt;/span&gt; &lt;span class="attr"&gt;Foreground&lt;/span&gt;&lt;span class="kwrd"&gt;="White"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="80"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Volume}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="this"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="attr"&gt;HorizontalContentAlignment&lt;/span&gt;&lt;span class="kwrd"&gt;="Right"&lt;/span&gt; &lt;span class="attr"&gt;Content&lt;/span&gt;&lt;span class="kwrd"&gt;="+"&lt;/span&gt; &lt;br /&gt;             &lt;span class="attr"&gt;Command&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=ExpandCommand,Source={StaticResource vm}}"&lt;/span&gt;&lt;br /&gt;                  &lt;span class="attr"&gt;CommandParameter&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding ElementName= this}"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;StackPanel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;DataTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;UserControl.Resources&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I am using Commanding to fire the Button click event into my viewmodel and notice the use of the Source property in the Binding definition:&lt;br /&gt; &lt;strong&gt;Command="{Binding Path=ExpandCommand,Source={StaticResource vm}}" &lt;/strong&gt;                 &lt;br /&gt;&lt;br /&gt; If this is omitted my Binding did not work and thus my ViewModel never received the event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1460194959927367088?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1460194959927367088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1460194959927367088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1460194959927367088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1460194959927367088'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/07/datatemplate-and-commanding.html' title='DataTemplate and Commanding'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8455168017672565934</id><published>2010-03-18T14:07:00.000-07:00</published><updated>2010-03-18T16:21:15.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MIX 10'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Mix 10</title><content type='html'>all I can say is "it is great to be a Silverlight developer" especially after MIX. Now this was my first MIX and I must say probably the best conference I have ever attended. The content was wonderful and of course is online as they record all the sessions. As a result u ask why attend, well it the human networking that is so great as they had events like "meet the expert"s. here we were able to discuss problems and direction with MS people like Glenn brock and jesse Liberty. That alone was worth the price! &lt;br /&gt;&lt;br /&gt;The star of the show was Silverlight as the sessions were packed including Laurent's MVVM talk. Then of course the bombshell and that was SL for the Windows 7 Phone. &lt;br /&gt;&lt;br /&gt;We are now phone developers! I know MS is late to the game with a polished product but this one looks great and the only bad news there will be no hardware till the end of the year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8455168017672565934?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8455168017672565934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8455168017672565934' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8455168017672565934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8455168017672565934'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/mix-10.html' title='Mix 10'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2226749342240921432</id><published>2010-03-10T09:51:00.000-08:00</published><updated>2010-03-10T09:56:05.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVVM'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight 4'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF RIA'/><title type='text'>Chapter 7 MVVM and Silverlight Business template</title><content type='html'>added chapter 7 on MVVM using WCF RIA , you will find it &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 7 - MVVM with SL Business template.pdf"&gt;at&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2226749342240921432?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2226749342240921432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2226749342240921432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2226749342240921432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2226749342240921432'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/chapter-7-mvvm-and-silverlight-business.html' title='Chapter 7 MVVM and Silverlight Business template'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4835021746392909768</id><published>2010-03-03T06:47:00.000-08:00</published><updated>2010-03-03T09:13:00.200-08:00</updated><title type='text'>More Chapters</title><content type='html'>Just uploaded Object Hierarchy Chapter 4  Word format click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter4 - Object Hierarchy.docx"&gt;here&lt;/a&gt; , PDF click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter4 - Object Hierarchy.pdf"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Chapter 5 POCO Word format click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 5-POCO .docx"&gt;here&lt;/a&gt; , PDF click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 5-POCO .pdf"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Chapter 6 Shared code and Authentication  Word format click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 6  Shared code and Authentication.docx"&gt;here&lt;/a&gt; , PDF click &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 6  Shared code and Authentication.pdf"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4835021746392909768?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4835021746392909768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4835021746392909768' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4835021746392909768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4835021746392909768'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/chapter-4-object-hierachy.html' title='More Chapters'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4851911186668588178</id><published>2010-03-02T15:48:00.000-08:00</published><updated>2010-09-18T09:45:10.453-07:00</updated><title type='text'>outlook like demo application</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_0G3oaIbPNvw/S42mLJRkCjI/AAAAAAAAAA8/cmtgxsqv9VY/s1600-h/outlook1.PNG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 320px; FLOAT: left; HEIGHT: 147px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5444190234959153714" border="0" alt="" src="http://4.bp.blogspot.com/_0G3oaIbPNvw/S42mLJRkCjI/AAAAAAAAAA8/cmtgxsqv9VY/s320/outlook1.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;this silverlight 3 demo app is a mock up of Outlook complete with a working contacts panel and scheduler. Points of interest:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;1. the schedule view is active just type into any line in the itemsControl or click on one of the time slot button (Radios in disguise). &lt;/div&gt;&lt;br /&gt;&lt;div&gt;1.a the dialogs can be moved by clicking and dragging to right of Scheduling Tab as it has a Translation matrix around it&lt;/div&gt;&lt;br /&gt;&lt;div&gt;1.b the Scheduling tab is just for show&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;2. Contacts view show a list of contacts that I made up&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;It would be easy to make this operational and that is on my list but now I am just using it to show that Silverlight is great for building business apps.&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.silverclouddevelopment.com/gallery/SchedulerV3/SchedulerTestPage.html"&gt;Click here to view&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4851911186668588178?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4851911186668588178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4851911186668588178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4851911186668588178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4851911186668588178'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/outlook-like-demo-application.html' title='outlook like demo application'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_0G3oaIbPNvw/S42mLJRkCjI/AAAAAAAAAA8/cmtgxsqv9VY/s72-c/outlook1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5636524750170183627</id><published>2010-03-02T10:54:00.000-08:00</published><updated>2010-03-02T11:00:33.197-08:00</updated><title type='text'>chapter 3 Change Tracking and Validation</title><content type='html'>Just added chapter 3 on Change Tracking and Validation the PDF is available &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 3 - Change tracking  and Validation.pdf"&gt;at&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I also made the DOCX available so just change the extension to get the word format so this one is http://www.silverclouddevelopment.com/mydocs/Chapter 3 - Change tracking  and Validation.docx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5636524750170183627?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5636524750170183627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5636524750170183627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5636524750170183627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5636524750170183627'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/chapter-3-change-tracking-and.html' title='chapter 3 Change Tracking and Validation'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3604746588566472683</id><published>2010-03-01T09:31:00.001-08:00</published><updated>2010-03-01T09:38:14.791-08:00</updated><title type='text'>SilverLight communications chapter 2</title><content type='html'>Just posted a draft of Chapter 2 of my series on SilverLight communications and architecture available &lt;a href="http://www.silverclouddevelopment.com/mydocs/Chapter 2 - WCF RIA SL BUS APP start .pdf"&gt;at&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3604746588566472683?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3604746588566472683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3604746588566472683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3604746588566472683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3604746588566472683'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/silverlight-communications-chapter-2.html' title='SilverLight communications chapter 2'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-604142461690384604</id><published>2010-03-01T09:21:00.000-08:00</published><updated>2010-03-01T09:30:31.010-08:00</updated><title type='text'>Vs2010 Release Candidate and Silverlight 4</title><content type='html'>Beware if u install the release candidate for VS2010 there is no support for Silverlight 4 and WCF RIA. I missed this on the installation site I was using and paid a painful price. It took me a day to rebuild Beta 2 and even then I had problems as there was an extraneous .NET 4 folder with a version number &gt;  v4.0.21006 created and left behind by RC1. This resulted in the following error when I tried generating a WCF RIA project:&lt;br /&gt;&lt;br /&gt;  The "GenerateResource" task failed unexpectedly.&lt;br /&gt;&lt;br /&gt;  System.DllNotFoundException: Unable to load DLL 'FileTracker.dll': &lt;br /&gt;&lt;br /&gt;removing the directory solved the issue but what a pain!&lt;br /&gt;&lt;br /&gt;Luckily I had the old ISO for Beta 2 still on my hard drive but if I had not I think I would have been in the state where I could not go back to Beta 2 as I cannot find the install anywhere on the Internet. Seems you made have to wait for the Silverlight team to sync up with RC1 before starting to look at Silverlight 4.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-604142461690384604?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/604142461690384604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=604142461690384604' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/604142461690384604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/604142461690384604'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/03/vs2010-release-candidate-and.html' title='Vs2010 Release Candidate and Silverlight 4'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2834873522411961741</id><published>2010-02-28T08:03:00.000-08:00</published><updated>2010-03-02T11:12:37.795-08:00</updated><title type='text'>new demo application</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_0G3oaIbPNvw/S41i0s0zPlI/AAAAAAAAAA0/cOhgl-o7uzA/s1600-h/demo.PNG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 320px; FLOAT: left; HEIGHT: 163px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5444116182086139474" border="0" alt="" src="http://1.bp.blogspot.com/_0G3oaIbPNvw/S41i0s0zPlI/AAAAAAAAAA0/cOhgl-o7uzA/s320/demo.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;This is the latest in a series of demo applications that I hope will show off some of the UX capabilities of Silverlight. This is a little photo viewer with a Thumbnail scroll bar at the bottom it also employs a magnifier that I shamelessly borrowed from one of Jeff Prosises MSDN articles.&lt;br /&gt;&lt;br /&gt;You can view that album &lt;a href="http://silverclouddevelopment.com/album1/start.html"&gt;at&lt;/a&gt; (takes about a minute to load)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2834873522411961741?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2834873522411961741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2834873522411961741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2834873522411961741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2834873522411961741'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/02/new-demo-application.html' title='new demo application'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_0G3oaIbPNvw/S41i0s0zPlI/AAAAAAAAAA0/cOhgl-o7uzA/s72-c/demo.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3340327944594187924</id><published>2010-02-28T07:33:00.000-08:00</published><updated>2010-02-28T07:44:56.855-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RIA Data services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>New series on articles on Silverlight communications and architecture</title><content type='html'>In my &lt;a href="http://www.sandkeysoftware.com/Silverlight/ArticleNavigator/ArticleNavigator.Web/start.html"&gt;Silverlight videos &lt;/a&gt;I tried to show why Silverlight is a great platform for developing business applications. In these videos I stressed that it is a combination of great User Experience and architecture that produces a marketable software product. Now I am delivering a series of articles on communications and architectural patterns that will help you deliver these products. Silverlight as a client technology that usually runs in the context of a browser is dependent on data from a server. Now Silverlight has a rich set of communications protocols including raw sockets and web services that can be used to get data from services such as Twitter and Digg. However, this series of articles is going to concentrate on obtaining data from Windows servers where we have the Windows Communication Foundation (WCF) at our disposal. This series of articles will primarily concentrate on WCF RIA services but as a starting point I am going to build a basic WCF service to lay some groundwork. In later chapters I will look at architectural patterns such as Model-View-View-Model(MVVM) ,Prism and MEF and how these can be used with WCF RIA to produce architecturally sound business applications.&lt;br /&gt;Much of this will duplicate and replace my earlier articles on the same subjects as it is updated fro VS2010 and WCF RIA. I hope you enjoy and can provide feedback as I want to make these into videos at a later stage.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://silverclouddevelopment.com/mydocs/Chapter%201%20-WCF.pdf"&gt;Article one&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3340327944594187924?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3340327944594187924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3340327944594187924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3340327944594187924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3340327944594187924'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/02/new-series-on-articles-on-silverlight.html' title='New series on articles on Silverlight communications and architecture'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8620645495145985040</id><published>2010-02-24T09:53:00.000-08:00</published><updated>2010-09-18T09:43:36.001-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight custom control'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight 4'/><category scheme='http://www.blogger.com/atom/ns#' term='richtextarea'/><title type='text'>My first Silverlight Control</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_0G3oaIbPNvw/S4VrEvGwstI/AAAAAAAAAAs/MumcTarjtZw/s1600-h/Capture.PNG"&gt;&lt;img style="MARGIN: 0px 10px 10px 0px; WIDTH: 320px; FLOAT: left; HEIGHT: 84px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5441873453855584978" border="0" alt="" src="http://2.bp.blogspot.com/_0G3oaIbPNvw/S4VrEvGwstI/AAAAAAAAAAs/MumcTarjtZw/s320/Capture.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;I just finished my first Silverlight control that tries to replicate what the wonderful Cynergy team has done at http://www.cynergysystems.com/whoweare/management.jsp. These guys do some really cool UX work which I admire but most seems to be in Flash. I am trying to reproduce these UXs in Silverlight. Now mine requires Silverlight 4 as I am using the new RichtextArea but if you have it please check out my version (.5) &lt;a href="http://www.silverclouddevelopment.com/gallery/skviewer/SKToolbarTestPage.html"&gt;at&lt;/a&gt; . Just mouseover an image and it will expand and show a detail window&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;My code is using Translation and Scaling transforms to achieve the desired UX behavior. the control is driven thru XML that will define the contents of each of the images and the associated description.I also am developing a little editor that will produce the XML visually but this is still real rough.Please tell me what you think! I will probably make the control available at a later stage.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8620645495145985040?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8620645495145985040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8620645495145985040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8620645495145985040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8620645495145985040'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/02/my-first-silverlight-control.html' title='My first Silverlight Control'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0G3oaIbPNvw/S4VrEvGwstI/AAAAAAAAAAs/MumcTarjtZw/s72-c/Capture.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1960957644324233871</id><published>2010-01-18T09:03:00.000-08:00</published><updated>2010-01-18T09:07:02.786-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CommandButtonsVisibility'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>setting CommandButtonsVisibility in XAML</title><content type='html'>I was wondering if it was possible to set CommandButtonsVisibility in XAML to anything other then All or none and came across this great solution from david Poll of MS as I believe that our code needs to be Blendable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;"This actually already exists today -- in XAML, the standard, built-in syntax for flags enums is Value="Flag1, Flag2, Flag3" (this would translate to Flag1|Flag2|Flag3).&lt;br /&gt; As a result, you can feel free to do things like CommandButtonsVisibility="Navigation, Cancel, Commit, Add" in XAML to get the desired effect."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1960957644324233871?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1960957644324233871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1960957644324233871' title='35 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1960957644324233871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1960957644324233871'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/01/setting-commandbuttonsvisibility-in.html' title='setting CommandButtonsVisibility in XAML'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6129326765018107218</id><published>2010-01-08T08:16:00.000-08:00</published><updated>2010-01-08T08:24:58.645-08:00</updated><title type='text'>Winhost ..looks like good ISP</title><content type='html'>I just started looking at new ISP as i thought my old one is getting pricing. Winhost looks really good as not only do they have great pricing but good management tools. I am even able to run a WCF Trace from their server which to me is a real plus. check them out at www.winhost.com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6129326765018107218?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6129326765018107218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6129326765018107218' title='141 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6129326765018107218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6129326765018107218'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/01/winhost-looks-like-good-isp.html' title='Winhost ..looks like good ISP'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>141</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3294730863945827001</id><published>2010-01-02T09:35:00.000-08:00</published><updated>2010-01-02T09:39:32.890-08:00</updated><title type='text'></title><content type='html'>Just ran into an ugly problem with VS2010 beta 2 as it would not open and the only message was "Application cannot start". This very informative message was a little distressing as I figured only a reinstall could resolve this but the solution is to do the following:&lt;br /&gt;&lt;br /&gt;devenv /resetuser&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3294730863945827001?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3294730863945827001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3294730863945827001' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3294730863945827001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3294730863945827001'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2010/01/just-ran-into-ugly-problem-with-vs2010.html' title=''/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5646997140111920705</id><published>2009-12-29T12:43:00.000-08:00</published><updated>2010-01-30T12:02:53.070-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight 3 video'/><title type='text'>series of videos on Silverlight for business Apps</title><content type='html'>I just started working on a series of videos on Silverlight for business Apps, the first one is an overview that builds the case for using Silverlight for business app. It is still under development but feel free to give me feedback on the content.&lt;br /&gt;look on my &lt;a href="http://www.sandkeysoftware.com/Silverlight/ArticleNavigator/ArticleNavigator.Web/start.html"&gt;SL site  &lt;/a&gt;and then  click on Silverlight business in the Coverflow and u will see 4 videos Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5646997140111920705?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5646997140111920705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5646997140111920705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5646997140111920705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5646997140111920705'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/series-of-videos-on-silverlight-for.html' title='series of videos on Silverlight for business Apps'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4530109815317919927</id><published>2009-12-22T08:41:00.000-08:00</published><updated>2010-03-22T11:54:00.342-07:00</updated><title type='text'>ValidateXAML task failed</title><content type='html'>I ran into this issue with the web cam project that mentioned earlier that uses a third party DLL called fjcore.dll. You will see an exception such as follows:&lt;br /&gt;&lt;br /&gt;The "ValidateXaml" task failed unexpectedly.&lt;br /&gt;System.IO.FileLoadException: Could not load file or assembly 'file:///C:\temp\EdgeCamShots\3rdParty\FJCore\FJ.Core.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&lt;br /&gt;File name: 'file:///C:\temp\EdgeCamShots\3rdParty\FJCore\FJ.Core.dll' ---&gt; System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous&lt;br /&gt;versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.&lt;br /&gt;&lt;br /&gt;This is a change to .Net 4 in handling unsigned DLL and one easy solution is to add the following line to your devenv.exe.config file found at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. of course for a less global change this can be placed into your app.config file . make sure you are running the editing program such as Notepad in admin mode&lt;br /&gt;&lt;br /&gt;&amp;lt;runtime&amp;gt;&lt;br /&gt;&amp;lt;loadFromRemoteSources enabled="true" /&amp;gt;&lt;br /&gt;&amp;lt;runtime&amp;gt;&lt;br /&gt;&lt;br /&gt;For more details &lt;a href="http://social.msdn.microsoft.com/Forums/en/webdevelopmentprerelease/thread/ea9b9cab-cbfd-496d-8a81-7b3dd06e8c23"&gt;see &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4530109815317919927?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4530109815317919927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4530109815317919927' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4530109815317919927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4530109815317919927'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/validatexaml-task-failed.html' title='ValidateXAML task failed'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4539523341011390715</id><published>2009-12-22T08:08:00.000-08:00</published><updated>2009-12-22T08:41:42.736-08:00</updated><title type='text'>silverlight tools</title><content type='html'>there are a few must tools if you are serious about SL development especially WCF issues on a shared server (ISP):&lt;br /&gt;&lt;br /&gt;Fiddler which is invaluable in debugging server side exceptions that are masked by SL and show up as 404 (most annoying) but this will let you see the real problem. it is available &lt;a href="http://www.fiddler2.com/fiddler2/"&gt;at&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;optionally Web Development Helper gives you much of the same but integrates right into the brower. It is available &lt;a href="http://projects.nikhilk.net/WebDevHelper"&gt;at&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally the cadillac is Silverlight Spy as it provides detailed runtime inspection of any Silverlight application. It lets you explore the XAP package, Isolated Storage, monitor performance, browse the UI visual and logical tree, examine objects, execute code in the DLR shell and more. It is not free but is a great tool available &lt;a href="http://silverlightspy.com/silverlightspy/introduction/"&gt;at&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4539523341011390715?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4539523341011390715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4539523341011390715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4539523341011390715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4539523341011390715'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/silverlight-tools.html' title='silverlight tools'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5636696781810166465</id><published>2009-12-22T07:29:00.000-08:00</published><updated>2009-12-22T07:47:55.230-08:00</updated><title type='text'>Great Silverlight 4 tutorial on drag/drop and web cam capture</title><content type='html'>This great tutorial by David Rousset  will introduce some of the new Silverlight 4 features in order to enhance the default “Silverlight Business Template” that comes with WCF RIA Services. It then shows how to modify the server &amp;amp; the client parts in order to let you add an avatar (profile’s picture) during the login process. This picture will come either from the disk, via drag’n’drop or via the Webcam. the webcam capture and drag /drop are SL 4 specific. this is really cool stuff and is a reason I am so high on the SL platform for line of business applications as Microsoft is adding so much power.&lt;br /&gt;click &lt;a href="http://msdnrss.thecoderblogs.com/2009/12/18/silverlight-4-tutorial-adding-avatar-support-to-the-wcf-ria-services-business-template"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5636696781810166465?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5636696781810166465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5636696781810166465' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5636696781810166465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5636696781810166465'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/great-silverlight-4-tutorial-on.html' title='Great Silverlight 4 tutorial on drag/drop and web cam capture'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3720650804599914736</id><published>2009-12-18T09:07:00.000-08:00</published><updated>2009-12-18T09:14:11.797-08:00</updated><title type='text'>WCF Ria seting Services Link</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_0G3oaIbPNvw/Syu4IZwPmQI/AAAAAAAAAAM/2fTv2ukQLEI/s1600-h/ria.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 226px;" src="http://2.bp.blogspot.com/_0G3oaIbPNvw/Syu4IZwPmQI/AAAAAAAAAAM/2fTv2ukQLEI/s320/ria.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5416625431334852866" /&gt;&lt;/a&gt;&lt;br /&gt;By default Dev Studio will put your generated foo.g.cs file into your foo.web project.If you want to control the location open properties on the foo.web project and under the Silverlight tab you will see the .Net RIA Services link and just point it to the location you want&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3720650804599914736?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3720650804599914736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3720650804599914736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3720650804599914736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3720650804599914736'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/wcf-ria-seting-services-link.html' title='WCF Ria seting Services Link'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_0G3oaIbPNvw/Syu4IZwPmQI/AAAAAAAAAAM/2fTv2ukQLEI/s72-c/ria.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3645266693916379241</id><published>2009-12-17T09:42:00.000-08:00</published><updated>2009-12-17T09:43:34.525-08:00</updated><title type='text'>breakpoint not working</title><content type='html'>this is real annoying problem as the serror states that there are no debug symbols loaded but there are clearly pdb files. There are a few things to try:&lt;br /&gt;&lt;br /&gt;Try the following steps:&lt;br /&gt;1) Right click your Web project to go to the Property page. Select Silverlight Application Tab (last one). If you already have a Silverlight link listed there, remove it first. Click Add button to add Silverlight link, make sure you select "Enable Silverlight Debugging" check box.&lt;br /&gt;2) Set your Web project as start up project. Your SilverlightTestPage.html as your start up page. &lt;br /&gt;3) Set a break piont at App.xaml.cs Application_Startup function.  Hit f5 to start debug.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3645266693916379241?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3645266693916379241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3645266693916379241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3645266693916379241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3645266693916379241'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/breakpoint-not-working.html' title='breakpoint not working'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8737891470420244682</id><published>2009-12-16T09:52:00.000-08:00</published><updated>2009-12-16T10:02:48.588-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Azure'/><title type='text'>SQL Azure</title><content type='html'>I am using SQL Azure to host a couple of databases and am most impressed but there are couple of little things to watch for and do not miss the Firewall tab on the Server administration page as u must tell SQL Azure the Ip addresses that it will allow calls from such as in my case my development machine and my ISP where I host the calling app. Also the SQL azure migration tool is great, check out http://sqlazuremw.codeplex.com/. Then the lastest version of the SQL management studio gives u most of the capabilities of your local version. SQL Server Management Studio R2 CTP is available at http://blogs.msdn.com/ssds/archive/2009/11/11/9921041.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8737891470420244682?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8737891470420244682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8737891470420244682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8737891470420244682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8737891470420244682'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/sql-azure.html' title='SQL Azure'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3721622411350071061</id><published>2009-12-16T09:43:00.000-08:00</published><updated>2010-01-08T08:16:40.889-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RIA Data services silverlight'/><title type='text'>more WCF RIA Woes</title><content type='html'>opps my problems are back as i am again getting 404 and this time I use fiddler and see the following details in addition to the 404 and somtimes a 500:&lt;br /&gt;&lt;br /&gt;now my code in WizardRIA-Web-GreenDomainService.svc.cs is:&lt;br /&gt;&lt;br /&gt;protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)&lt;br /&gt;{&lt;br /&gt;         &lt;br /&gt;          return new DomainServiceHost(serviceType, new Uri("http://www.sandkeysoftware.com/WizardRIA.web/Services/WizardRIA-Web-GreenDomainService.svc"));&lt;br /&gt;      }&lt;br /&gt;Now this code will solve the multi-header issue as I am on a shared host but I was still getting 500 and Fiddler showed me that the exception was Activation error and NO MORE info when I my code issued the svc call:&lt;br /&gt;&lt;br /&gt;http://silverclouddevelopment.com//WizardRIA.web/ClientBin/WizardRIA-Web-GreenDomainService.svc&lt;br /&gt;&lt;br /&gt;the key to solving this issue is just type this address into explorer and it will either show u they error which in my case was having multiple IIS  authentications turned on. As soon as I changed it to basic only that I was running. The normal response looks something like this:&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_0G3oaIbPNvw/S0dZ5RNwfHI/AAAAAAAAAAk/bFpZcz79spE/s1600-h/wsdl.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 620px; height: 151px;" src="http://3.bp.blogspot.com/_0G3oaIbPNvw/S0dZ5RNwfHI/AAAAAAAAAAk/bFpZcz79spE/s320/wsdl.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5424403116599573618" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3721622411350071061?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3721622411350071061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3721622411350071061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3721622411350071061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3721622411350071061'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/more-wcf-ria-woes.html' title='more WCF RIA Woes'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_0G3oaIbPNvw/S0dZ5RNwfHI/AAAAAAAAAAk/bFpZcz79spE/s72-c/wsdl.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2907223401899975322</id><published>2009-12-04T08:31:00.000-08:00</published><updated>2009-12-04T08:56:33.607-08:00</updated><title type='text'>ISP battle with WCF RIA</title><content type='html'>As expected the deployment process was changing to say the least as it is hard to get any trace or logging info from the ISP. I kept running into 404 issues dispite following the instructions pointed to in the previous post. Finally I changed the&lt;br /&gt;WizardRIA-Web-GreenDomainService.svc to &lt;br /&gt;&lt;br /&gt;&amp;lt;%@ ServiceHost Service="WizardRIA.Web.GreenDomainService" CodeBehind="WizardRIA-Web-GreenDomainService.svc.cs"    Factory="System.Web.Ria.DomainServiceHostFactoryEx" %&amp;gt;&lt;br /&gt;&lt;br /&gt;and the WizardRIA-Web-GreenDomainService.svc.cs to &lt;br /&gt;&lt;br /&gt; protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)&lt;br /&gt;{&lt;br /&gt;         &lt;br /&gt;       return new DomainServiceHost(serviceType, baseAddresses[0]);&lt;br /&gt;}&lt;br /&gt;and I thank Jeff Barnes of Microsoft for this idea as he had the same issue with DiscountASP. this could also have been "http://www.sandkeysoftware.com/WizardRIA.web/Services/WizardRIA-Web-GreenDomainService.svc instead of the baseAddresses[0].&lt;br /&gt;&lt;br /&gt;I was still running into 404 so I directly entered the http://sandkeysoftware.com/WizardRIA.Web/WizardRIA-Web-GreenDomainService.svc into my browser and got:&lt;br /&gt;&lt;br /&gt;IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous.&lt;br /&gt;Change the IIS settings so that only a single authentication scheme is used.&lt;br /&gt;&lt;br /&gt;I then had Discount disable Basic Authentication on the WizardRIA.Web application, so only Anonymous is enabled and things worked!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2907223401899975322?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2907223401899975322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2907223401899975322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2907223401899975322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2907223401899975322'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/12/isp-battle-with-wcf-ria.html' title='ISP battle with WCF RIA'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6933320887567591881</id><published>2009-11-30T17:07:00.000-08:00</published><updated>2009-11-30T17:29:00.853-08:00</updated><title type='text'>wcf ria and IIS</title><content type='html'>I just ran into a nasty problem as i converted my .Net Ria app to WCF Ria services. Now the key word here is WCF as we must now deal with WCF issues which really complicate things but in the end will give Ria more power. My app ran fine on my local machine when I was using the VS development webserver but when I switched to IIS I got a 404 error on&lt;br /&gt;&lt;br /&gt;http://www.sandkeysoftware.com/WizardRIA.web/ClientBin/WizardRIA-Web-GreenDomainService.svc/binary&lt;br /&gt;&lt;br /&gt;Now SL will mask all none 200 HTTP return codes as a 404 so the trick is to get it to return the real error so I tried enabling WCF tracing but there was no trace produced. I finally came across this blog that shows it is a problem many are having as this is Beta code &lt;a href="http://forums.silverlight.net/forums/p/144989/323349.aspx"&gt;http://forums.silverlight.net/forums/p/144989/323349.aspx &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;as a result Wilco published the following:&lt;br /&gt;&lt;a href="http://forums.silverlight.net/forums/p/146135/325334.aspx"&gt;http://forums.silverlight.net/forums/p/146135/325334.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;one of the recommendation was to insure that WCF activation is on as IIS will need to not only recognize the mime type (another issue) but Just in Time (JIT) the server compoment that we need for this call. For more details see:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/blambert/pages/enable-iis.aspx"&gt;http://blogs.msdn.com/blambert/pages/enable-iis.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;now this worked in the case of my local IIS but I now need to do battle with my ISP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6933320887567591881?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6933320887567591881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6933320887567591881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6933320887567591881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6933320887567591881'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/11/wcf-ria-and-iis.html' title='wcf ria and IIS'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4026584985661135601</id><published>2009-11-28T07:20:00.000-08:00</published><updated>2009-11-28T07:32:52.164-08:00</updated><title type='text'>Silverlight logging</title><content type='html'>I had to add logging to my project and ran across a good and easy solution &lt;a href="http://kodierer.blogspot.com/2009/05/silverlight-logging-extension-method.html"&gt;at&lt;/a&gt; . This is much easier solution then then &lt;a href="http://www.codeproject.com/KB/silverlight/SilverlightLogging.aspx?df=100&amp;amp;forumid=907929&amp;amp;exp=0"&gt;CLOG  &lt;/a&gt;  by Daniel Vaughan. Now I really like what Daniel has done but I was not looking for a framework but might come back to it. Rene solution serves my needs at this point as it a clever extension method to object that relies on the the Console built into IE8 or Firefox. I should also mention that Devforce offers logging , please check out &lt;a href="http://www.ideablade.com/DevForceSilverlight/DevForceAndRIAservices.aspx"&gt;this&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4026584985661135601?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4026584985661135601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4026584985661135601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4026584985661135601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4026584985661135601'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/11/silverlight-logging.html' title='Silverlight logging'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2471030154104546548</id><published>2009-11-28T06:58:00.000-08:00</published><updated>2009-11-28T07:18:01.001-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RIA Data services'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight 3'/><category scheme='http://www.blogger.com/atom/ns#' term='Prism'/><title type='text'>Prism</title><content type='html'>&lt;div&gt;I have not blogged in a long time as I have been consumed with a new project that originally started with just using MVVM but have progressed into using Prism. Now this is a framework that really excites me for as you know I am a big fan already of using Silverlight 3 (and now 4) for developing rich web applications. Now combine this power with Prism and you have a great enterprise solution that can be used to deliver web apps that will be around for years. I am working on a document that I placed on my web site. Please check it out and tell me what you think:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://www.sandkeysoftware.com/prism/Developing%20a%20wizard%20application%20with%20Silverlight%203.pdf"&gt;http://www.sandkeysoftware.com/prism/Developing%20a%20wizard%20application%20with%20Silverlight%203.pdf&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2471030154104546548?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2471030154104546548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2471030154104546548' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2471030154104546548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2471030154104546548'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/11/prism.html' title='Prism'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4328788421074727667</id><published>2009-07-14T10:30:00.000-07:00</published><updated>2009-07-14T10:37:38.721-07:00</updated><title type='text'>c# Design patterns</title><content type='html'>design patterns are key to any modern software projects such as adapter, facade etc. There are wonderful books on the market such as the Gang of Four's classic and of course Head First Design patterns available from Reilly &lt;a href="http://oreilly.com/catalog/9780596007126"&gt;at&lt;/a&gt; .However these books are written for a Java audience but here is great site that is C# orientated &lt;a href="http://www.dofactory.com/Patterns/Patterns.aspx"&gt;click here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4328788421074727667?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4328788421074727667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4328788421074727667' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4328788421074727667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4328788421074727667'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/07/c-design-patterns.html' title='c# Design patterns'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8578115030520999105</id><published>2009-07-02T16:29:00.000-07:00</published><updated>2009-07-14T10:29:59.670-07:00</updated><title type='text'>Silverlight 3 Article Navigator</title><content type='html'>Just put the first version of my SL navigator that uses a Coverflow to show that list of PDFs and notes that I have submitted to my blog. Also makes heavy use of the Vectorlight Richtext control (thanks). It requires SL 3 but has been released (July 12). &lt;a href="http://www.sandkeysoftware.com/Silverlight/ArticleNavigator/ArticleNavigator.Web/ArticleNavigatorTestPage.html"&gt;check it out&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8578115030520999105?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8578115030520999105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8578115030520999105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8578115030520999105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8578115030520999105'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/07/silverlight-3-article-navigator.html' title='Silverlight 3 Article Navigator'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3055138612483632180</id><published>2009-06-24T09:26:00.000-07:00</published><updated>2009-06-24T09:32:30.931-07:00</updated><title type='text'>VectorLight Controls for Silverlight</title><content type='html'>&lt;a href="http://www.vectorlight.net/"&gt;vectorlight &lt;/a&gt; offers an amazing array of high quality controls. I have been using the their RichText and am very impressed especailly since the price is right, free for now. It makes me wonder why anyone would pay the extra for Telerik or ComponentOne. Many of their controls are in the Toolkit or are  available free.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3055138612483632180?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3055138612483632180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3055138612483632180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3055138612483632180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3055138612483632180'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/vectorlight-controls-for-silverlight.html' title='VectorLight Controls for Silverlight'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-308192497069456877</id><published>2009-06-22T13:42:00.000-07:00</published><updated>2009-06-22T13:47:57.094-07:00</updated><title type='text'>silverlight Coverflow</title><content type='html'>Just found a great Coverflow for Silverlight that can be used royality free,the demo is very cool, so click &lt;a href="http://silverlightcoverflow.codeplex.com/"&gt;here  &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-308192497069456877?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/308192497069456877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=308192497069456877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/308192497069456877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/308192497069456877'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/silverlight-coverflow.html' title='silverlight Coverflow'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-7108457557844245149</id><published>2009-06-10T07:04:00.000-07:00</published><updated>2009-06-10T07:09:31.557-07:00</updated><title type='text'>RIA Data services Chapter 3</title><content type='html'>Chapter 3 looks at populating a Datagrid and Dataform using an object hierarchy and investigates the impressive change management for the child objects in the form.&lt;br /&gt;click &lt;a href="http://www.sandkeysoftware.com/ria/RiaChapter3.pdf"&gt;here &lt;/a&gt;for PDF and here for the &lt;a href="http://www.sandkeysoftware.com/ria/RIAObjectHierachy.zip"&gt;code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-7108457557844245149?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/7108457557844245149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=7108457557844245149' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7108457557844245149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7108457557844245149'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/ria-data-services-chapter-3.html' title='RIA Data services Chapter 3'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6435436188018757728</id><published>2009-06-08T05:41:00.000-07:00</published><updated>2009-06-08T05:49:27.486-07:00</updated><title type='text'>Ria data services Chapter 2 (Objects Only)</title><content type='html'>chapter 2 &lt;strong&gt;(Look Mom no database)&lt;/strong&gt; will show that the .NET RIA Services focus on the end-to-end use of data, it may be retrieved through a Data Access Layer (DAL) of your choice include POCO as this &lt;a href="http://www.sandkeysoftware.com/ria/RiaChapter2.pdf"&gt;PDF&lt;/a&gt; and &lt;a href="http://www.sandkeysoftware.com/ria/XMLRepository.zip"&gt;code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6435436188018757728?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6435436188018757728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6435436188018757728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6435436188018757728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6435436188018757728'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/ria-data-services-chapter-2.html' title='Ria data services Chapter 2 (Objects Only)'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5484530736574561285</id><published>2009-06-08T04:42:00.000-07:00</published><updated>2009-06-08T05:00:42.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RIA Data services silverlight'/><title type='text'>RIA Data services</title><content type='html'>I have been playing around with RIA Data Services for a while and must say this is pretty cool stuff as it makes writting multi-tier apps so easy. I am writing a series of articles :&lt;br /&gt;1. Introduction to RIA Data services that you download the PDF &lt;a href="http://www.sandkeysoftware.com/ria/RIA%20Data%20Services.pdf"&gt;here &lt;/a&gt;&lt;br /&gt;or &lt;a href="http://www.sandkeysoftware.com/ria/simple.zip"&gt;code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5484530736574561285?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5484530736574561285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5484530736574561285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5484530736574561285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5484530736574561285'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/ria-data-services.html' title='RIA Data services'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3476442719104078997</id><published>2009-06-02T11:30:00.000-07:00</published><updated>2009-06-02T11:34:12.970-07:00</updated><title type='text'>Silverlight Host Page QueryString</title><content type='html'>One of the things you will want to do at some point is get access to the query string parameters passed to the page hosting your Silverlight application. &lt;br /&gt;&lt;br /&gt;private void Application_Startup(object sender, StartupEventArgs e)&lt;br /&gt;       {&lt;br /&gt;            string test;&lt;br /&gt;            if (HtmlPage.Document.QueryString.Count &gt; 0)&lt;br /&gt;                test = HtmlPage.Document.QueryString["fid"] ;&lt;br /&gt;            this.RootVisual = new Page();&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3476442719104078997?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3476442719104078997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3476442719104078997' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3476442719104078997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3476442719104078997'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/06/silverlight-host-page-querystring.html' title='Silverlight Host Page QueryString'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-252239466664383588</id><published>2009-05-28T11:51:00.000-07:00</published><updated>2009-05-28T12:14:30.037-07:00</updated><title type='text'>WCF Tips</title><content type='html'>&lt;strong&gt;Default Serialization&lt;/strong&gt;&lt;br /&gt;.NET 3.5 SP1 has introduced a new kink: if you don't decorate your class at all (omit / not add the [DataContract] attribute) then the object becomes "fully" serializable by WCF. All public properties will be automatically included. &lt;br /&gt;so the serialzation of&lt;br /&gt;[DataContract]&lt;br /&gt;class foo&lt;br /&gt;{&lt;br /&gt;     [DataMember]&lt;br /&gt;     public string test;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;is the same as as :&lt;br /&gt;&lt;br /&gt;class foo&lt;br /&gt;{&lt;br /&gt;      public string test;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;2. &lt;strong&gt;Visibility&lt;/strong&gt;&lt;br /&gt;Similar to service contracts, the visibility of the data members or the data contract itself is of no consequence to WCF. You can include internal types with private data members in the data contract:&lt;br /&gt;&lt;br /&gt;[DataContract]&lt;br /&gt;struct Contact&lt;br /&gt;{&lt;br /&gt;   [DataMember]&lt;br /&gt;   string m_FirstName;&lt;br /&gt;&lt;br /&gt;   [DataMember]&lt;br /&gt;   string m_LastName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;3 &lt;strong&gt;deserializing event&lt;/strong&gt;&lt;br /&gt;Since no constructor calls are ever made during deserialization, the deserializing event-handling method is logically your deserialization constructor. It is intended for performing some custom pre-deserialization steps typically in a constructor.&lt;br /&gt;&lt;br /&gt;for more details see http://codeidol.com/csharp/wcf/Data-Contracts/Data-Contract-Attributes/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-252239466664383588?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/252239466664383588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=252239466664383588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/252239466664383588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/252239466664383588'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/05/wcf-tips.html' title='WCF Tips'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5094571561099471367</id><published>2009-03-10T16:40:00.000-07:00</published><updated>2009-03-11T15:47:08.925-07:00</updated><title type='text'>Building a WCF self Hosted service for Silverlight and WPF access</title><content type='html'>It is easy to build a WCF service that is callable from WPF by just defining an endpoint (1) below that uses net.tcp as we are interested in perfomance as in:&lt;br /&gt;&lt;br /&gt;&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; HEIGHT: 200px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;br /&gt;&amp;lt;system.serviceModel&amp;gt;&lt;br /&gt;&amp;lt;services&amp;gt;&lt;br /&gt;&amp;lt;service behaviorConfiguration="CustomersServer.Service1Behavior"&lt;br /&gt;name="CustomersServer.Service1"&amp;gt;&lt;br /&gt;(1) &amp;lt;endpoint address="" binding="netTcpBinding" contract="CustomersServer.IGetCustomers"&amp;gt;&lt;br /&gt;&amp;lt;/endpoint&amp;gt;&lt;br /&gt;&amp;lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&amp;gt;&lt;br /&gt;&amp;lt;host&amp;gt;&lt;br /&gt;&amp;lt;baseAddresses&amp;gt;&lt;br /&gt;&amp;lt;add baseAddress="net.tcp://localhost:8000" /&amp;gt;&lt;br /&gt;&amp;lt;add baseAddress="http://localhost:8002" /&amp;gt;&lt;br /&gt;&amp;lt;/baseAddresses&amp;gt;&lt;br /&gt;&amp;lt;/host&amp;gt;&lt;br /&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&amp;lt;/services&amp;gt;&lt;br /&gt;&amp;lt;behaviors&amp;gt;&lt;br /&gt;&amp;lt;serviceBehaviors&amp;gt;&lt;br /&gt;&amp;lt;behavior name="CustomersServer.Service1Behavior"&amp;gt;&lt;br /&gt;&amp;lt;serviceMetadata httpGetEnabled="true"/&amp;gt;&lt;br /&gt;&amp;lt;serviceDebug includeExceptionDetailInFaults="true" /&amp;gt;&lt;br /&gt;&amp;lt;/behavior&amp;gt;&lt;br /&gt;&amp;lt;/serviceBehaviors&amp;gt;&lt;br /&gt;&amp;lt;/behaviors&amp;gt;&lt;br /&gt;&amp;lt;/system.serviceModel&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is easily callable from my WPF application by adding a Service reference for&lt;br /&gt;CustomersServer.IGetCustomers (net.tcp://localhost:8000) and adding code like:&lt;br /&gt;&lt;strong&gt;GetCustomers.GetCustomersClient proxy = new WpfApplication1 .GetCustomers.GetCustomersClient();&lt;br /&gt;//bind customer objects to DataGrid&lt;br /&gt;toolkitGrid.ItemsSource = proxy.GetCustomers("a"); &lt;/strong&gt;&lt;br /&gt;One can then easily add a basic HTTP endpoint and this should be callable from our Silverlight app. However there is a big problem with the Cross Domain Policy file that SL needs to find at the root of the web server (opps ..What web server as we are self&lt;br /&gt;hosted). I struggled with this till I found the following article:&lt;br /&gt;&lt;a href="http://http//blogs.msdn.com/carlosfigueira/archive/2008/03/07/enabling-cross-domain-calls-for-silverlight-apps-on-self-hosted-web-services.aspx"&gt;http://http://blogs.msdn.com/carlosfigueira/archive/2008/03/07/enabling-cross-domain-calls-for-silverlight-apps-on-self-hosted-web-services.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Briefly this technique involves adding a &lt;strong&gt;WebHttpBinding&lt;/strong&gt; endpoint that was added with 3.5 (usually used for Restful services). This will let us satisfy the HTTP GET for the clientaccesspolicy.xml that SL will issue. I ended up progammatically adding the endpoints for the BasicHttpBinding and WebHttpBinding as I was having issues with the declarative app,config. this looks like:&lt;br /&gt;&lt;br /&gt; &lt;strong&gt;  host.AddServiceEndpoint(typeof(IGetCustomers), new BasicHttpBinding(), "basic");&lt;br /&gt;   host.AddServiceEndpoint(typeof(IPolicyRetriever), new WebHttpBinding(), "").Behaviors.Add(new WebHttpBehavior());&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;this code and the above config file will result in 4 endpoints:&lt;br /&gt;1 net.tcp://localhost:8000  &lt;br /&gt;2 http://localhost:8002/mex      metadata discovery&lt;br /&gt;3 http://localhost:8002/basic    SL usable&lt;br /&gt;4 http://localhost:8002           HTTP GET for clientaccesspolicy  &lt;br /&gt;&lt;br /&gt;For completeness my service contract looks like:&lt;br /&gt;&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; HEIGHT: 200px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;br /&gt;[ServiceContract]&lt;br /&gt;    public interface IGetCustomers&lt;br /&gt;    {&lt;br /&gt;        [OperationContract]&lt;br /&gt;        List&lt;CustomersServer.Model.DTO.Customer&gt; GetCustomers(string startsWith);&lt;br /&gt;    }&lt;br /&gt;    [ServiceContract]&lt;br /&gt;    public interface IPolicyRetriever&lt;br /&gt;    {&lt;br /&gt;        [OperationContract, WebGet(&lt;strong&gt;UriTemplate = "/clientaccesspolicy.xml")]&lt;/strong&gt;&lt;br /&gt;        Stream GetSilverlightPolicy();&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;    public class Service1 : IGetCustomers, IPolicyRetriever&lt;br /&gt;   {&lt;br /&gt; public Stream GetSilverlightPolicy()&lt;br /&gt;        {&lt;br /&gt;            string result = &amp;lt;?xml version=""1.0"" encoding=""utf-8""?&amp;gt;&lt;br /&gt;&amp;lt;access-policy&amp;gt;&lt;br /&gt;    &amp;lt;cross-domain-access&amp;gt;&lt;br /&gt;        &amp;lt;policy&amp;gt;&lt;br /&gt;            &amp;lt;allow-from http-request-headers=""*""&amp;gt;&lt;br /&gt;                &amp;lt;domain uri=""*""/&amp;gt;&lt;br /&gt;            &amp;lt;/allow-from&amp;gt;&lt;br /&gt;            &amp;lt;grant-to&amp;gt;&lt;br /&gt;                &amp;lt;resource path=""/"" include-subpaths=""true""/&amp;gt;&lt;br /&gt;            &amp;lt;/grant-to&amp;gt;&lt;br /&gt;        &amp;lt;/policy&amp;gt;&lt;br /&gt;    &amp;lt;/cross-domain-access&amp;gt;&lt;br /&gt;&amp;lt;/access-policy&amp;gt;";&lt;br /&gt;            return StringToStream(result);&lt;br /&gt;        }&lt;br /&gt;        Stream StringToStream(string result)&lt;br /&gt;        {&lt;br /&gt;            WebOperationContext.Current.OutgoingResponse.ContentType = "application/xml";&lt;br /&gt;            return new MemoryStream(Encoding.UTF8.GetBytes(result));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5094571561099471367?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5094571561099471367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5094571561099471367' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5094571561099471367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5094571561099471367'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/03/building-wcf-self-hosted-service-for.html' title='Building a WCF self Hosted service for Silverlight and WPF access'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-7790547610526134433</id><published>2009-02-04T11:35:00.000-08:00</published><updated>2009-02-04T11:55:18.484-08:00</updated><title type='text'>Contains in Linq to Entitys</title><content type='html'>Linq to entities(LtoE) does not support “contains” as in the following Linq to Sql query:&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;&lt;br /&gt;var subquery = from product in MySandbox.Products&lt;br /&gt;                           where product.Supplier.City.StartsWith("M")&lt;br /&gt;                           select product.CategoryID;&lt;br /&gt;&lt;br /&gt;var query = from category in MySandbox.Categories&lt;br /&gt;                        where&lt;br /&gt;                          category.CategoryName.Contains("y")&lt;br /&gt;                          &amp;&amp; subquery.Contains(category.CategoryID)&lt;br /&gt;                        select category;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;the code will actually compile but throws a runtime error on the Contains. However the code can be rewritten to use &lt;strong&gt;Any:&lt;/strong&gt;&lt;br /&gt;var query = from category in MySandbox.Categories&lt;br /&gt;                        where&lt;br /&gt;                          category.CategoryName.Contains("y")&lt;br /&gt;                          &amp;&amp; subquery.Any(i =&gt; i == category.CategoryID)&lt;br /&gt;                        select category;&lt;br /&gt;&lt;br /&gt;There is a larger issue with “contains” and code that looks like:&lt;br /&gt;&lt;strong&gt;  List&lt;int&gt; ints = new List&lt;int&gt; { 5, 6 };&lt;br /&gt;  var query2 = MySandbox.Categories.Where(e =&gt; ints.Contains(e.CategoryID));&lt;/strong&gt;&lt;br /&gt;This compiles but a runtime exception is thrown:&lt;br /&gt;   LINQ to Entities does not recognize the method 'Boolean Contains(Int32)' method, and this method cannot be translated into a store expression.&lt;br /&gt;&lt;br /&gt;However there is an interesting solution at http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/095745fe-dcf0-4142-b684-b7e4a1ab59f0/&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public static class QueryableExtensions&lt;br /&gt;    {&lt;br /&gt;        private static Expression&amp;lt;Func&amp;lt;TElement, bool&amp;gt;&amp;gt; GetWhereInExpression&amp;lt;TElement, TValue&amp;gt;(Expression&amp;lt;Func&amp;lt;TElement, TValue&amp;lt;&amp;lt; propertySelector, IEnumerable&amp;ltTValue&amp;gt values)&lt;br /&gt;        {&lt;br /&gt;            ParameterExpression p = propertySelector.Parameters.Single();&lt;br /&gt;            if (!values.Any())&lt;br /&gt;                return e =&gt; false;&lt;br /&gt;&lt;br /&gt;            var equals = values.Select(value =&gt; (Expression)Expression.Equal(propertySelector.Body, Expression.Constant(value, typeof(TValue))));&lt;br /&gt;            var body = equals.Aggregate&amp;lt;Expression&amp;gt;((accumulate, equal) =&gt; Expression.Or(accumulate, equal));&lt;br /&gt;&lt;br /&gt;            return Expression.Lambda&amp;lt;Func&amp;lt;TElement, bool&amp;gt;&amp;gt;(body, p);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        ///   &lt;br /&gt;        /// Return the element that the specified property's value is contained in the specifiec values  &lt;br /&gt;          public static IQueryable&amp;lt;TElemen&amp;gt; WhereIn&amp;lt;TElement, TValue&amp;gt;(this IQueryable&amp;lt;TElement&amp;gt; source, Expression&amp;lt;Func&amp;lt;TElement, TValu&amp;gt;&amp;gt; propertySelector, params TValue[] values)&lt;br /&gt;        {&lt;br /&gt;            return source.Where(GetWhereInExpression(propertySelector, values));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        ///   &lt;br /&gt;        /// Return the element that the specified property's value is contained in the specifiec values  &lt;br /&gt;               public static IQueryable&amp;lt;TElement&amp;gt WhereIn&amp;lt;TElement, TValue&amp;gt(this IQueryable&amp;lt;TElement&amp;gt; source, Expression&amp;lt;Func&amp;lt;TElement, TValue&amp;gt;&amp;gt; propertySelector, IEnumerable&amp;lt;TValue&amp;gt values)&lt;br /&gt;        {&lt;br /&gt;            return source.Where(GetWhereInExpression(propertySelector, values));&lt;br /&gt;        }&lt;br /&gt;    }  &lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-7790547610526134433?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/7790547610526134433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=7790547610526134433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7790547610526134433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/7790547610526134433'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/02/contains-in-linq-to-entitys.html' title='Contains in Linq to Entitys'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3989881656939958346</id><published>2009-02-04T11:17:00.000-08:00</published><updated>2009-02-04T11:31:28.528-08:00</updated><title type='text'>Linq to Entitys vs Linq to SQL  Lazy loading</title><content type='html'>Recently was asked to look at Linq to Entitys(LtoE) vs Linq to SQL. Linq to Entitys (LtoE) is an entirely different beast from Linq to SQL although they share Linq for language base query. LtoE sits on top of the ADO.NET Entity Framework (see http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx) &lt;br /&gt;&lt;br /&gt;When you use Linq to SQL to create an object model from a database schema, you are consuming the database schema and immediately creating classes that represent that schema. This is partially offset in that FK relationships can allow the automatic hydrated of related tables into “contained” objects in the parent. However the Entity Framework provides a layer of abstraction above the database : you define a conceptual object model, you define the database schema in XML, and then you create a logical mapping between your conceptual object model and the database schema. Using this model, you are extremely well insulated from database changes. Most database changes can be absorbed by the schema and mapping without requiring a change to the object model - making it so you don't need to refactor and rebuild a bunch of objects that you're using throughout your application. This has the potential to be huge as we raise our thinking and design to the conceptual level and think in terms of business entities and not  tables.&lt;br /&gt;&lt;br /&gt;Here are few areas where there where differences:&lt;br /&gt;&lt;strong&gt;Deferred or lazy Loading&lt;/strong&gt;&lt;br /&gt;LINQ to SQL automatically supports this The team behind EF didn't want this *automatic* behavior happening. The reason behind this decision is simple: When architecting a larger project, it is highly important for developers to clearly understand when they are accessing certain resources, such as the database. Consider the following where there is 1:N relationship between Serviceaddr and mailaddr thru a FK relationship:&lt;br /&gt;&lt;br /&gt;  serviceaddr m = dc.serviceaddr.Where(s =&gt; s.ServiceAddrKey == 288031).FirstOrDefault();&lt;br /&gt;  int num = m.mailingaddr.Count();  //num is equal to number of related mailaddr&lt;br /&gt;&lt;br /&gt;however in EF the result is 0 and one has to:&lt;br /&gt;&lt;br /&gt; serviceaddr m = dc.serviceaddr.Include("mailingaddr").Where(s =&gt; s.ServiceAddrKey  == 288031).FirstOrDefault();&lt;br /&gt; int num = m.mailingaddr.Count();&lt;br /&gt;i must say that it kind of sucks that there is no type safe way to specify the Include as I could easily misspell mailingaddr.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for a good discussion  see http://www.singingeels.com/Articles/Entity_Framework_and_Lazy_Loading.aspx&lt;br /&gt;&lt;br /&gt;of course this can be an advantage as it pointed out in loading part of the object graph as we might not want all the FK relationship realized in the hydration of the parent object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3989881656939958346?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3989881656939958346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3989881656939958346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3989881656939958346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3989881656939958346'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/02/linq-to-entitys-vs-linq-to-sql-lazy.html' title='Linq to Entitys vs Linq to SQL  Lazy loading'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8826716907563701394</id><published>2009-02-04T10:50:00.000-08:00</published><updated>2009-02-04T11:11:20.110-08:00</updated><title type='text'>The answer to the readerQuotas exception thrown in previous example</title><content type='html'>The previous post showed how to use Web Developer Helper to identify why an exception was being thrown. The answer was nasty as it involves configuring &lt;strong&gt;readerQuotas&lt;/strong&gt; which seems to be size of the buffer used in XML serialization. there seems to be a max of 8192 on this which seems pretty silly but anyways I added the following binding definition to my web.config&lt;br /&gt;&lt;br /&gt;&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; HEIGHT: 200px; BACKGROUND-COLOR: #f4f4f4"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;basichttpbinding&amp;gt;&lt;br /&gt;&amp;lt;binding name="basicHttpBinding" receivetimeout="00:10:00" sendtimeout="00:10:00" bypassproxyonlocal="false" hostnamecomparisonmode="StrongWildcard" maxbuffersize="2147483647" maxbufferpoolsize="524288" maxreceivedmessagesize="2147483647" messageencoding="Text" textencoding="utf-8" transfermode="Buffered" usedefaultwebproxy="true" closetimeout="00:10:00" opentimeout="00:10:00"&gt;&lt;br /&gt;&lt;&lt;strong&gt;readerQuotas&lt;/strong&gt; maxDepth="32"&lt;br /&gt;maxStringContentLength="2147483647"&lt;br /&gt;maxArrayLength="2147483647"&lt;br /&gt;maxBytesPerRead="4096"&lt;br /&gt;maxNameTableCharCount="4096" /&amp;gt;&lt;br /&gt;&amp;lt;/binding&amp;gt;&lt;br /&gt;&amp;lt;/basichttpbinding&gt;&amp;gt;&lt;/div&gt;&lt;br /&gt;then i use it in the following:&lt;br /&gt;&lt;br /&gt;&amp;lt;endpoint contract="SchedulerV4.Web.ISchedulerServices" binding="basicHttpBinding" address="" bindingconfiguration="basicHttpBinding"&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8826716907563701394?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8826716907563701394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8826716907563701394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8826716907563701394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8826716907563701394'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/02/anaswer-to-exception-thrown-in.html' title='The answer to the readerQuotas exception thrown in previous example'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1468905584014909128</id><published>2009-01-28T10:14:00.000-08:00</published><updated>2009-01-28T10:21:38.705-08:00</updated><title type='text'>exception debugging in silverlight</title><content type='html'>the invaluable tool in cases where wcf methods are throwing on a web site is &lt;span style="font-weight: bold;"&gt;Web Developer helper or fiddler&lt;/span&gt;. if an exception is thrown WCF does not send much info on the wire even when one enables&lt;br /&gt;&lt;servicedebug includeexceptiondetailinfaults="true"&gt;&lt;br /&gt; I recently was trying to return a hunk of XML in my WCF service and was mystified as to why my method was failing till I looked at the &lt;span style="font-weight: bold;"&gt;response Content&lt;/span&gt; in Developer helper's log Viewer. Then the problem was visible:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;s:envelope s="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;s:body&gt;&lt;s:fault&gt;&lt;faultcode a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher"&gt;a:DeserializationFailed&lt;/faultcode&gt;&lt;faultstring lang="en-US"&gt;&lt;span style="font-weight: bold;"&gt;The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'SaveContactsXML'. The maximum string content length quota (8192) has been exceeded while reading XML data&lt;/span&gt;. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1468905584014909128?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1468905584014909128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1468905584014909128' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1468905584014909128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1468905584014909128'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/01/exception-debugging-in-silverlight.html' title='exception debugging in silverlight'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-4329194720739884975</id><published>2009-01-10T09:58:00.000-08:00</published><updated>2009-01-12T16:18:21.678-08:00</updated><title type='text'>getting root path in Silverlight WCF method</title><content type='html'>I have been playing with my Outlook like scheduler lately and added the capability to import contacts from Outlook itself. I just output a CSV file from Outlook and then convert the CSV file into an XML and a data base table (for a future version). I then wrote a WCF method to download and another to upload the file as I wanted the user of my Contact view to be able to edit the contents. I&lt;br /&gt;copied the contacts XML file to a Contacts folder in my ClientBin directory (IIS Virtual)&lt;br /&gt;My simple interface looks like:&lt;br /&gt;&lt;br /&gt;public interface ISchedulerServices&lt;br /&gt;    {&lt;br /&gt;        [OperationContract]&lt;br /&gt;        string GetContactsXML(string use);&lt;br /&gt;        [OperationContract]&lt;br /&gt;        void SaveContactsXML(string newXML);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;of course both of these methods need to know the location of the XML file that contains the contacts. I had to find a way to access the HTTP context from the implementation of these methods  as my service is IIS hosted. I accomplished this by adding the following decoration to my implementation:&lt;br /&gt;&lt;br /&gt;[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]&lt;br /&gt;&lt;br /&gt;and to the web.config:&lt;br /&gt;&lt;br /&gt;&lt;servicehostingenvironment aspnetcompatibilityenabled="true"&gt;&lt;br /&gt;&lt;br /&gt;this I inserted right after the behaviors section so the looks like:&lt;br /&gt;&lt;br /&gt;&amp;lt;system.servicemodel&amp;gt;&lt;br /&gt;  &amp;lt;behaviors&amp;gt;&lt;br /&gt;   &amp;lt;servicebehaviors&amp;gt;&lt;br /&gt;    &amp;lt;behavior name="SchedulerV4.Web.SchedulerServicesBehavior"&amp;gt;&lt;br /&gt;     &amp;lt;servicemetadata httpgetenabled="true"&amp;gt;&lt;br /&gt;     &amp;lt;servicedebug includeexceptiondetailinfaults="true"&amp;gt;&lt;br /&gt;    &amp;lt;/behavior&amp;gt;&lt;br /&gt;   &amp;lt;/servicebehaviors&amp;gt;&lt;br /&gt;  &amp;lt;/behaviors&amp;gt;&lt;br /&gt;   &amp;lt;servicehostingenvironment aspnetcompatibilityenabled="true"&amp;gt;&lt;br /&gt;  &amp;lt;services&amp;gt;&lt;br /&gt;  &lt;br /&gt;  &amp;lt;service behaviorConfiguration="SchedulerV4.Web.SchedulerServicesBehavior&amp;gt;&lt;br /&gt;&lt;br /&gt;NOTE: I realize that there is a project option called Siverlight enabled WCF service but I had problems with the code it produced and these steps are pretty easy.&lt;br /&gt;&lt;br /&gt;Now I could get the path with the following code:&lt;br /&gt;&lt;br /&gt;string root = HttpContext.Current.Server.MapPath("~/");&lt;br /&gt;strFilePath = root + "clientbin/contacts/johncontacts.xml";&lt;br /&gt;&lt;br /&gt;Then I was largely in business except for an exception that was thrown when I called the Save method . This threw an exception as my XML was larger tha 8192 btyes however the exception gave me no clue to the issue. However WebDevHelper to the rescue as the real error was buried in the Response Content.&lt;br /&gt;&lt;br /&gt;NOTE: I should mention that I was unable to add this WCF method using Vista 64 as Visual Studio crashes. To solve the problem I had to reinstall the Siverlight Toolkit for SP1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-4329194720739884975?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/4329194720739884975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=4329194720739884975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4329194720739884975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/4329194720739884975'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/01/getting-root-path-in-silverlight-wcf.html' title='getting root path in Silverlight WCF method'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-988431335294013434</id><published>2009-01-09T08:13:00.000-08:00</published><updated>2009-01-09T08:17:07.993-08:00</updated><title type='text'>Rich UI business example with Silverlight</title><content type='html'>For a great example of what one can do with Silverlight to produce a truly desktop like business application check out Zignals at &lt;a href="http://www.zignals.com/main/charts/trystockcharts.aspx"&gt;http://www.zignals.com/main/charts/trystockcharts.aspx&lt;/a&gt;.&lt;br /&gt;Wow!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-988431335294013434?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/988431335294013434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=988431335294013434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/988431335294013434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/988431335294013434'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2009/01/rich-ui-business-example-with.html' title='Rich UI business example with Silverlight'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5881850981032320199</id><published>2008-12-26T07:20:00.000-08:00</published><updated>2008-12-26T07:54:01.537-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transactionscope DTC'/><title type='text'>Transactionscope</title><content type='html'>Transactionscope makes it easy to manage transactions in .Net even if they are only simple one database access or involve multiple resources such as sql servers or WCF services. However there are a few rules:&lt;br /&gt;In order for a resource manager (in this case SQL Server) to take part inside a transaction it must first enlist in the transaction if one already exists, SQL server determines this when a connection is first opened. Opening a connection when there is a transaction associated with the current thread will result in SQL server placing that connection inside the existing transaction, if no other enlistment has happened then SQL server will create a local transaction&lt;br /&gt;and thus manage the transaction. Only if multiple resources are involved will the Distributed Transaction Coordinator (DTC) be brought into the picture.&lt;br /&gt;We initiate the Transaction as follows:&lt;br /&gt;&lt;br /&gt;using (TransactionScope scope = new TransactionScope(opt))&lt;br /&gt;where opt is one of:&lt;br /&gt;Required Join the ambient transaction, or create a new one if one does not exist&lt;br /&gt;RequiredNew start a new transaction inside its own scope&lt;br /&gt;Suppress no transaction&lt;br /&gt;&lt;br /&gt;see &lt;a href="http://msdn.microsoft.com/en-us/library/ms172152.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms172152.aspx&lt;/a&gt; for more&lt;br /&gt;&lt;br /&gt;So unless we are accessing multiple transactionable resources in our scope the DTC should not be envoked. This is easily proved by adding a line of code like:&lt;br /&gt;&lt;br /&gt;Guid guid = Transaction.Current.TransactionInformation.DistributedIdentifier&lt;br /&gt;&lt;br /&gt;This will be null is we are using Suppress and all zeros if the DTC is not used. of course the transactions are not completed till scope.Complete() is called which will not be the case when&lt;br /&gt;an exception is thrown and the changes to our resources are rolled back.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5881850981032320199?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5881850981032320199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5881850981032320199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5881850981032320199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5881850981032320199'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/12/transactionscope.html' title='Transactionscope'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6353435258874904656</id><published>2008-12-24T09:52:00.000-08:00</published><updated>2008-12-24T09:59:29.440-08:00</updated><title type='text'>Photo Application version 2</title><content type='html'>Just put up a new version of my photo application that uses a ListBox to hold the images .&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/sl2/mypictures/MyPictures.Web/MyPicturesTestPage.html"&gt;http//www.sandkeysoftware.com/sl2/mypictures/MyPictures.Web/MyPicturesTestPage.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6353435258874904656?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6353435258874904656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6353435258874904656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6353435258874904656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6353435258874904656'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/12/photo-application-version-2.html' title='Photo Application version 2'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6210920050267136154</id><published>2008-12-08T16:07:00.000-08:00</published><updated>2008-12-26T07:19:57.935-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='t-sql wcf interconnect'/><title type='text'>calling WCF service from T-SQL</title><content type='html'>Just put a document on my website to describe this process:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/wcf/TSQLToWCF.pdf"&gt;http://www.sandkeysoftware.com/wcf/TSQLToWCF.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6210920050267136154?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6210920050267136154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6210920050267136154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6210920050267136154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6210920050267136154'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/12/calling-wcf-service-from-t-sql.html' title='calling WCF service from T-SQL'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3558355325385009877</id><published>2008-11-24T13:15:00.000-08:00</published><updated>2008-12-08T16:05:36.307-08:00</updated><title type='text'>silverlight2 photo demo</title><content type='html'>Have been playing around with the "Flashy" side of Silverlight lately and have come up with this demo app that allow the displaying a slider of a set if images. The user can click on one and it is&lt;br /&gt;shown in a larger window. If you bring up the the enlarged image then clicking will enable an elliptical zooming region. The Spin button when clicked will change the mode to a skew and flip so the next picture on the strip will be displayed on "back" side.&lt;br /&gt;&lt;br /&gt;This has been produced my combining two wonderful examples :&lt;br /&gt;- &lt;strong&gt;Jeff Prosise Silverlight 2 Transforms And Clipping Regions Msdn November 2008&lt;/strong&gt;&lt;br /&gt;- Jeff &lt;a href="http://designwithsilverlight.com/2008/10/02/filmstrip-gallery/"&gt;http://designwithsilverlight.com/2008/10/02/filmstrip-gallery/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href="http://www.sandkeysoftware.com/SL2/Filmstripnew/Filmstrip.Web/FilmstripTestPage.html"&gt;&lt;span style="font-size:85%;"&gt;http://www.sandkeysoftware.com/SL2/Filmstripnew/Filmstrip.Web/FilmstripTestPage.html&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3558355325385009877?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3558355325385009877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3558355325385009877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3558355325385009877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3558355325385009877'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/11/silverlight2-photo-demo.html' title='silverlight2 photo demo'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6130563737591031804</id><published>2008-10-28T13:50:00.000-07:00</published><updated>2008-10-28T14:02:09.235-07:00</updated><title type='text'>reading xml resource file in Silverlight</title><content type='html'>I needed to create and XML file manually then read into my SL app. I ended up attaching the created file to my project and changing the Build Action to Content. this will cause the file to be included in the output XAP. then we can read it using the following code which assumes my file is contact.xml:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;StreamResourceInfo sr = Application.GetResourceStream(&lt;br /&gt;new Uri("contact.xml", UriKind.Relative));&lt;br /&gt;XmlReaderSettings xrs= new XmlReaderSettings();&lt;br /&gt;XmlReader xr=XmlReader.Create(xmlinfo.Stream,xrs);&lt;br /&gt;XElement xe = XElement.Load(xr);&lt;br /&gt;&lt;br /&gt;Now we have the XML is a form we can use with Linq .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6130563737591031804?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6130563737591031804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6130563737591031804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6130563737591031804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6130563737591031804'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/10/reading-xml-resource-file.html' title='reading xml resource file in Silverlight'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-884752074590489870</id><published>2008-10-10T07:18:00.000-07:00</published><updated>2008-10-10T07:22:50.497-07:00</updated><title type='text'>Restful WCF services</title><content type='html'>just added a document on implementing Restful WCF services including an issue that I ran into in hosting with IIS 6&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/wcf/restful/restful.pdf"&gt;http://www.sandkeysoftware.com/wcf/restful/restful.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-884752074590489870?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/884752074590489870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=884752074590489870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/884752074590489870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/884752074590489870'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/10/restful-wcf-services.html' title='Restful WCF services'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8982262895609399223</id><published>2008-10-08T09:10:00.000-07:00</published><updated>2008-10-08T09:18:10.931-07:00</updated><title type='text'>VS 2008 stored procedure debugging</title><content type='html'>Have had a need to debug a lot of Stored procedures as it is the best way i could find to understand what they were doing as we ported the functionality to C# and Linq.VS2008 makes this easy as you just load the Sproc into VS 2008 and right click&lt;br /&gt;then select &lt;strong&gt;Step into Stored procedure&lt;/strong&gt;. Yow then see a dialog that prompts for input parameters and then control stops at the first line in sproc. From here one can &lt;strong&gt;Run to cursor&lt;/strong&gt;, view variables, etc. This saved me a lot of  time trying to understand these blobs of monolithic code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8982262895609399223?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8982262895609399223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8982262895609399223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8982262895609399223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8982262895609399223'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/10/vs-2008-stored-procedure-debugging.html' title='VS 2008 stored procedure debugging'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3023858197572789418</id><published>2008-09-18T05:34:00.001-07:00</published><updated>2008-09-18T11:38:47.868-07:00</updated><title type='text'>Linq to SQL SQLMethods</title><content type='html'>Just came across this really cool Class that contains methods such as Like that allow us to issue SQL Like commands. this is interesting as the T-SQL Like lets us&lt;br /&gt;write statements like select * from table where field like "%john%bill%" . these cannot easily be expressed with Contains. So instead of expressing :&lt;br /&gt;from t in table where field.Contains("nnn");&lt;br /&gt;we would write:&lt;br /&gt;from t in table where SQLMethods.Like(field,"%john%bill%");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;there are other interesting methods such as DateTime diff functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3023858197572789418?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3023858197572789418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3023858197572789418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3023858197572789418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3023858197572789418'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/09/linq-to-sql-sqlmethods.html' title='Linq to SQL SQLMethods'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-3550002199963350145</id><published>2008-09-18T05:34:00.000-07:00</published><updated>2008-09-18T05:46:47.974-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight2 custom control'/><title type='text'>Silverlight 2 Custom Controls</title><content type='html'>just put up a new tutorial on creating Silverlight custom controls this is based on an article by Jeff Prosise in MSDN magazine.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/CustomControls.pdf"&gt;http://www.sandkeysoftware.com/silverlight/CustomControls.pdf&lt;/a&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/CustomControls.pdf"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-3550002199963350145?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/3550002199963350145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=3550002199963350145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3550002199963350145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/3550002199963350145'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/09/silverlight-2-custom-controls.html' title='Silverlight 2 Custom Controls'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5703906531774710654</id><published>2008-09-06T11:42:00.000-07:00</published><updated>2008-09-06T11:59:31.040-07:00</updated><title type='text'>capturing Print output from Stored procedure called from Linq to SQL</title><content type='html'>Recently I have been doing lots of work with calling stored procedures from Linq to SQL. Many of these procs used Print statements as debugging output which was sometimes useful in the development but where not appearing in the output window till we came across this little trick:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;         &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;br /&gt;//  this code goes whereever you instantiate your datacontext e.g constructor in of&lt;br /&gt;//   a Dataaccess layer&lt;br /&gt; &lt;br /&gt;            _Connstr = string.Format("server={0};database={1};user ID={2} ;password={3}", "sqlserver", "table", "user", "password");&lt;br /&gt;            _MyDC = new MyDataContext(_Connstr);&lt;br /&gt;            SqlConnection conn = _MyDC.Connection as SqlConnection;&lt;br /&gt;// we supply an event handler for the SQL messages&lt;br /&gt;            conn.InfoMessage += new SqlInfoMessageEventHandler(conn_InfoMessage);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;//This fired when the sproc does a output statement like print&lt;br /&gt;        static void conn_InfoMessage(object sender, SqlInfoMessageEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            Console.WriteLine(e.Message);&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5703906531774710654?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5703906531774710654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5703906531774710654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5703906531774710654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5703906531774710654'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/09/capturing-print-output-from-stored.html' title='capturing Print output from Stored procedure called from Linq to SQL'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-9075091826995340391</id><published>2008-07-13T11:48:00.000-07:00</published><updated>2008-08-27T13:06:29.801-07:00</updated><title type='text'>Silverlight 2 Styles and templates</title><content type='html'>Starting working on a tutorial on Styles , templates ,converters and bindings so here is a first cut.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/Stylesbinding.pdf"&gt;http://www.sandkeysoftware.com/silverlight/Stylesbinding.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-9075091826995340391?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/9075091826995340391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=9075091826995340391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/9075091826995340391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/9075091826995340391'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/07/silverlight-2-styles-and-templates.html' title='Silverlight 2 Styles and templates'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2595257085690399688</id><published>2008-07-11T05:38:00.000-07:00</published><updated>2008-07-12T10:04:15.413-07:00</updated><title type='text'>Linq to SQL subquerys</title><content type='html'>The T-SQL in can be expressed in Linq in a couple of ways, if we have sql that looks like:&lt;br /&gt;&lt;br /&gt;Select ProductID from Products where SupplierID not in (Select SupplierID from Suppliers where City like 'b%')" &lt;br /&gt;&lt;br /&gt;(1) we can take advantage of deferred execution and break the query into logical parts which is&lt;br /&gt;much more readible:&lt;br /&gt;&lt;br /&gt;var subquery = from supplier in db.Suppliers&lt;br /&gt;where !supplier.City.StartsWith("B")&lt;br /&gt;select supplier.SupplierID;&lt;br /&gt;&lt;br /&gt;List&lt;products&gt;&lt;product&gt; prods = (from product in db.Products&lt;br /&gt;where !&lt;strong&gt;subquery&lt;/strong&gt;.Contains((int)product.SupplierID)&lt;br /&gt;select product).ToList();&lt;br /&gt;&lt;br /&gt;The first query is not executed till the ToList so the resultant SQL looks like:&lt;br /&gt;&lt;br /&gt;SELECT [t0].[ProductID], [t0].[ProductName], [t0].[SupplierID], [t0].[CategoryID], [t0].[QuantityPerUnit], [t0].[UnitPrice], [t0].[UnitsInStock], [t0].[UnitsOnOrder], [t0].[ReorderLevel], [t0].[Discontinued]FROM [dbo].[Products] AS [t0]WHERE NOT (EXISTS( SELECT NULL AS [EMPTY] FROM [dbo].[Suppliers] AS [t1] WHERE ([t1].[SupplierID] = ([t0].[SupplierID])) AND (NOT ([t1].[City] LIKE @p0)) ))&lt;br /&gt;&lt;br /&gt;(2) just inline the subquery&lt;br /&gt;&lt;br /&gt;List&lt;product&gt; prods = (from product in db.Products&lt;br /&gt;where !(from supplier in db.Suppliers&lt;br /&gt;where !supplier.City.StartsWith("B")&lt;br /&gt;select supplier.SupplierID).Contains((int)product.SupplierID)&lt;br /&gt;select product).ToList();&lt;br /&gt;&lt;br /&gt;this reults in the same T-SQL&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2595257085690399688?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2595257085690399688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2595257085690399688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2595257085690399688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2595257085690399688'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/07/linq-to-sql-subquerys.html' title='Linq to SQL subquerys'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8739323519915594354</id><published>2008-06-29T11:03:00.000-07:00</published><updated>2008-06-29T11:08:12.676-07:00</updated><title type='text'>ListBox and click handlers</title><content type='html'>It was driving me crazy that my click handler was only firing for the first and as it turns out the selected item in a listbox. I had templated my rows and have a radiobutton on the row with a click handler. It turns out it will only fire if the row is selected(not good). However this great article showed me the simple solution was to a ClickMode="press" and then things worked as expected.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.silverlightshow.net/items/Buttons-in-a-ListBox-and-More-Demonstration-of-some-useful-Silverlight-techniques.aspx"&gt;http://www.silverlightshow.net/items/Buttons-in-a-ListBox-and-More-Demonstration-of-some-useful-Silverlight-techniques.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8739323519915594354?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8739323519915594354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8739323519915594354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8739323519915594354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8739323519915594354'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/listbox-and-click-handlers.html' title='ListBox and click handlers'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6492391384358462276</id><published>2008-06-22T14:07:00.000-07:00</published><updated>2008-06-22T14:13:37.595-07:00</updated><title type='text'>Silverlight 2 Dialog</title><content type='html'>Article describes the creation of a silverlight "dialog" that is dragable.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/dialog/dialog.pdf"&gt;http://www.sandkeysoftware.com/silverlight/dialog/dialog.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6492391384358462276?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6492391384358462276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6492391384358462276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6492391384358462276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6492391384358462276'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/silverlight-2-dialog.html' title='Silverlight 2 Dialog'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6206831833811124794</id><published>2008-06-21T09:48:00.000-07:00</published><updated>2009-01-12T16:30:39.258-08:00</updated><title type='text'>Silverlight 2 "office like" scheduler</title><content type='html'>To show that SL is suitable for business applications I have been building a office look alike scheduler. Right now it will not save anything but much of the UI is alive . For a demo just click on the 7am button. I will be making all the scheduling live in the next little while. Love this Silverlight! I thank the people at Discountasp for making the hosting work.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com//SL2//SLOutlook//SchedulerV4TestPage.html"&gt;http://www.sandkeysoftware.com//SL2//SLOutlook//SchedulerV4TestPage.html&lt;/a&gt;&lt;a href="http://www.sandkeysoftware.com//SL2//SLOutlook//SchedulerV4TestPage.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6206831833811124794?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6206831833811124794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6206831833811124794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6206831833811124794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6206831833811124794'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/silverlight-2-office-like-scheduler.html' title='Silverlight 2 &quot;office like&quot; scheduler'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8856079399247249780</id><published>2008-06-14T07:33:00.000-07:00</published><updated>2008-09-06T12:08:59.254-07:00</updated><title type='text'>Multiple config sections</title><content type='html'>Sometimes there is a need for multiple config sections in an application config file and then have one them active on a instance of the program. This can be done by adding &lt;strong&gt;sectionGroup&lt;/strong&gt; that describe the custom sections in the config. In the below sample we are adding a ONESettings section and a TWOSettings section, each of them has Username and Password key/value pairs:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;&lt;pre&gt; &amp;lt;configSections&amp;gt;&lt;br /&gt;    &amp;lt;sectionGroup name=&lt;span style = "color: red;"&gt;&amp;quot;ONESettings&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;      &amp;lt;section&lt;br /&gt;        name=&lt;span style = "color: red;"&gt;&amp;quot;myCustomSection&amp;quot;&lt;/span&gt;&lt;br /&gt;        type=&lt;span style = "color: red;"&gt;&amp;quot;MyProjectNamespace.CustomConfigHandler,&lt;br/&gt; MyProjectNamespace, Version=1.0.0.0, Culture=neutral, ,&lt;br/&gt;PublicKeyToken=null&amp;quot;&lt;/span&gt;&lt;br /&gt;        allowLocation=&lt;span style = "color: red;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;br /&gt;        allowDefinition=&lt;span style = "color: red;"&gt;&amp;quot;Everywhere&amp;quot;&lt;/span&gt;&lt;br /&gt;      /&amp;gt;&lt;br /&gt;    &amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;    &amp;lt;sectionGroup name=&lt;span style = "color: red;"&gt;&amp;quot;TWOSettings&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;      &amp;lt;section&lt;br /&gt;        name=&lt;span style = "color: red;"&gt;&amp;quot;myCustomSection&amp;quot;&lt;/span&gt;&lt;br /&gt;        type=&lt;span style = "color: red;"&gt;&amp;quot;MyProjectNamespace.CustomConfigHandler,,&lt;br/&gt; MyProjectNamespace, Version=1.0.0.0, Culture=neutral,,&lt;br/&gt; PublicKeyToken=null&amp;quot;&lt;/span&gt;&lt;br /&gt;        allowLocation=&lt;span style = "color: red;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&lt;br /&gt;        allowDefinition=&lt;span style = "color: red;"&gt;&amp;quot;Everywhere&amp;quot;&lt;/span&gt;&lt;br /&gt;      /&amp;gt;&lt;br /&gt;    &amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;/configSections&amp;gt;&lt;br /&gt;  &amp;lt;ONESettings&amp;gt;&lt;br /&gt;    &amp;lt;myCustomSection &lt;br /&gt;      FTPUserName=&lt;span style = "color: red;"&gt;&amp;quot;User1&amp;quot;&lt;/span&gt;&lt;br /&gt;      FTPPassword=&lt;span style = "color: red;"&gt;&amp;quot;pass&amp;quot;&lt;/span&gt;&lt;br /&gt;  &amp;lt;/ONESettings&amp;gt;&lt;br /&gt;  &amp;lt;TWOSettings&amp;gt;&lt;br /&gt;    &amp;lt;myCustomSection &lt;br /&gt;      FTPUserName=&lt;span style = "color: red;"&gt;&amp;quot;User1&amp;quot;&lt;/span&gt;&lt;br /&gt;      FTPPassword=&lt;span style = "color: red;"&gt;&amp;quot;pass&amp;quot;&lt;/span&gt;&lt;br /&gt;   &amp;lt;/TWOSettings&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;div&gt;The &lt;strong&gt;CustomConfigHandler &lt;/strong&gt; is a class derived from &lt;strong&gt;ConfigurationSection&lt;/strong&gt;&lt;br/&gt; that implements the ConfigurationProperty properties like UserName with Getters,setters and Attributes :&lt;/div&gt;&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;﻿using System;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Configuration;&lt;br /&gt;&lt;br /&gt;&lt;span style = "color: blue;"&gt;namespace&lt;/span&gt; MyProjectNamespace&lt;br /&gt;{&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// We need do have a hierarchy for the FTP settings as they will differ from site to site,&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// so we need to add custom config sections to the app.config so we can have sections for each&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// of the sites&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: blue;"&gt;class&lt;/span&gt; CustomConfigHandler:ConfigurationSection &lt;br /&gt;    {&lt;br /&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; CustomConfigHandler()&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;        [ConfigurationProperty(&lt;span style = "color: red;"&gt;&amp;quot;UserName&amp;quot;&lt;/span&gt;, DefaultValue = &lt;span style = "color: red;"&gt;&amp;quot;None&amp;quot;&lt;/span&gt;, IsRequired = &lt;span style = "color: blue;"&gt;true&lt;/span&gt;)]&lt;br /&gt;        [StringValidator(InvalidCharacters = &lt;span style = "color: red;"&gt;&amp;quot;~!@#$%^&amp;amp;*()[]{};'\"|\\&amp;quot;&lt;/span&gt;, MinLength = &lt;span style = "color: #336699;"&gt;1&lt;/span&gt;, MaxLength = &lt;span style = "color: #336699;"&gt;60&lt;/span&gt;)]&lt;br /&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; String UserName&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            { &lt;span style = "color: blue;"&gt;return&lt;/span&gt; (String)&lt;span style = "color: blue;"&gt;this&lt;/span&gt;[&lt;span style = "color: red;"&gt;&amp;quot;UserName&amp;quot;&lt;/span&gt;]; }&lt;br /&gt;            &lt;span style = "color: purple;"&gt;set&lt;/span&gt;&lt;br /&gt;            { &lt;span style = "color: blue;"&gt;this&lt;/span&gt;[&lt;span style = "color: red;"&gt;&amp;quot;UserName&amp;quot;&lt;/span&gt;] = value; }&lt;br /&gt;        }&lt;br /&gt;        [ConfigurationProperty(&lt;span style = "color: red;"&gt;&amp;quot;PassWord&amp;quot;&lt;/span&gt;, DefaultValue = &lt;span style = "color: red;"&gt;&amp;quot;None&amp;quot;&lt;/span&gt;, IsRequired = &lt;span style = "color: blue;"&gt;true&lt;/span&gt;)]&lt;br /&gt;        [StringValidator(InvalidCharacters = &lt;span style = "color: red;"&gt;&amp;quot;~!@#$%^&amp;amp;()[]{};'\"|\\&amp;quot;&lt;/span&gt;, MinLength = &lt;span style = "color: #336699;"&gt;1&lt;/span&gt;, MaxLength = &lt;span style = "color: #336699;"&gt;60&lt;/span&gt;)]&lt;br /&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; String PassWord&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            { &lt;span style = "color: blue;"&gt;return&lt;/span&gt; (String)&lt;span style = "color: blue;"&gt;this&lt;/span&gt;[&lt;span style = "color: red;"&gt;&amp;quot;PassWord&amp;quot;&lt;/span&gt;]; }&lt;br /&gt;            &lt;span style = "color: purple;"&gt;set&lt;/span&gt;&lt;br /&gt;            { &lt;span style = "color: blue;"&gt;this&lt;/span&gt;[&lt;span style = "color: red;"&gt;&amp;quot;PassWord&amp;quot;&lt;/span&gt;] = value; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8856079399247249780?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8856079399247249780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8856079399247249780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8856079399247249780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8856079399247249780'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/multiple-config-sections.html' title='Multiple config sections'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6455978585634011763</id><published>2008-06-14T05:05:00.000-07:00</published><updated>2008-09-06T15:14:37.371-07:00</updated><title type='text'>Changing the Windows Service name with Config file</title><content type='html'>This is one way of using a config settings to change the name of a Windows Service as it is being installed by InstallUtil.&lt;br /&gt;&lt;br /&gt;First add the following to the App.Config file:&lt;br /&gt;&lt;div style="background:#ccc"&gt; &lt;br /&gt;&amp;ltappSettings&amp;gt&lt;br /&gt;&amp;ltAdd key=="ServiceName" value="ME1"/&amp;gt&lt;br /&gt;&amp;lt/appSettings&amp;gt&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The designer will add a generated file called ProjectInstaller.Designer.cs that contains a line of code in the InitializeComponent method that will assign a name to the service .&lt;br/&gt;&lt;br /&gt;this.serviceInstaller1.ServiceName = this.serviceInstaller1.DisplayName;&lt;br /&gt;where DisplayName is a property of the ServiceHost&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;We would like to just modify this code but as it is a generated file I create a partial class called MyProjectInstaller and copy the code from the generated version of InitializeComponent and replace the above line with the code below. &lt;br /&gt;Additionally, the app.config file will be copyied to the &lt;strong&gt;Bin&lt;/strong&gt; directory during the build process and result in a file named YourService.exe.config.The normal Configuration Api methods will not find this but we can use the &lt;strong&gt;ConfigurationManager.OpenExeConfiguration &lt;/strong&gt; to read the settings as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;padding-top:4px;border-bottom:gray 1px solid;background-color:#f4f4f4;height:200px"&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;﻿using System;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Reflection;&lt;br /&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Configuration;&lt;br /&gt;&lt;br /&gt;&lt;span style = "color: blue;"&gt;namespace&lt;/span&gt; UtilitiesServiceHost&lt;br /&gt;{&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;///  InitializeComponent was modified to allow for the supplying of the Service name thru&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;///  the config file.&lt;/span&gt;&lt;br /&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    partial &lt;span style = "color: blue;"&gt;class&lt;/span&gt; ProjectInstaller&lt;br /&gt;    {&lt;br /&gt;          &lt;span style = "color: blue;"&gt;private&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; MyInitializeComponent()&lt;br /&gt;        {&lt;br /&gt;              REST  OF CODE  (replace the this.serviceInstaller1.ServiceName = &lt;br/&gt;this.serviceInstaller1.DisplayName; with this)&lt;br /&gt;&lt;br /&gt;            Assembly service = Assembly.GetAssembly(typeof(ProjectInstaller));&lt;br /&gt;            Configuration config = ConfigurationManager.OpenExeConfiguration(service.Location);&lt;br /&gt;            &lt;span style = "color: blue;"&gt;this&lt;/span&gt;.serviceInstaller1.Description = &lt;span style = "color: red;"&gt;&amp;quot;IEI Utilitiy methods&amp;quot;&lt;/span&gt;;&lt;br /&gt;            &lt;span style = "color: blue;"&gt;if&lt;/span&gt; (config.AppSettings.Settings[&lt;span style = "color: red;"&gt;&amp;quot;ServiceName&amp;quot;&lt;/span&gt;] != null)&lt;br /&gt;                &lt;span style = "color: blue;"&gt;this&lt;/span&gt;.serviceInstaller1.ServiceName = config.AppSettings.Settings[&lt;span style = "color: red;"&gt;&amp;quot;ServiceName&amp;quot;&lt;/span&gt;].Value;&lt;br /&gt;            &lt;span style = "color: blue;"&gt;else&lt;/span&gt;&lt;br /&gt;                &lt;span style = "color: blue;"&gt;this&lt;/span&gt;.serviceInstaller1.ServiceName = &lt;span style = "color: blue;"&gt;this&lt;/span&gt;.serviceInstaller1.DisplayName;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Finally I modify the call to ProjectInstaller() in the ProjectInstaller constructor to call MyProjectInstaller&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6455978585634011763?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6455978585634011763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6455978585634011763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6455978585634011763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6455978585634011763'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/this-is-one-way-of-using-config.html' title='Changing the Windows Service name with Config file'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2968848884215837799</id><published>2008-06-04T05:05:00.000-07:00</published><updated>2008-06-14T05:51:43.090-07:00</updated><title type='text'>Silverlight2 ComboBox</title><content type='html'>This is a quick and dirty combo box that can do till MS releases one, it combines ideas from a couple of sites that I could not make work. here is the XAML that defines a readonly textbox and a Listbox: (note the use of the path to draw the button)&lt;br /&gt;&lt;div style="background:#ccc"&gt;&lt;br /&gt;&amp;lt;UserControl x:Class=&lt;span style = "color: red;"&gt;&amp;quot;ComboControl.JohnComboBox&amp;quot;&lt;/span&gt;&lt;br /&gt;    xmlns=&lt;span style = "color: red;"&gt;&amp;quot;http:schemas.microsoft.com/client/2007&amp;quot;&lt;/span&gt; &lt;br /&gt;    xmlns:x=&lt;span style = "color: red;"&gt;&amp;quot;http:schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;br /&gt;    Width=&lt;span style = "color: red;"&gt;&amp;quot;150&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;Grid&amp;gt;&lt;br /&gt;        &amp;lt;Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;        &amp;lt;ColumnDefinition Width=&lt;span style = "color: red;"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/ColumnDefinition&amp;gt;&lt;br /&gt;        &amp;lt;ColumnDefinition Width=&lt;span style = "color: red;"&gt;&amp;quot;30&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/ColumnDefinition&amp;gt;&lt;br /&gt;    &amp;lt;/Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;    &amp;lt;Grid.RowDefinitions&amp;gt;&lt;br /&gt;        &amp;lt;RowDefinition Height=&lt;span style = "color: red;"&gt;&amp;quot;18&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/RowDefinition&amp;gt;&lt;br /&gt;        &amp;lt;RowDefinition Height=&lt;span style = "color: red;"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/RowDefinition&amp;gt;&lt;br /&gt;    &amp;lt;/Grid.RowDefinitions&amp;gt;&lt;br /&gt;    &amp;lt;TextBox x:Name=&lt;span style = "color: red;"&gt;&amp;quot;MyTextBox&amp;quot;&lt;/span&gt; Height=&lt;span style = "color: red;"&gt;&amp;quot;18&amp;quot;&lt;/span&gt; FontSize=&lt;span style = "color: red;"&gt;&amp;quot;10&amp;quot;&lt;/span&gt;  IsReadOnly=&lt;span style = "color: red;"&gt;&amp;quot;True&amp;quot;&lt;/span&gt; Grid.Column=&lt;span style = "color: red;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Width=&lt;span style = "color: red;"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/TextBox&amp;gt;&lt;br /&gt;            &lt;br /&gt;            &amp;lt;Button  x:Name=&lt;span style = "color: red;"&gt;&amp;quot;DropDownButton&amp;quot;&lt;/span&gt;  Height=&lt;span style = "color: red;"&gt;&amp;quot;18&amp;quot;&lt;/span&gt; Grid.Column=&lt;span style = "color: red;"&gt;&amp;quot;1&amp;quot;&lt;/span&gt;  MouseLeftButtonDown=&lt;span style = "color: red;"&gt;&amp;quot;DropDownButton_MouseLeftButtonDown&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;                &amp;lt;Path &lt;br /&gt;                Width=&lt;span style = "color: red;"&gt;&amp;quot;9&amp;quot;&lt;/span&gt; Height=&lt;span style = "color: red;"&gt;&amp;quot;6&amp;quot;&lt;/span&gt; &lt;br /&gt;                Stretch=&lt;span style = "color: red;"&gt;&amp;quot;Fill&amp;quot;&lt;/span&gt; Fill=&lt;span style = "color: red;"&gt;&amp;quot;#91000000&amp;quot;&lt;/span&gt; &lt;br /&gt;                Data=&lt;span style = "color: red;"&gt;&amp;quot;F1 M 17.1354,22.7907L 22.8121,12.9583L 11.4587,12.9583L 17.1354,22.7907 Z &amp;quot;&lt;/span&gt;/&amp;gt;&lt;br /&gt;            &amp;lt;/Button&amp;gt;  &lt;br /&gt;        &lt;br /&gt;        &amp;lt;ListBox x:Name=&lt;span style = "color: red;"&gt;&amp;quot;MyControl&amp;quot;&lt;/span&gt; MaxHeight=&lt;span style = "color: red;"&gt;&amp;quot;100&amp;quot;&lt;/span&gt; Visibility=&lt;span style = "color: red;"&gt;&amp;quot;Collapsed&amp;quot;&lt;/span&gt; Grid.Column=&lt;span style = "color: red;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; Grid.Row=&lt;span style = "color: red;"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; Width=&lt;span style = "color: red;"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;  SelectionChanged=&lt;span style = "color: red;"&gt;&amp;quot;MyControl_SelectionChanged&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;            &amp;lt;ListBox.ItemTemplate&amp;gt;&lt;br /&gt;                &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;                    &amp;lt;TextBlock FontSize=&lt;span style = "color: red;"&gt;&amp;quot;10&amp;quot;&lt;/span&gt; Text=&lt;span style = "color: red;"&gt;&amp;quot;{Binding}&amp;quot;&lt;/span&gt; /&amp;gt;    &lt;br /&gt;                &amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;            &amp;lt;/ListBox.ItemTemplate&amp;gt;&lt;br /&gt;        &amp;lt;/ListBox&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;/Grid&amp;gt;&lt;br /&gt;   &lt;br /&gt;&amp;lt;/UserControl&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;here is the code behind (note the Extension class to solve selecting the listbox item thanks to Delay article http://blogs.msdn.com/delay/archive/2008/03/05/lb-sv-faq-examples-notes-tips-and-more-for-silverlight-2-beta-1-s-listbox-and-scrollviewer-controls.aspx&lt;br /&gt;&lt;div style="background:#ccc"&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style = "color: black;"&gt;   1: &lt;/span&gt;﻿using System;&lt;br /&gt;&lt;span style = "color: black;"&gt;   2: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style = "color: black;"&gt;   3: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style = "color: black;"&gt;   4: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style = "color: black;"&gt;   5: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style = "color: black;"&gt;   6: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;br /&gt;&lt;span style = "color: black;"&gt;   7: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Input;&lt;br /&gt;&lt;span style = "color: black;"&gt;   8: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style = "color: black;"&gt;   9: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;br /&gt;&lt;span style = "color: black;"&gt;  10: &lt;/span&gt;&lt;span style = "color: blue;"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;br /&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  12: &lt;/span&gt;&lt;span style = "color: blue;"&gt;namespace&lt;/span&gt; ComboControl&lt;br /&gt;&lt;span style = "color: black;"&gt;  13: &lt;/span&gt;{&lt;br /&gt;&lt;span style = "color: black;"&gt;  14: &lt;/span&gt;    &lt;br /&gt;&lt;span style = "color: black;"&gt;  15: &lt;/span&gt;    &lt;span style = "color: blue;"&gt;public&lt;/span&gt; partial &lt;span style = "color: blue;"&gt;class&lt;/span&gt; JohnComboBox : UserControl&lt;br /&gt;&lt;span style = "color: black;"&gt;  16: &lt;/span&gt;    {&lt;br /&gt;&lt;span style = "color: black;"&gt;  17: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; ListBox TheList { get { &lt;span style = "color: blue;"&gt;return&lt;/span&gt; MyControl; } }&lt;br /&gt;&lt;span style = "color: black;"&gt;  18: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; JohnComboBox() &lt;br /&gt;&lt;span style = "color: black;"&gt;  19: &lt;/span&gt;        { &lt;br /&gt;&lt;span style = "color: black;"&gt;  20: &lt;/span&gt;            InitializeComponent();&lt;br /&gt;&lt;span style = "color: black;"&gt;  21: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt;  22: &lt;/span&gt;        &lt;span style = "color: green;"&gt;//retrieve the selected value&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  23: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: purple;"&gt;string&lt;/span&gt; GetSelected()&lt;br /&gt;&lt;span style = "color: black;"&gt;  24: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt;  25: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;return&lt;/span&gt; MyTextBox.Text;&lt;br /&gt;&lt;span style = "color: black;"&gt;  26: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt;  27: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; SetValue(&lt;span style = "color: purple;"&gt;string&lt;/span&gt; start)&lt;br /&gt;&lt;span style = "color: black;"&gt;  28: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt;  29: &lt;/span&gt;            MyTextBox.Text = start;&lt;br /&gt;&lt;span style = "color: black;"&gt;  30: &lt;/span&gt;            MyControl.SelectedIndex = &lt;span style = "color: #336699;"&gt;3&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt;  31: &lt;/span&gt;            MyControl.SelectedIndexWorkaround();&lt;br /&gt;&lt;span style = "color: black;"&gt;  32: &lt;/span&gt;            &lt;br /&gt;&lt;span style = "color: black;"&gt;  33: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt;  34: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;private&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; MyControl_SelectionChanged(object sender, SelectionChangedEventArgs e)&lt;br /&gt;&lt;span style = "color: black;"&gt;  35: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt;  36: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;if&lt;/span&gt; (MyControl.SelectedItem != null)&lt;br /&gt;&lt;span style = "color: black;"&gt;  37: &lt;/span&gt;                MyTextBox.Text = MyControl.SelectedItem.ToString();&lt;br /&gt;&lt;span style = "color: black;"&gt;  38: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt;  39: &lt;/span&gt;        &lt;span style = "color: green;"&gt;//toggle the listbox visibility&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  40: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;private&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; DropDownButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)&lt;br /&gt;&lt;span style = "color: black;"&gt;  41: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt;  42: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;if&lt;/span&gt; (MyControl.Visibility == Visibility.Visible)&lt;br /&gt;&lt;span style = "color: black;"&gt;  43: &lt;/span&gt;            {&lt;br /&gt;&lt;span style = "color: black;"&gt;  44: &lt;/span&gt;                MyControl.Visibility = Visibility.Collapsed;&lt;br /&gt;&lt;span style = "color: black;"&gt;  45: &lt;/span&gt;            }&lt;br /&gt;&lt;span style = "color: black;"&gt;  46: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  47: &lt;/span&gt;            {&lt;br /&gt;&lt;span style = "color: black;"&gt;  48: &lt;/span&gt;                MyControl.Visibility = Visibility.Visible;&lt;br /&gt;&lt;span style = "color: black;"&gt;  49: &lt;/span&gt;                MyControl.SelectedIndex = &lt;span style = "color: #336699;"&gt;3&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt;  50: &lt;/span&gt;                MyControl.SelectedIndexWorkaround();&lt;br /&gt;&lt;span style = "color: black;"&gt;  51: &lt;/span&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  53: &lt;/span&gt;        } &lt;br /&gt;&lt;span style = "color: black;"&gt;  54: &lt;/span&gt;    }&lt;br /&gt;&lt;span style = "color: black;"&gt;  55: &lt;/span&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  56: &lt;/span&gt;    &lt;span style = "color: green;"&gt;/// This class contains extensions to help work around two ListBox bugs in&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  57: &lt;/span&gt;    &lt;span style = "color: green;"&gt;/// the Silverlight 2 Beta 1 controls release. Simply add it to your project&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  58: &lt;/span&gt;    &lt;span style = "color: green;"&gt;/// and call the extension methods just after the properties they match.&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  59: &lt;/span&gt;    &lt;span style = "color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  60: &lt;/span&gt;    &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: blue;"&gt;static&lt;/span&gt; &lt;span style = "color: blue;"&gt;class&lt;/span&gt; ListBoxExtensions&lt;br /&gt;&lt;span style = "color: black;"&gt;  61: &lt;/span&gt;    {&lt;br /&gt;&lt;span style = "color: black;"&gt;  62: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  63: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Augments ListBox.SelectedIndex to work around a bug where setting&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  64: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// SelectedIndex before the ListBox is visible does not update the UI.&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  65: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  66: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  67: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Instead of:&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  68: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBox.SelectedIndex = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  69: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Use:&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  70: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBox.SelectedIndex = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  71: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBox.SelectedIndexWorkaround();&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  72: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  73: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;param name=&amp;quot;listBox&amp;quot;&amp;gt;Extension method class.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  74: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: blue;"&gt;static&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; SelectedIndexWorkaround(&lt;span style = "color: blue;"&gt;this&lt;/span&gt; ListBox listBox)&lt;br /&gt;&lt;span style = "color: black;"&gt;  75: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt;  76: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;int&lt;/span&gt; selectedIndex = listBox.SelectedIndex;&lt;br /&gt;&lt;span style = "color: black;"&gt;  77: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;bool&lt;/span&gt; &lt;span style = "color: purple;"&gt;set&lt;/span&gt; = &lt;span style = "color: blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt;  78: &lt;/span&gt;            listBox.LayoutUpdated += delegate&lt;br /&gt;&lt;span style = "color: black;"&gt;  79: &lt;/span&gt;            {&lt;br /&gt;&lt;span style = "color: black;"&gt;  80: &lt;/span&gt;                &lt;span style = "color: blue;"&gt;if&lt;/span&gt; (!&lt;span style = "color: purple;"&gt;set&lt;/span&gt;)&lt;br /&gt;&lt;span style = "color: black;"&gt;  81: &lt;/span&gt;                {&lt;br /&gt;&lt;span style = "color: black;"&gt;  82: &lt;/span&gt;                    &lt;span style = "color: green;"&gt;// Toggle value to force the change&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  83: &lt;/span&gt;                    listBox.SelectedIndex = &lt;span style = "color: #336699;"&gt;-1&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt;  84: &lt;/span&gt;                    listBox.SelectedIndex = selectedIndex;&lt;br /&gt;&lt;span style = "color: black;"&gt;  85: &lt;/span&gt;                    &lt;span style = "color: purple;"&gt;set&lt;/span&gt; = &lt;span style = "color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt;  86: &lt;/span&gt;                }&lt;br /&gt;&lt;span style = "color: black;"&gt;  87: &lt;/span&gt;            };&lt;br /&gt;&lt;span style = "color: black;"&gt;  88: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt;  89: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  90: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Augments ListBoxItem.IsSelected to work around a bug where setting&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  91: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// IsSelected before the ListBoxItem is visible does not update the UI.&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  92: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  93: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  94: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Instead of:&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  95: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBoxItem.IsSelected = true;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  96: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// Use:&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  97: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBoxItem.IsSelected = true;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  98: &lt;/span&gt;        &lt;span style = "color: green;"&gt;///     listBoxItem.IsSelectedWorkaround();&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt;  99: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt; 100: &lt;/span&gt;        &lt;span style = "color: green;"&gt;/// &amp;lt;param name=&amp;quot;listBoxItem&amp;quot;&amp;gt;Extension method class.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt; 101: &lt;/span&gt;        &lt;span style = "color: blue;"&gt;public&lt;/span&gt; &lt;span style = "color: blue;"&gt;static&lt;/span&gt; &lt;span style = "color: blue;"&gt;void&lt;/span&gt; IsSelectedWorkaround(&lt;span style = "color: blue;"&gt;this&lt;/span&gt; ListBoxItem listBoxItem)&lt;br /&gt;&lt;span style = "color: black;"&gt; 102: &lt;/span&gt;        {&lt;br /&gt;&lt;span style = "color: black;"&gt; 103: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;bool&lt;/span&gt; isSelected = listBoxItem.IsSelected;&lt;br /&gt;&lt;span style = "color: black;"&gt; 104: &lt;/span&gt;            &lt;span style = "color: blue;"&gt;bool&lt;/span&gt; &lt;span style = "color: purple;"&gt;set&lt;/span&gt; = &lt;span style = "color: blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt; 105: &lt;/span&gt;            listBoxItem.LayoutUpdated += delegate&lt;br /&gt;&lt;span style = "color: black;"&gt; 106: &lt;/span&gt;            {&lt;br /&gt;&lt;span style = "color: black;"&gt; 107: &lt;/span&gt;                &lt;span style = "color: blue;"&gt;if&lt;/span&gt; (!&lt;span style = "color: purple;"&gt;set&lt;/span&gt;)&lt;br /&gt;&lt;span style = "color: black;"&gt; 108: &lt;/span&gt;                {&lt;br /&gt;&lt;span style = "color: black;"&gt; 109: &lt;/span&gt;                    &lt;span style = "color: green;"&gt;// Toggle value to force the change&lt;/span&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt; 110: &lt;/span&gt;                    listBoxItem.IsSelected = !isSelected;&lt;br /&gt;&lt;span style = "color: black;"&gt; 111: &lt;/span&gt;                    listBoxItem.IsSelected = isSelected;&lt;br /&gt;&lt;span style = "color: black;"&gt; 112: &lt;/span&gt;                    &lt;span style = "color: purple;"&gt;set&lt;/span&gt; = &lt;span style = "color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;span style = "color: black;"&gt; 113: &lt;/span&gt;                }&lt;br /&gt;&lt;span style = "color: black;"&gt; 114: &lt;/span&gt;            };&lt;br /&gt;&lt;span style = "color: black;"&gt; 115: &lt;/span&gt;        }&lt;br /&gt;&lt;span style = "color: black;"&gt; 116: &lt;/span&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;span style = "color: black;"&gt; 118: &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;to use it just add a reference to the combobox DLL :&lt;br /&gt;&lt;strong&gt;xmlns:MyCB="clr-namespace:ComboControl;assembly=ComboControl"&lt;/strong&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;&lt;?xml:namespace prefix = mycb /&gt;&lt;mycb:johncombobox name="CB"&gt;&lt;/mycb:johncombobox&gt;&lt;br /&gt;&lt;br /&gt;populate it by :&lt;br /&gt;&lt;strong&gt;CB.TheList.Items.Add("8:00");&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;and get the selected item by calling &lt;strong&gt;GetSelected&lt;/strong&gt;&lt;br /&gt;It is rough but who cares as help is on the way and by the way if u want a good one now check out Vectorlight controls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2968848884215837799?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2968848884215837799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2968848884215837799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2968848884215837799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2968848884215837799'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/06/silverlight2-combobox.html' title='Silverlight2 ComboBox'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1939893499964221489</id><published>2008-05-14T14:21:00.000-07:00</published><updated>2008-05-14T14:23:48.344-07:00</updated><title type='text'>Windows Activation Services (WAS)</title><content type='html'>This tutorial will explain how WAS can be used to make the deployment of WCF services&lt;br /&gt;easiier.&lt;a href="http://www.sandkeysoftware.com/wcf/WASdoc/was.pdf"&gt;http://www.sandkeysoftware.com/wcf/WASdoc/was.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1939893499964221489?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1939893499964221489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1939893499964221489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1939893499964221489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1939893499964221489'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/05/windows-activation-services-was.html' title='Windows Activation Services (WAS)'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6876580000512879535</id><published>2008-05-06T05:48:00.000-07:00</published><updated>2008-05-06T05:59:55.276-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight2  on-demand'/><title type='text'>Silverlight 2 On Demand Loading Assemblys</title><content type='html'>Silverlight App as a collection of assemblys can grow large and this article explores one techinique of downloading assemblys as required to mimimize the size of the initial download and thus improve the user experience.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/ondemand/ondemand.pdf"&gt;http://www.sandkeysoftware.com/silverlight/ondemand/ondemand.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6876580000512879535?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6876580000512879535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6876580000512879535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6876580000512879535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6876580000512879535'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/05/silverlight-2-on-demand-loading.html' title='Silverlight 2 On Demand Loading Assemblys'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-5447749679803753491</id><published>2008-05-04T15:03:00.000-07:00</published><updated>2008-05-04T15:05:20.091-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='silverlight2'/><title type='text'>Reasons I am excited by Silverlight2</title><content type='html'>SL can offer us many advantages in UX development over the traditional ASP.NET/AJAX solutions:&lt;br /&gt;&lt;br /&gt;1. Silverlight simplifies the development and support process by allowing the development of a rich UX using the same server side tools that we have been fostering throughout the organization such as C#, Linq and WCF. Thus there is no need for Javascript. This is huge as it allows our developers to work in the same object-orientated patterns that they are now using in server side development. As such, they can be much more productive then using Javascript where object support is not native. It can be done using tools like Prototype, however even these do not support important OO concepts such as polymorphism. Additionally all events are handled locally in the SL client application using the same model (IObservable, INotify) that are used in WPF , the rich data binding models allows for easy two-way binding between UX elements and serialized forms of our business objects.  The same event model allows development of rich interaction between different controls on a page such as a Slider and a Chart. As a result, it is easy to deliver a highly responsive UX without the need for Javascript.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Silverlight allows developers and designers to work together. This is probably much less important for Infinite Energy but it a factor as the user expectations rise. Tools like Expression Blend can be used by the designer as the developer is working on the code in Visual Studio.&lt;br /&gt;&lt;br /&gt;3. SL is a strong subset of WPF so the application can be run on the desktop natively, if required. &lt;br /&gt;&lt;br /&gt;4. There is no need for Ajax or Viewstate making application development much simpler.&lt;br /&gt;&lt;br /&gt;5. State can be maintained on the client. There is by default a 1M Isolated storage on the client again easing the development effort. This 1M limit can be configured higher and streams read and written to the store.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6 Silverlight is cross browser so support for Mac or Linux is included and one does not&lt;br /&gt;have to fight with CSS to resolve browser differences.&lt;br /&gt;&lt;br /&gt;7. Asynchronous programming model that allows a background thread to carry out tasks while the application is freed for user interaction.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. We also must keep in mind that the development of a product is actually a small part of the lifecycle of the product as support and extensibility take much more time. Not only will SL lead to faster development time but the support and extensibility will be much less as the model and debugging tools are so much better.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Additionally there are benefits for the end-user:&lt;br /&gt;&lt;br /&gt;XAML is the Silverlight's Lingua Franca for user interface design. As it is interpreted by the .Net runtime, a much richer experience such as scalable vector graphics can be delivered then thru HTML.&lt;br /&gt;2. C# code runs magnitudes faster then Javascript/Ajax as it is compiled. This again allows for development of UX that were not possible in ASP.NET&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-5447749679803753491?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/5447749679803753491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=5447749679803753491' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5447749679803753491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/5447749679803753491'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/05/reasons-i-am-excited-by-silverlight2.html' title='Reasons I am excited by Silverlight2'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1592952902300765435</id><published>2008-04-16T17:05:00.000-07:00</published><updated>2008-05-04T14:52:37.190-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='two-way data binding'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight2'/><title type='text'>Silverlight 2 two-way data binding</title><content type='html'>Just started playing around with Silverlight 2(SL) and boy am I impressed, this stuff is very cool. SL1 was a toy as I was not interested in developing a video app but now we have a real platform that we can deliver rich cross browser appsand use one set of tools , C# ,.Net and XAML. With it we can deliver apps that can rival desktop in their usability and stillbe easily deployable. this is really a client/server solution where the logic for the app runs in the client (C#,VB,etc) anduses WCF or socket connections to get the serialized objects or XML from a service. I plan a series of articles starting with a DataGrid that employs two-way binding.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/silverlight/sl.pdf"&gt;http://www.sandkeysoftware.com/silverlight/sl.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1592952902300765435?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1592952902300765435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1592952902300765435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1592952902300765435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1592952902300765435'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/04/silverlight-2.html' title='Silverlight 2 two-way data binding'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-1039519228056474292</id><published>2008-02-18T07:28:00.000-08:00</published><updated>2008-05-07T05:35:52.954-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>Linq to XML</title><content type='html'>Discusses the new X-DOM model for XML and a Linq to XML query.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/linq/chapter5/chapter5.pdf"&gt;http://www.sandkeysoftware.com/linq/chapter5/chapter5.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-1039519228056474292?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/1039519228056474292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=1039519228056474292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1039519228056474292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/1039519228056474292'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/02/linq-to-xml.html' title='Linq to XML'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8546015299405744412</id><published>2008-02-10T07:44:00.000-08:00</published><updated>2008-05-07T05:36:39.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wcf tutorial'/><title type='text'>WCF tutorial</title><content type='html'>A beginner's start to the world of WCF.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/wcf/wcfreceipe.pdf"&gt;http://www.sandkeysoftware.com/wcf/wcfreceipe.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8546015299405744412?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8546015299405744412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8546015299405744412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8546015299405744412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8546015299405744412'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/02/wcf-tutorial.html' title='WCF tutorial'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-6672866453510315003</id><published>2008-02-04T13:48:00.000-08:00</published><updated>2008-05-07T05:37:04.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transactions'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>Linq Chapter 4 (Transactions)</title><content type='html'>&lt;a href="http://www.sandkeysoftware.com/LINQ/chapter4/transactions.pdf"&gt;http//www.sandkeysoftware.com/LINQ/chapter4/transactions.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-6672866453510315003?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/6672866453510315003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=6672866453510315003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6672866453510315003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/6672866453510315003'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/02/linq-chapter-4-transactions.html' title='Linq Chapter 4 (Transactions)'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-2914287832607569217</id><published>2008-01-27T10:47:00.000-08:00</published><updated>2008-05-07T05:37:48.783-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='n-tier web app'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>Linq Tutorial on Updating and paging in a n-tier web app</title><content type='html'>There are issues in using Linq to SQl in the disconnected Web World. This tutorial looks at these&lt;br /&gt;using the ObjectDataSource.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/LINQ/chapter3/chapter3.pdf"&gt;http://www.sandkeysoftware.com/LINQ/chapter3/chapter3.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-2914287832607569217?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/2914287832607569217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=2914287832607569217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2914287832607569217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/2914287832607569217'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/01/linq-tutorial-on-updating-and-paging-in.html' title='Linq Tutorial on Updating and paging in a n-tier web app'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-8009186405083956001</id><published>2008-01-13T13:28:00.000-08:00</published><updated>2008-05-07T05:38:15.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><title type='text'>LINQ Tutorials</title><content type='html'>It has been a long time between posts as I have real busy architecting and writing code for a great company , Infinte Energy. We are changing an organization where most of the logic was in T-SQL (honestly I had nothing to do with this) to a modern SOA . The services are all in C# and make extensive use of WCF and design patterns. One of the key moves we are making is the use of Linq and I must share my excitement. This stuff is powerful and will change how you program not just against SQL but also any collection. As such I have been developing a series of tutorials that I would like share.&lt;a href="http://www.sandkeysoftware.com/LINQ/chapter1/chapter1.pdf"&gt;http://www.sandkeysoftware.com/LINQ/chapter1/chapter1.pdf&lt;/a&gt; and&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/LINQ/chapter2/chapter2.pdf"&gt;http://www.sandkeysoftware.com/LINQ/chapter2/chapter2.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-8009186405083956001?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/8009186405083956001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=8009186405083956001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8009186405083956001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/8009186405083956001'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2008/01/it-has-been-long-time-between-posts-as.html' title='LINQ Tutorials'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-117036310423719717</id><published>2007-02-01T12:33:00.000-08:00</published><updated>2007-02-01T12:54:09.030-08:00</updated><title type='text'>Generate Getters/Setters C#</title><content type='html'>Tired of manually entering getters/setters, vsPropertyGenerator will let you generate them in bulk (not one at a time as in Class View). get it &lt;a href="http://www.adersoftware.com/index.cfm?page=vsPropertyGenerator"&gt;http://www.adersoftware.com/index.cfm?page=vsPropertyGenerator&lt;/a&gt;&lt;a href="http://www.adersoftware.com/index.cfm?page=vsPropertyGenerator"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-117036310423719717?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/117036310423719717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=117036310423719717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/117036310423719717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/117036310423719717'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2007/02/generate-getterssetters-c.html' title='Generate Getters/Setters C#'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-116110692360303984</id><published>2006-10-17T10:37:00.000-07:00</published><updated>2006-10-17T10:42:03.613-07:00</updated><title type='text'>Serialization and client side changes</title><content type='html'>This article discusses how DLinq combined with serialization can be used to persist client side changes to and from a database table.  The article also discusses use ATLAS Pagemethods when server interaction is required.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/articles/Serialization.htm"&gt;Details&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-116110692360303984?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/116110692360303984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=116110692360303984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116110692360303984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116110692360303984'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/serialization-and-client-side-changes.html' title='Serialization and client side changes'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-116109822014045952</id><published>2006-10-17T08:07:00.000-07:00</published><updated>2006-10-17T08:20:06.106-07:00</updated><title type='text'>Raising data access to the conceptual level</title><content type='html'>It seems that things are heating up at Microsoft on the Entity front as I just came across two great articles on raising data access to the conceptual level:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/data/ref/adonetnext/default.aspx?pull=/library/en-us/dnvs05/html/nxtgenda.asp"&gt;Article&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://channel9.msdn.com/Showpost.aspx?postid=202138"&gt;interview with Anders Hejlsberg &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-116109822014045952?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/116109822014045952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=116109822014045952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116109822014045952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116109822014045952'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/raising-data-access-to-conceptual.html' title='Raising data access to the conceptual level'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-116049538299656242</id><published>2006-10-10T08:44:00.000-07:00</published><updated>2006-10-17T08:07:25.950-07:00</updated><title type='text'>Developing the tennis Scoring Application</title><content type='html'>I developed this simple application to show a few of the techniques that I employ in the development of a Rich Internet application (RIA) using existing ASP.NET and browser based tools. Some of the techniques are :&lt;br /&gt;&lt;br /&gt;1. ASP.NET custom Membership provider&lt;br /&gt;2. Serializing C# objects to and from the Database and browser&lt;br /&gt;3. ATLAS to "objectize" my javascript and provide AJAX callbacks when server&lt;br /&gt;   interaction is required&lt;br /&gt;&lt;br /&gt;I will break out articles on all of the above with the first being serialization using DLinq&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-116049538299656242?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/116049538299656242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=116049538299656242' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116049538299656242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116049538299656242'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/developing-tennis-scoring-application.html' title='Developing the tennis Scoring Application'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-116042679144884035</id><published>2006-10-09T13:33:00.000-07:00</published><updated>2006-10-10T06:14:27.223-07:00</updated><title type='text'>RIA (Rich Internet Applications)</title><content type='html'>It seems that there is real interest in this area from major players. I was well aware of the OpenLazlo open source project and Adobe's Flex. Both of these platforms are aimed at this marketplace and are Flash based. Microsoft is also entering the war with its Windows Presentation Foundation/Everywhere (WPF/E). This is a browser based plug-in (read ActiveX) that will allow the deployment of most of functions provided by WPF except 3D rendering. This is really interesting move and one that I will start to play with as it is a way to write once for the desktop and the Web .Check out the following links:&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://blogs.zdnet.com/Hinchcliffe/?p=65"&gt;For an interesting discussion of RIA&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.laszlomail.com/lzmail/"&gt;For a great demo of lazlo&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-116042679144884035?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/116042679144884035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=116042679144884035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116042679144884035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/116042679144884035'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/ria-rich-internet-applications.html' title='RIA (Rich Internet Applications)'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115999400333155369</id><published>2006-10-04T13:30:00.000-07:00</published><updated>2006-10-04T13:38:57.060-07:00</updated><title type='text'>Javascript objects</title><content type='html'>It is possible to simulate objects in Javascript in a number of ways, this article discusses 2 approaches. &lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/articles/JavascriptObjects.htm"&gt;Details&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115999400333155369?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115999400333155369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115999400333155369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115999400333155369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115999400333155369'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/javascript-objects.html' title='Javascript objects'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115989425845775669</id><published>2006-10-03T09:46:00.000-07:00</published><updated>2006-10-03T09:57:21.763-07:00</updated><title type='text'>Database Provider Membership Provider</title><content type='html'>This article shows how to abstract the database layer for a ASP.NET 2.0 Membership Services provider. this technique can be used in lieu of individual providers for each database access method. This article discusses DLinq and Dataset provider although I also have a nHibernate one too.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/articles/Provider.htm"&gt;Details&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115989425845775669?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115989425845775669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115989425845775669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115989425845775669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115989425845775669'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/10/database-provider-membership-provider.html' title='Database Provider Membership Provider'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115886291534221026</id><published>2006-09-21T11:21:00.000-07:00</published><updated>2006-09-23T07:37:43.326-07:00</updated><title type='text'>CSS menus</title><content type='html'>There are many solutions to implementing menus including built in ASP.NET controls and those from vendors such as Telerik and ComponentOne. I worked with the Telerik controls on my last project and was mostly impressed although they have issues like ever one else. I then checked out ComponentOne, I only looked at briefly as my ISP (Discount.asp) offered free access to their WebMenus and tree. I was not nearly as impressed by their offering and as a result started my search for an alternative .I came across a really interesting solution at &lt;a href="http://alistapart.com/articles/dropdowns/"&gt;http://alistapart.com/articles/dropdowns/&lt;/a&gt;.&lt;br /&gt;the solution and article is good and points out the big problem is making this stuff work in CSS is IE. Other browsers such as Firefox have a .hover class that will work on any element. Alas , good old IE with its 90% share only does on links. The solution offered in is this article runs Javascript that adds an .over class to each element in our menu block. It then alters the CSS as follows:&lt;br /&gt;li:hover ul{ display: block; } becomes:&lt;br /&gt;li:hover ul, li.over ul{ display: block; }&lt;br /&gt;Now the CSS menus work in IE if we only want a single level of subnavigation but I was not able to make them work with multiple levels of subnavigation . Then I found a great solution at &lt;a href="http://www.xs4all.nl/~peterned/csshover.html"&gt;http://www.xs4all.nl/~peterned/csshover.html&lt;/a&gt;. This solution has an impressive piece of Javascript that the author wisely attaches as a behavior in the iefixes.css file as follows:&lt;br /&gt;body{ behavior: url(/CSS/csshover.htc);&lt;br /&gt;I like this as only dumb old IE will recognize the behavior and it is the only browser that needs the script. Hopefully with IE7 much of this nonsense will disappear as IE will move in line with standards. He solves the multiple level problem by using CSS specificity and here I quote"Every CSS rule has a certain &lt;a href="http://www.w3.org/TR/CSS2/cascade.html#specificity"&gt;specificity&lt;/a&gt;, which defines whether or not it overrules others. The higher the specificity of a rule, the more important it becomes. This specificity is calculated simply by counting the occurrences of ids, (pseudo-)classes and attribute selectors, and node names". This concept is used to hide submenus that don't need to be visible just yet, and only show them when needed later on. Very nice !&lt;br /&gt;However it seems that some folks in Redmond have been reading the same information as they have come out with CSS adapters that will do the same thing as I was trying to accomplish &lt;a href="http://www.asp.net/CSSAdapters/Default.aspx"&gt;http://www.asp.net/CSSAdapters/Default.aspx&lt;/a&gt;. the track that I was on would have worked nicely but Microsoft is doing the same thing with these adapters although the implementation is a little more complex than mine and handling the support for the code. I always choose the solution that puts the least work on me as in the end support and change are too biggest problems. The menus for my website were implemented using these and I like the result. The only problem that I have is that it is not easy to add client-side events to the menu items. there are times when one might want to handle the mouse click in javascript instead of Posting back (or firing a Page method event).&lt;br /&gt;&lt;br /&gt;      In my role as a consultant I try and convince my client to buy the Telerik controls are they really are the best solution I could find but as a fallback these CSS Adapters are almost as good. Of course there are many other controls in the Telerik set that are extremely useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115886291534221026?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115886291534221026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115886291534221026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115886291534221026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115886291534221026'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/css-menus.html' title='CSS menus'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115790484643787470</id><published>2006-09-10T08:06:00.000-07:00</published><updated>2006-09-10T09:32:21.113-07:00</updated><title type='text'>Javascript THIS keyword</title><content type='html'>Javascript is "kindof object orientated" and as a result&lt;strong&gt; this&lt;/strong&gt; always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of. When we define our function FOO() in a page, its owner is the page, or more specifically the window object (or global object) of JavaScript. An onclick property, though, is owned by the HTML element it belongs to. so if we want to change the class of an element with a mouseover event handler that looks like :&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;function function1(obj)&lt;br /&gt;{&lt;br /&gt;obj.className+=" over";&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;then over element's inline definition must look like :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&amp;lt;li onmouseover=function1(this)&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if it written as :&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&amp;lt;li onmouseover=function1&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;then &lt;strong&gt;obj&lt;/strong&gt; will point to the window object&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115790484643787470?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115790484643787470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115790484643787470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115790484643787470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115790484643787470'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/javascript-this-keyword.html' title='Javascript THIS keyword'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115772470451715178</id><published>2006-09-08T07:08:00.000-07:00</published><updated>2006-09-08T07:15:24.373-07:00</updated><title type='text'>IE only markup</title><content type='html'>The following technique will allow the inclusion of IE only markup:&lt;br /&gt;&lt;br /&gt;&amp;lt!--[if IE&amp;gt&lt;br /&gt;&amp;ltlink href="IEFixes.css" type="text/css" rel="stylesheet"&amp;gt&lt;br /&gt;&amp;lt![endif]--&amp;gt&lt;br /&gt;&lt;br /&gt;Thus if this is Firefix the line is not included.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115772470451715178?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115772470451715178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115772470451715178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115772470451715178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115772470451715178'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/ie-only-markup.html' title='IE only markup'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115747825107403523</id><published>2006-09-05T10:17:00.000-07:00</published><updated>2006-09-05T10:54:21.963-07:00</updated><title type='text'>Element IDs in  Controls and Masterpages</title><content type='html'>If one has a standalone page that contains code using element ID such as&lt;br /&gt;var find = idText1.value;&lt;br /&gt;then you might be surprised to have this code break when it is contained in a Control or a MasterPage as the ID is of the now of the form:&lt;br /&gt;CTL1:idText1&lt;br /&gt;ASP.NET is ensuring that the id is unique as there might be multiple occurances on the composite page. the solution is to define a server variable as follows:&lt;br /&gt;&lt;strong&gt;var find = "&amp;lt;%= idText1.ClientID%&amp;gt;&lt;/strong&gt;&lt;br /&gt;now find will be resolved to whatever depth of controls the page is contained in .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115747825107403523?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115747825107403523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115747825107403523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115747825107403523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115747825107403523'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/element-ids-in-controls-and.html' title='Element IDs in  Controls and Masterpages'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115747551401192685</id><published>2006-09-05T09:43:00.000-07:00</published><updated>2006-09-05T09:58:34.100-07:00</updated><title type='text'>Javascript</title><content type='html'>It is impossible to produce a "rich" client that minimizes Postbacks without extensive Javascript. I know that ATLAS can assist in the client side development with attribute based development but there is no subsitute for Javascript knowledge. Writing Javascript is dead easy especially if you are C# kind of person as they have the same roots in C. I also feel that it is important to write the Javascript in as "object way" as possible and there are several ways of doing this. I will explore a couple of alternatives later. One should be armed with a couple of development aids :&lt;br /&gt;&lt;br /&gt;&lt;p&gt; 1. VS 2005 &lt;strong&gt;breakpoints &lt;/strong&gt;can be inserted in script code by :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;placing 'debugger;" statements in the script code which will enable breakpoints (IE only)&lt;/li&gt;&lt;li&gt;making sure that the IE Tools.Internet Options.Advanced "Disable Script Debugging (Internet Explorer) is off&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;2. Deploy toolset like Nikhil Kothari's Web Developer helper a BHO that one can download at  &lt;a href="http://www.nikhilk.net/Project.WebDevHelper.aspx"&gt;http://www.nikhilk.net/Project.WebDevHelper.aspx&lt;/a&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115747551401192685?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115747551401192685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115747551401192685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115747551401192685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115747551401192685'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/javascript.html' title='Javascript'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33103276.post-115739437819820289</id><published>2006-09-04T11:23:00.000-07:00</published><updated>2006-09-04T11:29:38.916-07:00</updated><title type='text'>Provider Pattern (TableAdapter and NHibernate)</title><content type='html'>Now that I have you totally confused as to which option is the best I present the Provider Pattern that will allow you to defer your decision .&lt;br /&gt;&lt;a href="http://www.sandkeysoftware.com/articles/Provider Pattern.htm"&gt;Details&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33103276-115739437819820289?l=jmcfetridge.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jmcfetridge.blogspot.com/feeds/115739437819820289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33103276&amp;postID=115739437819820289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115739437819820289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33103276/posts/default/115739437819820289'/><link rel='alternate' type='text/html' href='http://jmcfetridge.blogspot.com/2006/09/provider-pattern-tableadapter-and.html' title='Provider Pattern (TableAdapter and NHibernate)'/><author><name>jmcfet</name><uri>http://www.blogger.com/profile/08449835986141513388</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
