<?xml version="1.0" encoding="us-ascii"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><lastBuildDate>Sat, 04 Jul 2009 21:17:36 GMT</lastBuildDate><atom:link href="http://www.fwicki.com/rss/agencijanet10/it-blogi" rel="self" type="application/rss+xml" /><ttl>24</ttl><title>IT blogi</title><link>http://www.fwicki.com/fwickis/agencijanet10/IT-blogi</link><generator>Fwicki.Com - Fwicki Feed Generator</generator><language>en-us</language><image><url>http://www.fwicki.com/images/ui/feed-link.png</url><title>Fwicki - RSS Management</title><link>http://www.fwicki.com/fwickis/agencijanet10/IT-blogi</link><description>Fwicki - RSS Management</description><width>88</width><height>90</height></image><item><title>Novo spletno mesto Microsoft Security</title><link>http://blogs.technet.com/slitpro/archive/2009/07/02/novo-spletno-mesto-microsoft-security.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/07/02/novo-spletno-mesto-microsoft-security.aspx676</guid><description>&lt;p&gt;Microsoft je temeljito prenosvil spletno stran &lt;a title="http://www.microsoft.com/security/" href="http://www.microsoft.com/security/"&gt;http://www.microsoft.com/security/&lt;/a&gt;, ki ponuja vse tehni?ne in splo?ne informacije na temo varnosti.&lt;/p&gt;  &lt;p&gt;Nove funkcionalnosti strani vklju?ujejo:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;novi design celotne strani&lt;/li&gt;    &lt;li&gt;ve? mo?nosti in la?je iskanje po vsebini&lt;/li&gt;    &lt;li&gt;preprostej?a navogacija&lt;/li&gt;    &lt;li&gt;vsebina je razdeljena glede na uporabnike, IT strokovnjake, razvijalce in poslovne obiskovalce&lt;/li&gt;    &lt;li&gt;opcija ?Share it? na straneh ?lankov&lt;/li&gt;    &lt;li&gt;naro?anje na novice preko RSS&lt;/li&gt;    &lt;li&gt;novo Bing iskanje&lt;/li&gt;    &lt;li&gt;in ?e precej drugih novosti.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Obi??ite &lt;a href="http://www.microsoft.com/security/" target="_blank"&gt;Microsoft Security&lt;/a&gt; strani in poskrbite za varnost v va?em omre?ju.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Matja?&lt;/em&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3260650" width="1" height="1"&gt;</description><category>najave,splet</category><pubDate>Thu, 02 Jul 2009 07:41:06 GMT</pubDate></item><item><title>RSS Management</title><link>http://www.fwicki.com/</link><guid>http://www.fwicki.com/2</guid><description>&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;&lt;b&gt;Sponsored Links:&lt;/b&gt;&lt;/div&gt;
&lt;table width="850" border="0" cellpadding="0" cellspacing="0"&gt;
  &lt;tr&gt;
    &lt;td width="272"&gt;&lt;a href="http://www.supplydiabetic.com/diabetic-recipes/diabetes-diet" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Diabetes Diet&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;td width="219"&gt;&lt;a href="http://www.fwicki.com/fwickis/New-York-City/NYC-Custom-Jewelry-and-Wedding-Rings" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Custom Wedding Bands&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;td width="181"&gt;&lt;/td&gt;
  &lt;td width="178"&gt;&lt;a href="http://www.fwicki.com/fwickis/Environmental-Green-Interior-Design-and-Decorating/Green-Interior-Design" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Green Interior Design&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;a href="http://www.fwicki.com/fwickis/Toronto-Ontario-Executive-Recruiting-Firms/Toronto-Executive-Recruiter-Candidate-Placement-Consulting" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Executive Recruiter Consulting Toronto&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;td width="219"&gt;&lt;a href="http://www.fwicki.com/fwickis/Commercial-Residential-Cleaning-Services-Fredericksburg-Virginia/Janitorial-Cleaning-Services-Commercial-Residential-Fredericksburg-Virginia" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Janitorial Services Fredericksburg&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;td width="181"&gt;&lt;a href="http://www.fwicki.com/fwickis/ESD-Electrostatic-Discharge-Static-Electricity/ESD-Static-Electricity-Control" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Static Electricity Control&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;td width="178"&gt;&lt;div&gt;&lt;a href="http://www.attorney-lawyer-directory.com" target="_blank"&gt;&lt;div style="text-align: left; font-family: Calibri, Verdana, Arial; font-size: .70em; font-weight: bold;"&gt;Legal Information&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;br /&gt;
&lt;table width="800"  border="0" cellpadding="2"&gt;
  &lt;tr&gt;
    &lt;td width="90"&gt;&lt;a href="http://www.twitter.com/Fwicki" target="_blank" rel="nofollow"&gt;&lt;img src="http://www.fwicki.com/images/corporate/twitter-bird.png" alt="Follow Fwicki on Twitter" width="72" height="86" border="0" title="Follow Fwicki on Twitter"&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;td width="301"&gt;&lt;strong&gt;** &lt;/strong&gt;&lt;a href="http://www.twitter.com/Fwicki" target="_blank"&gt;&lt;strong&gt;Follow Fwicki on Twitter&lt;/strong&gt;&lt;/a&gt; &lt;/td&gt;
  &lt;td width="389"&gt;&lt;center&gt;&lt;a href="http://www.idetonate.com/default.aspx?f=1" target="_blank" rel="nofollow"&gt;&lt;img src="http://www.fwicki.com/images/ui/iphone_banner.jpg" alt="iDetonate - iPhone Antics Application - Available Now!" title="iDetonate - iPhone Antics Application - Available Now!" width="234" height="60" border="0"&gt;&lt;/a&gt;&lt;/center&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;</description><category>Technology</category><pubDate>Sat, 04 Jul 2009 21:17:48 GMT</pubDate></item><item><title>Mark Minasi in David Chappell malo drugace</title><link>http://blogs.technet.com/slitpro/archive/2009/06/08/mark-minasi-in-david-chappell-malo-druga-e.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/08/mark-minasi-in-david-chappell-malo-druga-e.aspx678</guid><description>&lt;p&gt;V okviru leto?nje &lt;a href="http://www.ntk.si/"&gt;NT Konference&lt;/a&gt; sem imel mo?nost (sre?o) pre?iveti kar nekaj ?asa z &lt;a href="http://www.minasi.com"&gt;Markom Minasijem&lt;/a&gt; in &lt;a href="http://www.davidchappell.com/"&gt;Davidom Chappellom&lt;/a&gt;. Govorim o ?asu, ko nista na odru, kjer bolj ali manj naredita ?performance? kot bi ga ?eleli znati tudi mi, ampak smo si v nedeljo pred konferenco vzeli ?as za spoznavanje Slovenije.&lt;/p&gt;  &lt;p&gt;Oba sta kalibra svetovnega formata in nisem bil prepri?an kaj naj pri?akujem od njiju. Bosta tak?na kot mi (?navadni smrtniki?) ali pa ?ivita svojo slavo tudi v zasebnem ?ivljenju? Po 10 minutah z njima je postalo jasno, da sta oba iz mesa in krvi in sta odli?na sogovornika na raznih podro?jih Od tega kje se dobi najbolj?a pica (v Sloveniji so odli?ne, ?eprav Mark zase trdi da dela najbolj?o) do tega kako postati dober govorec. Glavna skrivnost dobrega govorca je zelo enostavna - temeljita priprava, vaja ter kilometrina. In tu se oba vsekakor bistveno razlikujeta od ob?asnih predavateljev kakr?en sem tudi sam.&lt;/p&gt;  &lt;p&gt;Sicer smo obiskali smo Postojnsko jamo in oba sta bila navdu?ena, Enako se je zgodili tudi v Piranu, Kortah ter Se?oveljskih solinah. Tako sem prepri?an, da se bosta z veseljem vrnila v Slovenijo. Ko sem pogledal ocene predavanj mislim, da ju bomo ?e kdaj povabili.&lt;/p&gt;  &lt;p&gt;?e en Davidov ?ivljenjski nasvet: ?e ?elite uspeti in zvi?ati svoj standard je potrebno z leti prehajati iz tehni?nega proti poslovnemu svetu. Pravi, da je malo ljudi, ki so lahko na tehni?nem podro?ju (finan?no) zelo uspe?ni. Se mi zdi, da ima kar prav (pa tudi sam ?ivi tako).&lt;/p&gt;  &lt;p&gt;Toma?&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3252083" width="1" height="1"&gt;</description><category>dogodki</category><pubDate>Mon, 08 Jun 2009 20:06:57 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #6: System colors</title><link>http://feedproxy.google.com/~r/TheAttic/~3/oa6cKmhXImU/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/oa6cKmhXImU/post.aspx679</guid><description>&lt;p&gt;With Silverlight 3, we now have access to system colors. If you need your new application to visually fit into the operating system it?s running on, simply inspect one of the static properties, provided by the new &lt;em&gt;SystemColors&lt;/em&gt; class ? System.HighlightColor for example, will tell you what color is used for highlighting the selection in ListBoxes.&lt;/p&gt;  &lt;p&gt;The provided example (below) will enumerate all available system colors and display them on the screen. To test it, go to your Control Panel and change the color scheme, then restart the application.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://tozon.info/images/blog/CountdowntoSilverlight36SystemColors_14BC9/image.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/CountdowntoSilverlight36SystemColors_14BC9/image_thumb.png" width="254" height="143" /&gt;&lt;/a&gt; &lt;a href="http://tozon.info/images/blog/CountdowntoSilverlight36SystemColors_14BC9/image_3.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/CountdowntoSilverlight36SystemColors_14BC9/image_thumb_3.png" width="254" height="145" /&gt;&lt;/a&gt;     &lt;br /&gt;Windows Aero vs. High Contrast Black&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Additional reading    &lt;br /&gt;&lt;a title="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/29/silverlight-3-system-colours.aspx" href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/29/silverlight-3-system-colours.aspx"&gt;http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/29/      &lt;br /&gt;silverlight-3-system-colours.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/systemcolors.html" target="_blank"&gt;Run the sample online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/06/30/Countdown-to-Silverlight-3-6-System-colors.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/06/30/Countdown-to-Silverlight-3-6-System-colors.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=oa6cKmhXImU:y15EC7uGgMI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=oa6cKmhXImU:y15EC7uGgMI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=oa6cKmhXImU:y15EC7uGgMI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=oa6cKmhXImU:y15EC7uGgMI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=oa6cKmhXImU:y15EC7uGgMI:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/oa6cKmhXImU" height="1" width="1"/&gt;</description><category>Development,Silverlight</category><pubDate>Tue, 30 Jun 2009 21:59:25 GMT</pubDate></item><item><title>Pogled v prihodnost - Microsoft Office Labs vision 2019</title><link>http://blogs.technet.com/slitpro/archive/2009/06/30/pogled-v-prihodnost-microsoft-office-labs-vision-2019.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/30/pogled-v-prihodnost-microsoft-office-labs-vision-2019.aspx680</guid><description>&lt;p&gt;Skupina vizionarjev v Microsoft Labs je razvila in pripravila video, ki prikazuje njihov pogled na digitalni svet v letu 2019. Poudarek je predvsem na napravah na dotik, konstantni povezljivosti in tehnologiji, ki obljublja bogato digitalno izku?njo.&lt;/p&gt;  &lt;p&gt;Oglejte si video &lt;strong&gt;A Glimpse Ahead Microsoft Office Labs vision 2019&lt;/strong&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c3500d86-f9b1-469d-bc93-40b34d541d58" class="wlWriterSmartContent"&gt;&lt;div id="b9c3ac61-598d-46e5-a214-0ace80d1b480" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=jkTsZUzCkcI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;" target="_new"&gt;&lt;img src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/PogledvprihodnostMicrosoftOfficeLabsvisi_DA99/videod70300a7bc05.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('b9c3ac61-598d-46e5-a214-0ace80d1b480'); downlevelDiv.innerHTML = &amp;quot;&amp;lt;div&amp;gt;&amp;lt;object width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;param name=\&amp;quot;movie\&amp;quot; value=\&amp;quot;http://www.youtube.com/v/jkTsZUzCkcI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&amp;amp;hl=en\&amp;quot;&amp;gt;&amp;lt;\/param&amp;gt;&amp;lt;embed src=\&amp;quot;http://www.youtube.com/v/jkTsZUzCkcI&amp;amp;hl=en&amp;amp;fs=1&amp;amp;&amp;amp;hl=en\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;\/embed&amp;gt;&amp;lt;\/object&amp;gt;&amp;lt;\/div&amp;gt;&amp;quot;;" alt=""&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;em&gt;Na zanimivo prihodnost!     &lt;br /&gt;Matja? ?ircelj&lt;/em&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3259969" width="1" height="1"&gt;</description><category>spletne oddaje,splet</category><pubDate>Tue, 30 Jun 2009 13:32:44 GMT</pubDate></item><item><title>Datumi prihoda Windows 7 in Windows Server 2008 R2 so znani</title><link>http://blogs.technet.com/slitpro/archive/2009/06/03/datumi-prihoda-windows-7-in-windows-server-2008-r2-so-znani.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/03/datumi-prihoda-windows-7-in-windows-server-2008-r2-so-znani.aspx681</guid><description>&lt;p&gt;Kot verjetno ?e veste, bosta Windows 7 in Windows Server 2008 R2&amp;#160; RTM iz?la isto?asno. Razvoj bo zaklju?en v drugi polovici julija 2009 (RTM ? release to manufacturing).&lt;/p&gt;  &lt;p&gt;Splo?na dobavljivost za oba izdelka je na?rtovana za 22. oktober 2009. Ve? si lahko ogledate na produktnih blogih:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Windows Server Blog: &lt;a href="http://blogs.technet.com/windowsserver/"&gt;http://blogs.technet.com/windowsserver/&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Windows Team Blog: &lt;a href="http://windowsteamblog.com/blogs/windows7/archive/2009/06/02/the-date-for-general-availability-ga-of-windows-7-is.aspx"&gt;http://windowsteamblog.com/blogs/windows7/archive/2009/06/02/the-date-for-general-availability-ga-of-windows-7-is.aspx&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Sedaj pa le pridno testirajte &lt;a href="http://www.microsoft.com/windows/windows-7/download.aspx"&gt;Windows 7 RC&lt;/a&gt; in &lt;a href="http://www.microsoft.com/windowsserver2008/en/us/R2.aspx"&gt;Windows Server 2008 R2 RC&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Toma?&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3249689" width="1" height="1"&gt;</description><category>Windows 7,Windows Server 2008 R2</category><pubDate>Wed, 03 Jun 2009 07:13:03 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #5: ChildWindow (Modal, Non-modal, Templated)</title><link>http://feedproxy.google.com/~r/TheAttic/~3/z1EADU_GqxM/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/z1EADU_GqxM/post.aspx682</guid><description>&lt;p&gt;There are many controls being introduced in Silverlight 3; a lot of them were pulled from the &lt;a href="www.codeplex.com/silverlight" target="_blank"&gt;Silverlight Toolkit&lt;/a&gt; (the idea is that for every new Silverlight version, Toolkit controls marked as stable are moved to the Silverlight core. I?m not sure how many new controls I?m going to cover in this series, but the ChildWindow definitely deserves a separate post and sample.&lt;/p&gt;  &lt;p&gt;ChildWindow is a special control, which behaves like a dialog. By default, it is set up to display itself as a modal dialog and can be easily re-templated to give it a new look (included in the sample below).&lt;/p&gt;  &lt;p&gt;There are three steps required to make the ChildWindow display as a non-modal (floating) window:&lt;/p&gt;  &lt;p&gt;1. Create a copy of the default template and get rid of all animations, referencing the Overlay element. The overlay covers all area ?behind? the child window and makes it look disabled. If you remove the Overlay element itself, the window will not be centered on the screen when invoked, so it?s best to keep it in, but somehow hide it.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;blockquote&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Overlay&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/blockquote&gt;
&lt;/div&gt;

&lt;p&gt;&lt;em&gt;2. This is a hack.&lt;/em&gt; ChildWindow disables the root element when invoked so you have to re-enable it when window is shown:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;div&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;Control root = Application.Current.RootVisual &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Control;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (root != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;    root.IsEnabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;
  &lt;/div&gt;

  &lt;div&gt;
    &lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;3. This is a hack. &lt;/em&gt;ChildWindow also takes control of re-focusing the window when the root control gains the focus so we have to hack into the ChildWindow?s LostFocus event to take care of this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;div id="codeSnippetWrapper"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnLostFocus(RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    LostFocus -= Delegate.CreateDelegate(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(RoutedEventHandler), &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;,&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #006080"&gt;&amp;quot;ChildWindow_LostFocus&amp;quot;&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; RoutedEventHandler;&lt;br /&gt;}&lt;/pre&gt;

    &lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Additional reading: 
  &lt;br /&gt;&lt;a title="http://timheuer.com/blog/archive/2009/05/10/silverlight-childwindow-non-modal-refactor.aspx" href="http://timheuer.com/blog/archive/2009/05/10/silverlight-childwindow-non-modal-refactor.aspx"&gt;http://timheuer.com/blog/archive/2009/05/10/silverlight-childwindow-non-modal-refactor.aspx&lt;/a&gt; (a better approach to non-modal window, also read the comments)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tozon.info/sl3/childwindow.html" target="_blank"&gt;Run the sample below&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code below: 
  &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/06/29/Countdown-to-Silverlight-3-5-ChildWindow-(Modal-Non-modal-Templated).aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/06/29/Countdown-to-Silverlight-3-5-ChildWindow-(Modal-Non-modal-Templated).aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=z1EADU_GqxM:b2YNnIgDRI0:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=z1EADU_GqxM:b2YNnIgDRI0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=z1EADU_GqxM:b2YNnIgDRI0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=z1EADU_GqxM:b2YNnIgDRI0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=z1EADU_GqxM:b2YNnIgDRI0:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/z1EADU_GqxM" height="1" width="1"/&gt;</description><category>Development,Silverlight</category><pubDate>Mon, 29 Jun 2009 20:27:22 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #4: Element binding</title><link>http://feedproxy.google.com/~r/TheAttic/~3/-aeI0YVgGMw/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/-aeI0YVgGMw/post.aspx683</guid><description>&lt;p&gt;Binding to elements is yet another feature, known to WPF-ers since v1. Silverlight 3 now allows bindings between UI elements and their properties, without having to use other classes as a workaround. There are numerous cases of when to use such binding, mostly to automate user interface, starting from the basic example of connecting a TextBox to a Slider (also included in the sample below). The interesting point to this binding is that it also works two-way: the TextBox not only displays the current value of the Slider, entering a new value also updates the Slider. &lt;/p&gt;  &lt;p&gt;To make the sample a bit more interesting, I included a new kind of panel, which stores the current mouse coordinates when moving it over the panel. I added two TextBoxes and bound them to the panel to display these coordinates. There?s also an ellipse, which? well, see for yourself ;)&lt;/p&gt;  &lt;p&gt;Additional Reading   &lt;br /&gt;&lt;a title="http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2009/06/24/From-Silverlight-in-Action-2nd-Edition_3A00_-UI-Element-Binding.aspx" href="http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2009/06/24/From-Silverlight-in-Action-2nd-Edition_3A00_-UI-Element-Binding.aspx"&gt;http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2009/06/24/     &lt;br /&gt;From-Silverlight-in-Action-2nd-Edition_3A00_-UI-Element-Binding.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Run the sample online&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/06/29/Countdown-to-Silverlight-3-4-Element-binding.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/06/29/Countdown-to-Silverlight-3-4-Element-binding.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=-aeI0YVgGMw:DjR8T9cA48c:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=-aeI0YVgGMw:DjR8T9cA48c:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=-aeI0YVgGMw:DjR8T9cA48c:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=-aeI0YVgGMw:DjR8T9cA48c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=-aeI0YVgGMw:DjR8T9cA48c:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/-aeI0YVgGMw" height="1" width="1"/&gt;</description><category>Silverlight,Development</category><pubDate>Mon, 29 Jun 2009 20:26:07 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #3: Merged resource dictionaries</title><link>http://feedproxy.google.com/~r/TheAttic/~3/gyJDNd5gpto/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/gyJDNd5gpto/post.aspx684</guid><description>&lt;p&gt;Coming from the WPF world, finding out that Silverlight lacked the feature of distributing application resources among separate files was one of those kick in a head moments. Well, not anymore. Silverlight 3, like its big brother WPF, now supports partitioning resources through merged dictionaries.&lt;/p&gt;  &lt;p&gt;Merged resource dictionaries can be included as external files (build action = Content), as included resources (build action = Resource), or as referenced assembly resources (e.g. theming).&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Application.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary.MergedDictionaries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Themes/Theme1.xaml&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Themes/Theme2.xaml&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary.MergedDictionaries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Application.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Merged resource dictionaries come in useful when:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;providing different themes for the application (like in the sample below) &lt;/li&gt;

  &lt;li&gt;providing a new style/template for existing control &lt;/li&gt;

  &lt;li&gt;providing a style/template for a custom control &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="tozon.info/sl3/mergedresourcedictionaries.html" target="_blank"&gt;Run the sample online&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code below: 
  &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=gyJDNd5gpto:raMD4qzxGsQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=gyJDNd5gpto:raMD4qzxGsQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=gyJDNd5gpto:raMD4qzxGsQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=gyJDNd5gpto:raMD4qzxGsQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=gyJDNd5gpto:raMD4qzxGsQ:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/gyJDNd5gpto" height="1" width="1"/&gt;</description><category>Silverlight,Development</category><pubDate>Sun, 28 Jun 2009 14:57:33 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #2: Setting styles</title><link>http://feedproxy.google.com/~r/TheAttic/~3/Z4fx8WX8dEU/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/Z4fx8WX8dEU/post.aspx685</guid><description>&lt;p&gt;Silverlight 3 is introducing a small, but very powerful feature: styles in Silverlight 3 can be set multiple times! For example, executing the following code in Silverlight 2 will throw a ?catastrophic failure? exception on the second line:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;textBox.Style = Application.Current.Resources[&lt;span style="color: #006080"&gt;&amp;quot;TextBoxStyle&amp;quot;&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Style;&lt;br /&gt;textBox.Style = Application.Current.Resources[&lt;span style="color: #006080"&gt;&amp;quot;TextBoxStyle&amp;quot;&lt;/span&gt;] &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Style;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Silverlight 3, on the other hand, won?t have any problems with setting control?s style the second, third or n-th time, if required.&lt;/p&gt;

&lt;p&gt;To reset a control?s style, one can simply set it to null:&lt;/p&gt;

&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;textBox.Style = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

&lt;p&gt;? or assign an empty style to it:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;EmptyTextBoxStyle&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TextBox&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;&lt;a href="http://tozon.info/sl3/stylesetter.html" target="_blank"&gt;Run the sample online&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Source code below: 
  &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Z4fx8WX8dEU:xPu9hCXi9dM:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Z4fx8WX8dEU:xPu9hCXi9dM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Z4fx8WX8dEU:xPu9hCXi9dM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Z4fx8WX8dEU:xPu9hCXi9dM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Z4fx8WX8dEU:xPu9hCXi9dM:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/Z4fx8WX8dEU" height="1" width="1"/&gt;</description><category>Development,Silverlight</category><pubDate>Sat, 27 Jun 2009 21:53:51 GMT</pubDate></item><item><title>Countdown to Silverlight 3 #1: Out of Browser applications</title><link>http://feedproxy.google.com/~r/TheAttic/~3/Sn2TQb-DQCI/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/Sn2TQb-DQCI/post.aspx686</guid><description>&lt;p&gt;With Silverlight 3 knocking on the door (&lt;a href="http://arstechnica.com/microsoft/news/2009/05/silverlight-3-and-expression-studio-3-launching-july-10.ars" target="_blank"&gt;July 10?&lt;/a&gt;) it?s time to offload my Silverlight 3 examples. Not that they would show anything new (since SL3 Beta got out, new features had been demoed by various people to the death), it?s just another perspective or a way to go public with a sample code that?s been piling up on my desktop since the Beta was released. Anyway, this will be in a form of short posts with provided test page and sample code.&lt;/p&gt;  &lt;p&gt;I?ll begin with probably the most talked about new feature ? Out of Browser applications, which could also be referred to as installed applications.&lt;/p&gt;  &lt;p&gt;First of ? not every Silverlight application can be installed on the client machine. The developer must enable this by adding a &lt;em&gt;&amp;lt;Deployment.Application&amp;gt;&lt;/em&gt; section to the application manifest (&lt;em&gt;AppManifest.xml&lt;/em&gt;). This section provides more information about the application (name, title, description), along with optional icons in a few different sizes, which are used for branding your application and are displayed on various places on the desktop (install dialog, application shortcut, title bar, ?)&lt;/p&gt;  &lt;p&gt;Alternative way to installing the application (a common way is to install it through the Silverlight application right-click context menu) is to provide the user with a button of some sort, which would call the new &lt;em&gt;Application.Current.Detach() &lt;/em&gt;method when clicked. Note that the method requires an explicit user action to succeed; calling it on the application load or perhaps inside a timer tick event should fail with the exception.&lt;/p&gt;  &lt;p&gt;There?s the &lt;em&gt;Application.Current.ExecutionState&lt;/em&gt; property telling the installation state of the application. Possible values include &lt;em&gt;RunningOnline&lt;/em&gt; (not installed, the default), &lt;em&gt;Detaching&lt;/em&gt;, &lt;em&gt;Detached&lt;/em&gt;, &lt;em&gt;DetachedUpdatesAvailable&lt;/em&gt; and DetachFailed (for describing various installed/ing states).&lt;/p&gt;  &lt;p&gt;When installed, the application can be run as before, inside the browser, or, by calling it through a created shortcut (start menu, desktop), outside the browser. Inspecting the &lt;em&gt;Application.Current.RunningOffline&lt;/em&gt; property will tell you how the application was run.&lt;/p&gt;  &lt;p&gt;To check if application is connected to the network, there?s the &lt;em&gt;NetworkInterface.GetIsNetworkAvailable()&lt;/em&gt; method, returning a simple true or false. Remember that being connected to the network doesn?t mean application has access to the internet, and certainly doesn?t imply that a network resource or a service application wants to call is accessible at all.&lt;/p&gt;  &lt;p&gt;One last thing to mention is that Out of Browser application still run in a partial trust, the same security context as it would when run inside the browser. The isolated storage quota, however, increases to 25MB when application gets installed.&lt;/p&gt;  &lt;p&gt;Additional reading   &lt;br /&gt;&lt;a title="http://timheuer.com/blog/archive/2009/03/18/silverlight-3-offline-update-framework.aspx" href="http://timheuer.com/blog/archive/2009/03/18/silverlight-3-offline-update-framework.aspx"&gt;http://timheuer.com/blog/archive/2009/03/18/silverlight-3-offline-update-framework.aspx&lt;/a&gt;    &lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/magazine/dd882515.aspx" href="http://msdn.microsoft.com/en-us/magazine/dd882515.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd882515.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/outofbrowser.html" target="_blank"&gt;Run the sample online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:   &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/06/26/Countdown-to-Silverlight-3-1-Out-of-Browser-applications.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/06/26/Countdown-to-Silverlight-3-1-Out-of-Browser-applications.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Sn2TQb-DQCI:LIYn4UtePsA:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Sn2TQb-DQCI:LIYn4UtePsA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Sn2TQb-DQCI:LIYn4UtePsA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Sn2TQb-DQCI:LIYn4UtePsA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Sn2TQb-DQCI:LIYn4UtePsA:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/Sn2TQb-DQCI" height="1" width="1"/&gt;</description><category>Silverlight,Development</category><pubDate>Fri, 26 Jun 2009 08:48:59 GMT</pubDate></item><item><title>Pohitite z nadgradnjo na Windows 7 RC</title><link>http://blogs.technet.com/slitpro/archive/2009/06/24/pohitite-z-nadgradnjo-na-windows-7-rc.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/24/pohitite-z-nadgradnjo-na-windows-7-rc.aspx687</guid><description>&lt;p&gt;Vsi, ki ste si Windows 7 namestili ?e v Beta fazi, pohitite in nadgradite razli?ico na Release Candidate. S &lt;strong&gt;&lt;u&gt;&lt;font color="#000080" size="3"&gt;1. julijem Beta verzija ne bo ve? aktualna&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;, sistem se bo ponovno zaganjal vsi 2 uri, uporaba pa bo potekla 1. avgusta.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font color="#000080" size="3"&gt;Windows 7 RC bo nato mo?no prenesti do 15. avgusta&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;. Po tem datumu prenos ne bo ve? mo?en, pridobiti pa bo ?e vedno mo?no &lt;a href="http://technet.microsoft.com/en-us/evalcenter/dd353205.aspx?ITPID=wcfeed" target="_blank"&gt;klju? za namestitev&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Uporabniki Windows 7 RC ? upam, da vam je sistem v?e? in da vam dobro slu?i. Povratne informacije lahko sporo?ite na &lt;u&gt;&lt;a href="http://input.microsoft.com"&gt;http://input.microsoft.com&lt;/a&gt;&lt;/u&gt;.&lt;/p&gt;  &lt;p&gt;Vse informacije o Windows 7 pa najdete na &lt;a href="http://www.microsoft.com/windows/windows-7/" target="_blank"&gt;doma?i strani&lt;/a&gt; in &lt;a href="http://technet.microsoft.com/sl-si/windows/dd361745(en-us).aspx?ITPID=mscomsc" target="_blank"&gt;strani za IT strokovnjake&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Torej, preverite svojo razli?ico (v desnem spodnjem kotu mora pisati Build 7100 za razli?ico RC), ter pravi ?as poskrbite za nemoteno delovanje.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Lep pozdrav,     &lt;br /&gt;Matja? ?ircelj&lt;/em&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3258157" width="1" height="1"&gt;</description><category>Windows 7</category><pubDate>Wed, 24 Jun 2009 09:00:27 GMT</pubDate></item><item><title>Microsoftov bilten za strokovnjake IT ? junijska ?tevilka</title><link>http://blogs.technet.com/slitpro/archive/2009/06/23/microsoftov-bilten-za-strokovnjake-it-junijska-tevilka.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/23/microsoftov-bilten-za-strokovnjake-it-junijska-tevilka.aspx688</guid><description>&lt;p&gt;Pravkar je iz?la &lt;strong&gt;junijska ?tevilka TechNet biltena&lt;/strong&gt;. Bilten ponuja aktualne mese?ne novice, brezpla?ne prenose, povezave do blogov MVP strokovnjakov, do skupnosti, video vsebine, vsebine tehni?ne podpore, izobra?evanja in ?e kaj. Na newsletter se lahko naro?ite na &lt;a href="https://profile.microsoft.com/RegSysProfileCenter/default.aspx?lcid=1060" target="_blank"&gt;Microsoft Centru s profili&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Spodaj ?e zaslonska slika biltena. Naro?ite se!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftovbiltenzastrokovnjakeITjunijsk_8453/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftovbiltenzastrokovnjakeITjunijsk_8453/image_thumb_1.png" width="524" height="671" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Lep dan,    &lt;br /&gt;Matja? ?ircelj&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3257722" width="1" height="1"&gt;</description><category>TechNet Flash</category><pubDate>Tue, 23 Jun 2009 07:25:42 GMT</pubDate></item><item><title>SLODUG srecanje v sredo, 24.6.</title><link>http://blogs.technet.com/slitpro/archive/2009/06/22/slodug-sre-anje-v-sredo-24-6.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/22/slodug-sre-anje-v-sredo-24-6.aspx689</guid><description>&lt;p&gt;Veseli dogodek bo v &lt;b&gt;sredo, 24.6.&lt;/b&gt; na klasi?ni lokaciji.     &lt;br /&gt;Vsebina sre?anja je slede?a:&lt;/p&gt;  &lt;p&gt;17:00-17:15 Zbiranje    &lt;br /&gt;17:15-18:15 &lt;b&gt;C# in Visual Basic ? Pogled v prihodnost&lt;/b&gt;, Damir Arh     &lt;br /&gt;Microsoft nas je ?e navadil, da vsak novi Visual Studio prinese tudi novo verzijo programskih jezikov C# in Visual Basic. Ustaljeno prakso bo nadaljeval tudi Visual Studio 2010 s C# 4.0 in Visual Basic 10. Tokrat je poudarek na njuni ve?ji zdru?ljivosti z dinami?nimi jeziki in medsebojni podobnosti. Predstavili bomo novosti, s katerimi si ?elijo to dose?i, si pogledali, kako nam bodo te olaj?ale razvoj, ter opozorili na nevarnosti, v katere nas lahko zapeljejo. Zaklju?ili bomo z razmi?ljanjem, kaj si lahko od obeh jezikov obetamo v prihodnosti.     &lt;br /&gt;&lt;i&gt;Damir Arh je diplomiral na Fakulteti za ra?unalni?tvo in informatiko v Ljubljani, za svoje diplomsko delo pa je prejel Pre?ernovo nagrado. Na isti fakulteti je kon?al tudi magistrski ?tudij ter bil ve?letni ?lan Laboratorija za ra?unalni?ko grafiko in multimedije.      &lt;br /&gt;S podjetjem Gama System d.o.o. je za?el sodelovati ?e v ?tudentskih letih, sprva kot razvijalec, danes pa opravlja delo vodje razvoja programske opreme ter tako koordinira razvoj dokumentnega sistema Gama System? eDocs in druge programske opreme. Pri svojem delu je v stiku z najnovej?imi razvojnimi tehnikami in orodji, pozornost pa ?e posebej posve?a Microsoftovim tehnologijam.&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;18:30-19:30 &lt;b&gt;Silverlight 3 - Novosti&lt;/b&gt;, Andrej Tozon     &lt;br /&gt;Silverlight 3 bo kmalu iz?el. Na sre?anju bomo imeli prilo?nost ponoviti, katere novosti prina?a in kaj z njimi po?eti. Brez PowerPointa.     &lt;br /&gt;&lt;i&gt;Andrej se ?e ve? kot 15 let aktivno ukvarja z na?rtovanjem in razvojem programskih re?itev, pri ?emer uporablja najnovej?e Microsoftove tehnologije. Od leta 2005 dela v svojem podjetju, kjer med drugim svetuje strankam pri uvajanju novih tehnologij in vzorcev v razvojne procese. Svoje znanje usmerja predvsem v na?rtovanje in razvoj odjemalskih re?itev, zato v zadnjem ?asu najve? pozornosti namenja tehnologijam WPF in Silverlight. Redno predava na Microsoftovih konferencah in drugih dogodkih, poleg tega pa aktivno sodeluje tudi v novi?arskih skupinah in slovenski skupnosti razvijalcev (SLODUG).&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;19:30 - * Debata, pizze in pivo.&lt;/p&gt;  &lt;p&gt;Se vidimo na ?martinski 140!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3257403" width="1" height="1"&gt;</description><category>skupnosti,dogodki</category><pubDate>Mon, 22 Jun 2009 11:03:59 GMT</pubDate></item><item><title>Microsoft Assessment and Planning Toolkit 4.0 Beta</title><link>http://blogs.technet.com/slitpro/archive/2009/06/18/microsoft-assessment-and-planning-toolkit-4-0-beta.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/18/microsoft-assessment-and-planning-toolkit-4-0-beta.aspx49</guid><description>&lt;p&gt;&lt;a href="https://connect.microsoft.com/InvitationUse.aspx?ProgramID=1668&amp;amp;InvitationID=MAP4-J8PH-JWTQ&amp;amp;SiteID=297"&gt;Microsoft Assessment and Planning (MAP) Toolkit&lt;/a&gt; je zbirka orodij in nasvetov, ki vam pomagajo pri pregledu in optimizaciji IT infrastrukture ter odlo?itvah pri planiranju implementacij pravih Microsoft tehnologij, ki jih potrebujete.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftAssessmentandPlanningTool.0Beta_A19C/clip_image001_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftAssessmentandPlanningTool.0Beta_A19C/clip_image001_thumb.jpg" width="244" height="181" /&gt;&lt;/a&gt;&lt;a href="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftAssessmentandPlanningTool.0Beta_A19C/clip_image001%5B4%5D.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001[4]" border="0" alt="clip_image001[4]" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/MicrosoftAssessmentandPlanningTool.0Beta_A19C/clip_image001%5B4%5D_thumb.jpg" width="244" height="181" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Zbirka vsebuje preprost vmesnik za pregled sistema, zmogljiva orodja za ocenitev infrastrukture in primerne predloge za mnoge Microsoft izdelke, med drugim:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Windows 7 (NEW!) &lt;/li&gt;    &lt;li&gt;Windows Server 2008 R2 (NEW!) &lt;/li&gt;    &lt;li&gt;Hyper-V for Windows Server 2008 R2 (NEW!) &lt;/li&gt;    &lt;li&gt;Windows Vista &lt;/li&gt;    &lt;li&gt;Windows Server 2008 &lt;/li&gt;    &lt;li&gt;Hyper-V for Windows Server 2008 &lt;/li&gt;    &lt;li&gt;SQL Server 2008 &lt;/li&gt;    &lt;li&gt;2007 Microsoft Office &lt;/li&gt;    &lt;li&gt;Microsoft Application Virtualization &lt;/li&gt;    &lt;li&gt;Forefront Client Security &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Zbirko lahko prenesete &lt;a href="https://connect.microsoft.com/InvitationUse.aspx?ProgramID=1668&amp;amp;InvitationID=MAP4-J8PH-JWTQ&amp;amp;SiteID=297" target="_blank"&gt;tule&lt;/a&gt;, vpisati se je potrebno z Live ID. Za ve? informacij obi??ite &lt;a href="http://technet.microsoft.com/en-us/solutionaccelerators/dd537566.aspx?SA_CE=NOT-MAP-EMAL-MAP4BETAANNCMTMSONLY-2009-06-15"&gt;TechNet&lt;/a&gt; stran, namenjeno &lt;strong&gt;Microsoft Assessment and Planning Toolkit 4.0 Beta.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Lep pozdrav,      &lt;br /&gt;Matja? ?ircelj&lt;/em&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3256204" width="1" height="1"&gt;</description><category>novice,Upravljanje IT infrastrukture</category><pubDate>Thu, 18 Jun 2009 09:29:40 GMT</pubDate></item><item><title>Service Pack 2 za Windows Server 2008 in Windows Vista</title><link>http://blogs.technet.com/slitpro/archive/2009/06/18/service-pack-2-za-windows-server-2008-in-windows-vista.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/18/service-pack-2-za-windows-server-2008-in-windows-vista.aspx50</guid><description>&lt;p&gt;Na spletnem mestu &lt;a href="http://www.microsoft.com/downloads/en/default.aspx" target="_blank"&gt;Microsoft Download Center&lt;/a&gt; si lahko prenesete &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a4dd31d5-f907-4406-9012-a5c3199ea2b3&amp;amp;displaylang=en" target="_blank"&gt;&lt;strong&gt;Windows Server 2008 Service Pack 2 and Windows Vista Service Pack 2 - Five Language Standalone (KB948465)&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;SP2 je posodobitev za Windows Vista in Windows Server 2008, ki podpira nove vrste strojne opreme in prihajajo?e strojne standarde, vsebuje pa vse posodobitve od SP1 naprej.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Klju?ne posodobitve in spremembe vsebujejo:&lt;/u&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Posodobitve za nove vrste strojne opreme&lt;/li&gt;    &lt;li&gt;Vse popravke od SP1 naprej&lt;/li&gt;    &lt;li&gt;Izbolj?ave na podro?ju zdru?ljivosti aplikacij&lt;/li&gt;    &lt;li&gt;Izbolj?ave na podro?ju izku?nje z operacijskem sistemom, predvsem Windows Search 4.0&lt;/li&gt;    &lt;li&gt;U?inkovitej?e implementacija Service Pack 2 na samostojnem ra?unalniku ali v podjetju&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Ve? tehni?nih detajlov najdete na &lt;a href="http://technet.microsoft.com/en-us/default.aspx" target="_blank"&gt;TechNet&lt;/a&gt; spletnih mestih:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/windows/dd262148"&gt;Windows Vista SP2 TechNet &lt;/a&gt;    &lt;br /&gt;&lt;a href="http://technet.microsoft.com/windowserver/dd262148"&gt;Windows Server 2008 SP2 TechNet &lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Lep pozdrav,     &lt;br /&gt;Matja? ?ircelj&lt;/em&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3256149" width="1" height="1"&gt;</description><pubDate>Thu, 18 Jun 2009 07:30:02 GMT</pubDate></item><item><title>Windows 7 Upgrade Advisor</title><link>http://blogs.technet.com/slitpro/archive/2009/06/11/windows-7-upgrade-advisor.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/11/windows-7-upgrade-advisor.aspx51</guid><description>&lt;p&gt;Ra?unalniki, ki lahko poganjajo Windows Visto, so zmo?ni poganjati tudi Windows 7. ?e pa trenutno ne uporabljate Viste, oziroma imate specifi?ne in zahtevne aplikacije, ki jih poganjate na svojem ra?unalniku, je pred nadgradnjo na Windows 7 pametno preveriti, kako se take aplikacije obna?ajo v Windows 7 okolju.&lt;/p&gt;  &lt;p&gt;Za to je na voljo Windows 7 Upgrade Advisor beta, ki vam pomaga preveriti va? sistem in vam svetovati, kako postopati ob nadgradnji.&lt;/p&gt;  &lt;p&gt;Prenesite si &lt;a href="http://www.microsoft.com/windows/windows-7/upgrade-advisor.aspx"&gt;svetovalca za nadgradnjo&lt;/a&gt; in preprosto pretestirajte sistem.&lt;/p&gt;  &lt;p&gt;Toma?&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3253655" width="1" height="1"&gt;</description><category>Windows 7</category><pubDate>Thu, 11 Jun 2009 18:56:23 GMT</pubDate></item><item><title>NTK09 ? Slide decks from my talks</title><link>http://feedproxy.google.com/~r/TheAttic/~3/HqNv-lxOnFc/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/HqNv-lxOnFc/post.aspx52</guid><description>&lt;p&gt;Had 2 talks at this year?s &lt;a href="http://www.ntk.si" target="_blank"&gt;NT Konferenca&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The first one was about building LOB application with Silverlight, starting from what can we do today with v2 (ran a short, 2 min video of a Silverlight 2 LOB app we?re going to be releasing within few weeks) and what?s coming with v3. The last part was about .NET RIA Services. &lt;/p&gt;  &lt;p&gt;The second talk was about Presentation Model (MVVM / Model-View-ViewModel) ? from basics to actual working application ? starting from a WPF version of an app, then porting the same ViewModel over to Silverlight to build a better UX and thorough testing, to finish with (again, with exactly the same ViewModel) a working version for Windows Forms (&lt;em&gt;yes&lt;/em&gt;, that?s &lt;em&gt;WinForms&lt;/em&gt; built with &lt;em&gt;MVVM&lt;/em&gt;). &lt;/p&gt;  &lt;p&gt;Fun.&lt;/p&gt;  &lt;p&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Presentations/NTK2009/SLLOB.pptx" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Presentations/NTK2009/MVVM.pptx" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt;Update: slides are in Slovenian language?&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/06/01/NTK09-e28093-Slide-decks-from-my-talks.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/06/01/NTK09-e28093-Slide-decks-from-my-talks.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=HqNv-lxOnFc:uWntpVBFbgs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=HqNv-lxOnFc:uWntpVBFbgs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=HqNv-lxOnFc:uWntpVBFbgs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=HqNv-lxOnFc:uWntpVBFbgs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=HqNv-lxOnFc:uWntpVBFbgs:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/HqNv-lxOnFc" height="1" width="1"/&gt;</description><category>Development,MVVM,Silverlight,Windows Forms,WPF</category><pubDate>Mon, 01 Jun 2009 21:28:25 GMT</pubDate></item><item><title>NT konferenca 2009 uspe?no zakljucena</title><link>http://blogs.technet.com/slitpro/archive/2009/06/01/nt-konferenca-2009-uspe-no-zaklju-ena.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/06/01/nt-konferenca-2009-uspe-no-zaklju-ena.aspx53</guid><description>&lt;p&gt;V prej?njem tednu se je zaklju?ila najve?ja IT konferenca v Sloveniji in ?ir?i okolici ? &lt;a href="http://ntk.si/" target="_blank"&gt;NT konferenca 2009&lt;/a&gt;. Postregla je s precej novostmi, tako vsebinsko kot organizacijsko. Predvsem pa je bilo predstavljeno mnogo tujih in na?ih vrhunskih strokovnjakov na podro?ju informatike, ki so vsak s svojim znanjem prispevali k kvaliteti konference.&lt;/p&gt;  &lt;p&gt;Organizacijsko najbolj izstopajo?a zgodba je bila vsekakor &lt;strong&gt;ekologija&lt;/strong&gt;. Eko material, torbe, papir, svin?niki, gadgeti,? IT skupnost je velika in vplivna, zato imamo seveda mo?nost, da storimo kaj ve?jega od sebe in ve?jega, kot je IT.&amp;#160; S pogledom na na?o okolico lahko re?emo, da je ?e kako pomembno prispevati k bolj ?istemu svetu.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Vsebinske novosti pa so se najbolj razveselili IT strokovnjaki in razvijalci ? in to 4.dneva&lt;/strong&gt;, ki je vsebino strokovno zabelil z nivoji 300, 400 in ve? :) po te?avnosti. Povratne informacije udele?encev? Definitivno pozitivne, odobravajo?e in za naslednjo leto ? dajmo ?e, to potrebujemo!&lt;/p&gt;  &lt;p&gt;&lt;u&gt;?e nekaj klju?nih sporo?il predavateljev&lt;/u&gt;:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://www.minasi.com/" target="_blank"&gt;Mark Minasi&lt;/a&gt;&lt;/strong&gt; je skozi svoje dolgoletne izku?nje in z obilico resno/humornih vlo?kov predstavil marsikaj o &lt;a href="http://www.microsoft.com/windows/windows-vista/default.aspx" target="_blank"&gt;Windows Visti&lt;/a&gt; in &lt;a href="http://www.microsoft.com/windows/windows-7/" target="_blank"&gt;Windows 7&lt;/a&gt;, kar prej nismo vedeli, kot naprimer 12 korakov za varen sistem, poglobljen koncept varnosti z User Account Control in ?e marsi?em, kar je o?em skrito, a varuje sisteme pred vdori.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://www.davidchappell.com/" target="_blank"&gt;David Chappell&lt;/a&gt;&lt;/strong&gt; pravi, da z Windows Azure prihajamo v naslednjo generacijo ra?unalni?tva ? skozi zgodovino nas je popeljal od mainframevov, do PC sveta in sedaj v Cloud Computing, ter Software + Services.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://www.microsoft.com/emea/presscentre/pressreleases/EdGibsonPR_150509.mspx" target="_blank"&gt;Ed Gibson&lt;/a&gt;&lt;/strong&gt;, neko? zaposlen pri &lt;a href="http://www.fbi.gov/" target="_blank"&gt;FBI&lt;/a&gt;, kjer je preganjal spletne kriminalce, nadlegovalce in ostalo golazen, je v svoji predstavitvi nagovoril poslu?alce o tem, kako naivno gledamo na splet, a kako grozovito hitro smo lahko ogoljufani, prevarani in zaslepljeni. Z odprtimi usti smo ga poslu?ali in si posku?ali zapomniti ?imve? pametnih nasvetov, med katerimi so bili tudi bolj preprosti, kot naprimer zaklepanje ra?unalnikak in podobno.&lt;/p&gt;  &lt;p&gt;Z moje strani smo izvedli ?e nov na?in hitrih predstavitev ? &lt;strong&gt;BarCamp&lt;/strong&gt;. S kratkimi in hitrimi prezentacijami si je po mnjenju ob?instva skiro kot nagrado zaslu?il Luka Manojlovi?.&lt;/p&gt;  &lt;p&gt;Ob vseh vsebinskih novostih, ?tirih dnevih dobre vsebine in ekolo?kega pristopa v IT smo se seveda ?e malo pozabavali, v ponedeljek on cervici, v torek v Gavioliju, v sredo pa smo si skupaj pogledali nogometno tekmo Barcelona ? Manchester United.&lt;/p&gt;  &lt;p&gt;O ?e kak?nem sporo?ilu iz NT konference 2009 bom ?e pisal. Vsekakor upam, da se tisti, ki ste to leto izpustili dogodek v Portoro?u, pridru?ite naslednje leto. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Tako kot je zidarsko kladivo orodje vsakega gradbenika, tako kot je pisalo orodje vsakega pisatelja ? tako je NT konferenca orodje vsakega IT stokovnjaka in razvijalca.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Sre?no,&lt;/p&gt;  &lt;p&gt;Matja? ?ircelj&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3248675" width="1" height="1"&gt;</description><category>dogodki,NTK09</category><pubDate>Mon, 01 Jun 2009 09:08:22 GMT</pubDate></item><item><title>Windows Server 2008 R2 je blizu ? Live Migration pa prav tako</title><link>http://blogs.technet.com/slitpro/archive/2009/05/28/windows-server-2008-r2-je-blizu-live-migration-pa-prav-tako.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/05/28/windows-server-2008-r2-je-blizu-live-migration-pa-prav-tako.aspx54</guid><description>&lt;p&gt;V spodnjih ?estih epizodah na &lt;a href="http://edge.technet.com/"&gt;TechNet Edge&lt;/a&gt; si lahko ogledate kako se tej stvari stre?e.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Refresh/"&gt;Live Migration - Update for RC&lt;/a&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Part-1/"&gt;Live Migration - Part 1&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Part-2/"&gt;Live Migration - Part 2&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Part-3/"&gt;Live Migration - Part 3&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Part-4/"&gt;Live Migration - Part 4&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-Part-5/"&gt;Live Migration - Part 5&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;u&gt;&lt;a href="http://edge.technet.com/Media/Live-Migration-part-6/"&gt;Live Migration - Part 6&lt;/a&gt;&lt;/u&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Lep pozdrav,&lt;/p&gt;  &lt;p&gt;Toma?&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3246804" width="1" height="1"&gt;</description><category>Windows Server 2008,virtualizacija</category><pubDate>Thu, 28 May 2009 09:38:44 GMT</pubDate></item><item><title>NTK: Za clane uporabni?kih skupin SloDUG in SloWUG</title><link>http://blogs.technet.com/slitpro/archive/2009/05/22/ntk-za-lane-uporabni-kih-skupin-slodug-in-slowug.aspx</link><guid>http://blogs.technet.com/slitpro/archive/2009/05/22/ntk-za-lane-uporabni-kih-skupin-slodug-in-slowug.aspx55</guid><description>&lt;p&gt;Na NT konferenci smo za vas pripravili &lt;b&gt;posebno sre?anje&lt;/b&gt;, ki se bo odvijalo v &lt;b&gt;ponedeljek, 25.5.2009, ob 18.uri zve?er, v dvorani Emerald&lt;/b&gt;. &lt;/p&gt;  &lt;p&gt;Poskrbljeno bo za zanimiv program, osve?ilo ter dru?enje. Pozdravili vas bodo predstavniki skupin in Microsofta, poseben gost pa vas bo za nekaj trenutkov popeljal v malce druga?en svet.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Program sre?anja:&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;18.00 ? 18.15:&amp;#160;&amp;#160;&amp;#160; Zbiranje in pozdrav&lt;/p&gt;  &lt;p&gt;18.15 ? 19.00:&amp;#160;&amp;#160;&amp;#160; Bob Arno Show&lt;/p&gt;  &lt;p&gt;19.00 ? ...&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Pivo &amp;amp; ?ips &amp;amp; Arno&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Se vidimo!&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/NTKZalaneuporabnikihskupinSloDUGinSloWUG_E70A/clip_image001_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/NTKZalaneuporabnikihskupinSloDUGinSloWUG_E70A/clip_image001_thumb.gif" width="240" height="2" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Ve? informacij najdete na spletnem mestu &lt;a href="http://www.ntk.si/"&gt;www.ntk.si&lt;/a&gt;. Najdete nas tudi na: &lt;a href="http://www.facebook.com/pages/Portoroz-Slovenia/NT-konferenca/63374328320"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/NTKZalaneuporabnikihskupinSloDUGinSloWUG_E70A/clip_image002_624eacca-4974-4296-b655-fbbdf02e4db5.jpg" width="36" height="36" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/NTKZalaneuporabnikihskupinSloDUGinSloWUG_E70A/clip_image003_2.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://blogs.technet.com/blogfiles/slitpro/WindowsLiveWriter/NTKZalaneuporabnikihskupinSloDUGinSloWUG_E70A/clip_image003_thumb.gif" width="240" height="2" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; Matja? ?ircelj&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3244578" width="1" height="1"&gt;</description><category>skupnosti,dogodki,NTK09</category><pubDate>Fri, 22 May 2009 14:25:56 GMT</pubDate></item><item><title>Dynamic Data Forms for Silverlight, revisited</title><link>http://feedproxy.google.com/~r/TheAttic/~3/0NDZRu_Oahg/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/0NDZRu_Oahg/post.aspx56</guid><description>&lt;p&gt;A couple of weeks ago, I &lt;a href="http://tozon.info/blog/post/2009/03/15/Dynamic-Data-Forms-for-Silverlight-with-a-Data-Template-Selector-Control.aspx"&gt;wrote&lt;/a&gt; a post about handling dynamic forms in Silverlight. With this continuation post, I?m going to make a few changes to the original project:&lt;/p&gt;  &lt;p&gt;1. Implement a new, custom, field type and provide a template for it (I?ll write about it later), and   &lt;br /&gt;2. Make a few changes to the FormFieldTemplateSelector to make it more generic. So instead of writing templates like this:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A new TemplateSelectorDataTemplate?&lt;/strong&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.StringTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.StringTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.DateTimeTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;basics:DatePicker&lt;/span&gt; &lt;span style="color: #ff0000"&gt;SelectedDate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.DateTimeTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You could simply write:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DataType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;System.String&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DataType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;System.DateTime&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;basics:DatePicker&lt;/span&gt; &lt;span style="color: #ff0000"&gt;SelectedDate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You can see the DataType property on the TemplateSelectorDataTemplate used instead of using concrete templates like FormFieldTemplateSelecot.StringTemplate. This way, the FormFieldTemplateSelector?s DataType property can be matched with TemplateSelectorDataTemplate?s DataType property [long names confusion, I know] and you don?t have to factor a new template for each new field type you come with, making it feel a bit more like the DataTemplate implementation in WPF. Strings are used here instead of types. One reason for this is that Silverlight doesn?t support x:Type markup, and the second is the fact you can use any string to identify your field type: for example, you can use ?&lt;em&gt;#Signature#&lt;/em&gt;? string as a custom field type to insert a signature control into your form.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A written signature form field?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To demonstrate a support for custom field types, I created a special control, which will allow the user to sign herself on a special panel and the signature will be submitted to the server together with the other field values.&lt;/p&gt;

&lt;p&gt;The control, which will allow us to write on it with the mouse, is of course InkPresenter. I?ve encapsulated it in another control, called SignaturePanel, which adds required mouse event handler which enables the user to write on the InkPresenter with a mouse. Here?s this control, contained within a new TemplateSelectorDataTemplate:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DataType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;#Signature#&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:SignaturePanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;br /&gt;                          &lt;span style="color: #ff0000"&gt;Strokes&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay, Converter={StaticResource strokesConverter}}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TemplateSelectorDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The template looks nothing special, except that strokesConverter, specified with the binding. What that does is serialize the Strokes collection from the InkPresenter when being written to the underlying ViewModel, where we need it when sending all submitted data over to the server side. This means that signature actually gets sent over the wire in a form of strokes collection, which you can store in a database. Alternatively, you could convert that strokes into the bitmap on the server and store the signature as an image [And I?ve yet to check how Silverlight 3 WritableBitmap can help doing this on the client]. Anyway, I?ve found StrokeCollection (de)serialization code in &lt;a href="http://www.thedatafarm.com/blog" target="_blank"&gt;Julia Lerman&lt;/a&gt;?s &lt;a href="http://msdn.microsoft.com/en-gb/magazine/cc721604.aspx?pr=blog" target="_blank"&gt;Create Web Apps You Can Draw On with Silverlight 2&lt;/a&gt; MSDN article and is included in the code sample attached to this post.&lt;/p&gt;

&lt;p&gt;Here?s how the current form looks like:&lt;/p&gt;

&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/DynamicDataFormsforSilverlightrevisited_F08/image.png" width="217" height="189" /&gt; &lt;/p&gt;

&lt;p&gt;Source code is now available. Please note that this is a Silverlight 3 project. It doesn?t contain any SL3 code, it?s just the project files were converted to SL3 when opened in Visual Studio.&lt;/p&gt;

&lt;p&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/DynamicForm.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;All comments welcome. Enjoy.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/04/07/Dynamic-Data-Forms-for-Silverlight-revisited.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/04/07/Dynamic-Data-Forms-for-Silverlight-revisited.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=0NDZRu_Oahg:D5Uc4zm9T0s:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=0NDZRu_Oahg:D5Uc4zm9T0s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=0NDZRu_Oahg:D5Uc4zm9T0s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=0NDZRu_Oahg:D5Uc4zm9T0s:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=0NDZRu_Oahg:D5Uc4zm9T0s:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/0NDZRu_Oahg" height="1" width="1"/&gt;</description><pubDate>Wed, 08 Apr 2009 00:12:05 GMT</pubDate></item><item><title>Creating Silverlight Behaviors (with Blend 3 Interactivity dll)</title><link>http://feedproxy.google.com/~r/TheAttic/~3/wo5fR0Td-b8/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/wo5fR0Td-b8/post.aspx57</guid><description>&lt;p&gt;Behaviors are not new in WPF / Silverlight world; it?s a common way of extending visual element?s &lt;em&gt;behavior&lt;/em&gt; through the power of attached properties and everybody probably used one of these at least once in their projects. Now, there?s new Behaviors in town?&lt;/p&gt;  &lt;p&gt;I first learned about &lt;strong&gt;&lt;em&gt;the&lt;/em&gt;&lt;/strong&gt; behaviors in this excellent, short but sweet &lt;a href="http://www.visitmix.com/" target="_blank"&gt;MIX09&lt;/a&gt; &lt;a href="http://videos.visitmix.com/MIX09/C27M" target="_blank"&gt;presentation&lt;/a&gt; by &lt;a href="http://blois.us/blog/" target="_blank"&gt;Pete Blois&lt;/a&gt;. In short: the new ?breed? of behaviors will be supported in Blend 3, allowing designers to easily extend visual elements by drag?n?dropping a variety of behaviors onto them. If you?re not familiar with what behaviors are ? imagine you have a Drag behavior... By setting it to any element in your window (in Blend / Xaml, no .NET code!), that element instantly gets draggable around that window. Yeah, that?s a powerful concept. And it doesn?t stop there. Watch the video, it?s worth the time?&amp;#160; And for detailed info, Christian is running a series on behaviors and other interactivity mechanism in &lt;a href="http://electricbeach.org" target="_blank"&gt;his blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;What I don?t get is why they are called &lt;em&gt;Blend (3)&lt;/em&gt; behaviors, because they are not limited to Blend in any way. They would be as easily called Silverlight/WPF behaviors, or simply ? Behaviors. Yes, that means you can use (and create) them even if you don?t have Blend 3 installed. Even Silverlight 3 is not required, it works with version 2 perfectly. You only need a special dll, which gets installed with Blend 3 ? Microsoft.Expression.Interactivity.dll. I currently have no idea what the deployment story with this assembly is at the time of the writing (with Blend being in Beta and all), but you?ll find it in the c:\Program Files\Microsoft Expression\Blend 3 Preview\Libraries\[Silverlight] | [WPF]\ folder. This assembly (it comes in Silverlight and WPF flavor) provides the base interactivity classes and is required if you?re going to use behaviors in your application.&lt;/p&gt;  &lt;p&gt;It should be quite obvious as to where behaviors fit in the designer / developer workflow: designers will be able to decorate visual elements with various behaviors and see them in action, while developer?s job will be to come up with new, not-yet-existing behaviors that designer had in mind when designing the UX.&lt;/p&gt;  &lt;p&gt;There are a few examples of behaviors up and ready on &lt;a href="http://gallery.expression.microsoft.com/site/items/behaviors" target="_blank"&gt;Expression Gallery&lt;/a&gt;, but let?s take a look how we can develop our own behaviors using Visual Studio 2008.&lt;/p&gt;  &lt;p&gt;The first behavior we?ll look into will be called the TransparencyBehavior. What it will do is make every element semi-transparent when the mouse is not directly over it. I?ll use one of my previous samples (a &lt;a href="http://tozon.info/blog/post/2009/03/10/Disabling-items-in-a-Silverlight-ListBox.aspx"&gt;semaphore&lt;/a&gt;) as a building ground for this one. The lights on the semaphore will be semitransparent until mouse enters the light?s space for it to become fully visible. Let?s begin&lt;/p&gt;  &lt;p&gt;First, you?ll need the Expression interactivity dll (see above). Once you find it, add it as a reference to your project. Then, create a class, deriving from &lt;em&gt;Behavior&amp;lt;T&amp;gt;&lt;/em&gt;. The generic type &lt;em&gt;T&lt;/em&gt; is the type of element you want to extend with this behavior. I?m using the Ellipse type for the purpose of this example to show a more concrete implementation. I could also use &lt;em&gt;&amp;lt;FrameworkElement&amp;gt;&lt;/em&gt; because this type of behavior is so common it could be attached to element.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: updated the previous paragraph to make sense and align with the sample code.&lt;/p&gt;  &lt;div&gt;   &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; TransparencyBehavior : Behavior&amp;lt;Ellipse&amp;gt; {}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We?ll need a couple of properties to control the behavior?s parameter: The InactiveTransparency property will hold an opacity value for element?s inactive state (when the mouse is not over) and the Duration will hold the time for the element to transition from active to inactive state (and vice versa).&lt;/p&gt;

&lt;p&gt;To hook into the element we?re extending, we have to override the OnAttached method. It will be called when the element is being initialized so we have the chance to attach additional event handlers to element?s events. The extended element can be reached through the AssociatedObject property. In this method, I?m hooking up into MouseEnter and MouseLeave events to detect when mouse is over, initialize and construct a storyboard that will be triggered for state transition:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnAttached()
{
    &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnAttached();

    storyboard = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Storyboard();
    animation = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DoubleAnimation();
    animation.Duration = Duration;
    Storyboard.SetTarget(animation, AssociatedObject);
    Storyboard.SetTargetProperty(animation, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyPath(Border.OpacityProperty));
    storyboard.Children.Add(animation);

    AssociatedObject.Opacity = InactiveTransparency;
    AssociatedObject.MouseEnter += OnMouseEnter;
    AssociatedObject.MouseLeave += OnMouseLeave;
}&lt;/pre&gt;
Similarly, there's the OnDetaching method that we can use to clean up (remove event handlers etc.) The rest of the class are just the handlers:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnMouseLeave(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, MouseEventArgs e)
{
    animation.To = InactiveTransparency;
    storyboard.Begin();
}

&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnMouseEnter(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, MouseEventArgs e)
{
    animation.To = 1;
    storyboard.Begin();
}&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;To finish, here?s a piece of modified (from the previous semaphore example) piece of Xaml using the behavior:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Ellipse&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Fill&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Brush}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Black&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:TransparencyBehavior&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;00:00:00.2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;InactiveTransparency&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.5&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;i:Interaction.Behaviors&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Ellipse&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;That?s all for this simple behavior. In future posts, I?ll come up with new behaviors and put them in the context of some other samples I?ve used in the previous posts.&lt;/div&gt;

&lt;div&gt;[Hint: in the below sample, hover over green lights]&lt;/div&gt;

&lt;p align="center"&gt;&lt;iframe height="70" src="http://tozon.info/sl/semaphore2/" frameborder="0" width="500"&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;The way to create new behaviors is very similar to using ?direct? approach with attached properties. The Behavior base class provides a very convenient infrastructure to build on, and porting the ?old way? attached behaviors to this new model shouldn?t be that difficult. Behaviors are not limited to use in Blend 3 and work with Silverlight 2 too. With that, it would be great to see Microsoft releasing the interactivity dll as a standalone release or a part of some other SDK, not tying it to either Blend 3 or any particular Silverlight version.&lt;/p&gt;

&lt;p&gt;The source code for this sample is available. Please note that the project is a Silverlight 3 project and doesn?t include the Expression Interactivity dll.&lt;/p&gt;

&lt;p&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Semaphore2.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/04/04/Creating-Silverlight-Behaviors-(with-Blend-3-Interactivity-dll).aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/04/04/Creating-Silverlight-Behaviors-(with-Blend-3-Interactivity-dll).aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=wo5fR0Td-b8:jr2AiXcxsiw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=wo5fR0Td-b8:jr2AiXcxsiw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=wo5fR0Td-b8:jr2AiXcxsiw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=wo5fR0Td-b8:jr2AiXcxsiw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=wo5fR0Td-b8:jr2AiXcxsiw:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/wo5fR0Td-b8" height="1" width="1"/&gt;</description><pubDate>Sat, 04 Apr 2009 22:44:36 GMT</pubDate></item><item><title>Declarative Role-based ?security? for Silverlight Xaml elements</title><link>http://feedproxy.google.com/~r/TheAttic/~3/dDMXL110rYY/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/dDMXL110rYY/post.aspx58</guid><description>&lt;p&gt;&lt;a href="http://www.timheuer.com/" target="_blank"&gt;Tim Heuer&lt;/a&gt; published a great example on how to implement user authentication and role validation with ASP.NET Application Services in his &lt;a href="http://silverlight.net/learn/appcorner/adventureworkspt1.aspx?pt=1&amp;amp;PageIndex=2" target="_blank"&gt;Application Corner&lt;/a&gt; a while ago. It really works as expected, even with custom membership / role providers. And you get to do declarative role based security checks on your server side classes too.&lt;/p&gt;  &lt;p&gt;When building MVVM pattern applications, you tend to have as less code as possible in your views? code-behind classes. Call me a MVVM purist [ :), see &lt;a href="http://pixel8.infragistics.com/default.aspx#Episode:11927" target="_blank"&gt;Tim?s video interview for pixel8&lt;/a&gt; ], but (close to) zero lines of custom code is what I like to have in my code-behinds. Not at all costs, but usually it doesn?t take much to code additional helper class, an attached property or a controller of some sort.&lt;/p&gt;  &lt;p&gt;What I wanted to do, was replace the following piece of code with something more declarative, which could be used in Xaml:&lt;/p&gt;  &lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; EnableAppFeatures(ObservableCollection&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; roles)
{
    EmployeeButton.IsEnabled = (roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Admin&amp;quot;&lt;/span&gt;) || roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;HR&amp;quot;&lt;/span&gt;));
    OrderButton.IsEnabled = (roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Admin&amp;quot;&lt;/span&gt;) || roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Sales&amp;quot;&lt;/span&gt;));
    CustomersButton.IsEnabled = (roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Admin&amp;quot;&lt;/span&gt;) || roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Sales&amp;quot;&lt;/span&gt;));
    ReportsButton.IsEnabled = (roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Admin&amp;quot;&lt;/span&gt;) || roles.Contains(&lt;span style="color: #006080"&gt;&amp;quot;Sales&amp;quot;&lt;/span&gt;));
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[the roles string collection comes in as a result of the Roles service call]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution #1 - Good&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I&lt;/strong&gt;f you?re using MVVM, adding some additional properties to your ViewModels (like IsInHRRole, IsInSalesRole, etc) should be easy, right? You would just need to bind al the buttons? IsEnabled properties to their ViewModel counterparts and you?re done. &lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Button&lt;/span&gt; ... &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ReportsButton&amp;quot;&lt;/span&gt; ... &lt;span style="color: #ff0000"&gt;IsEnabled&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding IsInSalesRole}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;True, but you?ll probably end up ?polluting? all your ViewModels with such properties since usually the majority of the Views have some elements, depending on a role the user is in. Additionally, you?d have to create additional properties for combined roles, e.g. &lt;em&gt;IsInSalesOrAdminRole&lt;/em&gt;,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution #2 - Better&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was thinking somewhere in the lines of attaching a new attached property to each button, which would enable the button when the user would be in one of the specified roles:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Button&lt;/span&gt; ... &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ReportsButton&amp;quot;&lt;/span&gt; ... &lt;span style="color: #ff0000"&gt;sec:SecurityAction&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;DemandRole&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Sales,Admin&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;SecurityAction.DemandRole in this case is an attached property, specifying all the roles, which would make the button enabled. The logic is simple ? if the user is in one of the specified roles, the button (or any other control with this attribute appended) would have its IsEnabled property set to true.&amp;#160; &lt;/p&gt;

&lt;div&gt;To make this possible, I first had to come up with a class to hold all the current roles, something like a &lt;a href="http://msdn.microsoft.com/en-us/library/axt6w9h8.aspx" target="_blank"&gt;Principal&lt;/a&gt;? This is a short class, supporting roles only that will do a job for this demonstration:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; SilverlightPrincipal
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; Roles { get; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; set; }

    &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; SilverlightPrincipal()
    {
        Roles = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;();
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetRoles(IList&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; roles)
    {
        Roles.Clear();
        &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0; i &amp;lt; roles.Count; i++)
        {
            Roles.Add(roles[i]);
        }
    }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsInRole(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; role)
    {
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Roles.Contains(role);
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; IsInOneOfRoles(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[] roles)
    {
        &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0; i &amp;lt; roles.Length; i++)
        {
            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Roles.Contains(roles[i]))
            {
                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;
            }
        }
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The roles collection will contain all roles the user is currently in. IsInRole() and IsInOneOfRoles() will return true, if user is in one of the passed in roles. The SetRoles() method is here for simplicity ? it servers just as a roles setter, called from wherever the Roles service calls returns.&lt;/p&gt;

&lt;p&gt;Perhaps the class above probably doesn?t even deserve to be called a &lt;em&gt;Principal&lt;/em&gt;, but it will serve well for the purpose of this post. For more ideas to implement a more complete Silverlight Principal, check &lt;a href="http://www.myblogon.net/archive/2008/05/22/creating-a-custom-principal-and-identity-for-silverlight-2.aspx" target="_blank"&gt;this blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To plug it in Tim?s code, I used the aforementioned EnableAppFeatures method, which now looks like:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; EnableAppFeatures(ObservableCollection&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; roles)
{
    SilverlightPrincipal.SetRoles(roles);
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The next thing to do was create the SecurityAction.DemandRole attached property that could be used to set the required roles to a specific control. You?ll find this attached property in the sample code attached to this post. I?m not including the code here because it will make this post much longer and I?m not really fond of using it anyway, because of the reasons for solution #3 below. However, feel free to try the property and please leave comment if you like (or dislike) it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution #3 - Best&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After creating #2, I thought ? if user can never access the functionality behind the buttons, there is no need to show the buttons to her in the first place, right? Why not showing her the dashboard, created specifically for her role? Sounds familiar? ASP.NET? LoginView?&lt;/p&gt;

&lt;p&gt;Here?s my simple &lt;strong&gt;LoginView control for Silverlight&lt;/strong&gt;. You can define as many LoginView templates for as many roles you have:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginView.Templates&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Roles&lt;/span&gt;=&amp;quot;&lt;span style="color: #ff0000"&gt;HR&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #008000"&gt;&amp;lt;!-- Layout for HR role --&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Roles&lt;/span&gt;=&amp;quot;&lt;span style="color: #ff0000"&gt;Sales&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #008000"&gt;&amp;lt;!-- Layout for Sales role --&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Roles&lt;/span&gt;=&amp;quot;&lt;span style="color: #ff0000"&gt;Admin&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #008000"&gt;&amp;lt;!-- Layout for Admin role --&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginViewDataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginView.Templates&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LoginView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;First, here?s the &lt;strong&gt;LoginViewTemplate&lt;/strong&gt; class:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; LoginViewDataTemplate : DataTemplate
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Roles { get; set; }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;Yeah, that?s pretty much it. The &lt;strong&gt;Roles&lt;/strong&gt; property will hold the list of roles, which are allowed to see the template.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;The &lt;strong&gt;LoginView&lt;/strong&gt; control itself is simple too:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; LoginView : UserControl
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Collection&amp;lt;LoginViewDataTemplate&amp;gt; Templates { get; set; }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; LoginView()
    {
        Templates = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;LoginViewDataTemplate&amp;gt;();

        SilverlightPrincipal.RegisterForRoleChangeNotification(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, LoadTemplate);
        Loaded += (s,e) =&amp;gt; { LoadTemplate(); };
    }

    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; LoadTemplate()
    {
        &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0; i &amp;lt; Templates.Count; i++)
        {
            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[] roleNames = Templates[i].Roles.Split(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;char&lt;/span&gt;[] { &lt;span style="color: #006080"&gt;','&lt;/span&gt;, &lt;span style="color: #006080"&gt;' '&lt;/span&gt; }, &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StringSplitOptions.RemoveEmptyEntries);
            &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; isInRole = SilverlightPrincipal.IsInOneOfRoles(roleNames);
            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (isInRole)
            {
                Content = Templates[i].LoadContent() &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UIElement;
                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;
            }
        }

        Content = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;[Update 06-13: updated the above code; should work now]&lt;/p&gt;

&lt;p&gt;There?s not much to comment here? The &lt;strong&gt;Templates&lt;/strong&gt; collection holds the collection of, errr., &lt;strong&gt;LoginViewDataTemplates&lt;/strong&gt;, and the &lt;strong&gt;LoadTemplate&lt;/strong&gt; method is there to Load the first template, having one of the specified roles match the current role that user is in. This could be easily extended to support the &lt;em&gt;default&lt;/em&gt; template, if needed. The default template would be loaded when no other template would match the current user?s role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RoleChanged notification /execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The right template is loaded with the control and whenever the Roles might change, the control would reload the template. I?ve implemented this behavior by adding a registration method for role change notification. Any visual element (or whatever object for that matter) can register itself by passing in the delegate to whatever method should be called whenever role(s) would change. The registration method was conveniently added to existing SilverlightPrincipal class:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; RegisterForRoleChangeNotification(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; o, Action action)
{
    &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; existsInCollection = references.Keys.FirstOrDefault(reference =&amp;gt; reference.Target == o) != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;
    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!existsInCollection)
    {
        references.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; WeakReference(o), action);
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Whenever the roles would change, register objects? delegate would be called:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnRolesChanged()
{
    CleanUp();
    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var reference &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; references)
    {
        reference.Value();
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The CleanUp method takes care for dead/disposed objects:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CleanUp()
{
    List&amp;lt;WeakReference&amp;gt; list = references.Keys.ToList&amp;lt;WeakReference&amp;gt;();
    &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = list.Count - 1; i &amp;gt;= 0; i--)
    {
        WeakReference r = list[i];
        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!r.IsAlive)
        {
            references.Remove(r);
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Classes, included in the package: SilverlightPrincipal, SecurityAction, LoginView:&lt;/p&gt;

&lt;p&gt;&lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/SLLoginView.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/03/06/Declarative-Role-based-e2809csecuritye2809d-for-Silverlight-Xaml-elements.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/03/06/Declarative-Role-based-e2809csecuritye2809d-for-Silverlight-Xaml-elements.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dDMXL110rYY:V3MwPi9nFCI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dDMXL110rYY:V3MwPi9nFCI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dDMXL110rYY:V3MwPi9nFCI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dDMXL110rYY:V3MwPi9nFCI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dDMXL110rYY:V3MwPi9nFCI:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/dDMXL110rYY" height="1" width="1"/&gt;</description><category>Development,MVVM,Silverlight,User Experience</category><pubDate>Fri, 06 Mar 2009 21:53:20 GMT</pubDate></item><item><title>Dynamic Data Forms for Silverlight with a Data Template Selector Control</title><link>http://feedproxy.google.com/~r/TheAttic/~3/OM5LInYi8aU/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/OM5LInYi8aU/post.aspx59</guid><description>&lt;p&gt;The basic idea behind this post is to show a simple way for items/list controls to display each item data with a different template. The ideal candidate for such exercise are data forms, where user can enter different kinds of information - text, numbers, check marks, etc. Imagine a scenario, where each data form field would be presented as a separate ListBox item? no matter of what data type that field is.&lt;/p&gt;  &lt;p&gt;The data model for this solution is going to be very simple and generic. We?ll need a generic class, which will represent a single field in a form. Each field will have an id, a caption, a value (entered by the user) and a value type (what?s the type of the value ? text, integer, date, etc.):&lt;/p&gt;  &lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AutoFormField
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Guid Id { get; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Caption { get; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Value { get; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Type { get; set; }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AutoFormField()
    {
        Id = Guid.NewGuid();
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;When the user requests a form, the associated web service will return a collection of AutoFormFields, representing all fields in the form that user should fill out. I?m not using any database for this example, so I?ve hardcoded the fields, returning to the client, in the service itself:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AutoFormService : IAutoFormService
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Collection&amp;lt;AutoFormField&amp;gt; GetForm()
    {
        Collection&amp;lt;AutoFormField&amp;gt; form = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;AutoFormField&amp;gt;();
        form.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AutoFormField()
        {
            Caption = &lt;span style="color: #006080"&gt;&amp;quot;Name: &amp;quot;&lt;/span&gt;,
            Type = &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;).FullName
        });
        form.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AutoFormField()
        {
            Caption = &lt;span style="color: #006080"&gt;&amp;quot;Last name: &amp;quot;&lt;/span&gt;,
            Type = &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;).FullName
        });
        form.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AutoFormField()
        {
            Caption = &lt;span style="color: #006080"&gt;&amp;quot;Birth date: &amp;quot;&lt;/span&gt;,
            Type = &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(DateTime).FullName
        });
        form.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AutoFormField()
        {
            Caption = &lt;span style="color: #006080"&gt;&amp;quot;Is employed: &amp;quot;&lt;/span&gt;,
            Type = &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;).FullName,
            Value = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;.ToString()
        });
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; form;
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;The above code shows that the form consists of two text fields, a date and a yes/no field. We would naturally want to display TextBoxes for text entry, DatePicker for a date, and a CheckBox for a yes/no field entry. The Type property contains an identifier, which will tell the client what kind of entry field to display; field data type names are used here for convenience.
  &lt;br /&gt;Let?s move to the client and implement this.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;I?ll use the ItemsControl to display the items, because I don?t need the notion of a selected item (yet). Let?s first get the basics out of the way; this is how the ItemsControl looks like, displaying all the form?s captions:&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;lt;ItemsControl ItemsSource=&lt;span style="color: #006080"&gt;&amp;quot;{Binding Fields, Source={StaticResource viewModel}}&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;ItemsControl.ItemTemplate&amp;gt;
        &amp;lt;DataTemplate&amp;gt;
            &amp;lt;TextBlock Text=&lt;span style="color: #006080"&gt;&amp;quot;{Binding Caption}&amp;quot;&lt;/span&gt; /&amp;gt;
        &amp;lt;/DataTemplate&amp;gt;
    &amp;lt;/ItemsControl.ItemTemplate&amp;gt;
&amp;lt;/ItemsControl&amp;gt;&lt;/pre&gt;
Its ItemsSource property is bound to a ViewModel?s Fields property, which gets populated when a call to the GetForm() web service method returns. The ItemTemplate is set up so that TextBlock displays the fields? captions.&lt;/div&gt;

&lt;p&gt;What we need to do next is display the actual entry fields the user will fill in. I already mentioned the Type property; this will be the key in deciding what kind of control to display.&lt;/p&gt;

&lt;p&gt;If we would be coding this in WPF, we would use a DataTemplateSelector to help us out with selecting the right template to load for a specific type. Unfortunately, this feature is not implemented in Silverlight, so we?re on our own here. As it turns out, there isn?t much code required to come up with a solution. This is something that I call?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;? a data template selector control?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For our example, we need templates for: a TextBox, a DatePicker and a CheckBox. The following user control will accept all these templates as properties and contain logic to choose between them based on a certain property, which will be bound to AutoFormField?s Type property:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; FormFieldTemplateSelector : UserControl
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DataTemplate StringTemplate { get; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DataTemplate DateTimeTemplate { get; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DataTemplate BooleanTemplate { get; set; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DataTemplate SignatureTemplate { get; set; }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; DependencyProperty FieldTypeProperty = 
        DependencyProperty.Register(&lt;span style="color: #006080"&gt;&amp;quot;FieldType&amp;quot;&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;), 
        &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(FormFieldTemplateSelector), &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyMetadata(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Empty));&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FieldType
    {
        get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;)GetValue(FieldTypeProperty); }
        set { SetValue(FieldTypeProperty, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;); }
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; FormFieldTemplateSelector()
    {
        Loaded += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; RoutedEventHandler(OnLoaded);
    }

    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnLoaded(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
    {
        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; fieldType = FieldType;
        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (fieldType == &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;).FullName)
        {
            Content = StringTemplate.LoadContent() &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UIElement;
        }
        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (fieldType == &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(DateTime).FullName)
        {
            Content = DateTimeTemplate.LoadContent() &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UIElement;
        }
        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (fieldType == &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;).FullName)
        {
            Content = BooleanTemplate.LoadContent() &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; UIElement;
        }
        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;
        {
            Content = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;
        }
    }
}&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The way to set it up in the item template is simple too. Here?s the complete ItemTemplate:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinWidth&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Caption}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FieldType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Type}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,2,0,2&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.StringTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.StringTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.DateTimeTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;basics:DatePicker&lt;/span&gt; &lt;span style="color: #ff0000"&gt;SelectedDate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.DateTimeTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.BooleanTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;CheckBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Value, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector.BooleanTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:FormFieldTemplateSelector&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Of course, this is just one way to put it together. You're free to style each field completely to your liking. This is what we have so far: &lt;img title="" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="114" alt="" src="http://tozon.info/images/blog/AutoDataFormsforSilverlightwithapoormans_5AF/image.png" width="213" border="0" /&gt; &lt;/p&gt;

&lt;p&gt;To wrap this up, you just have to add a button to submit the form back to the server. I?m not discussing this here since it?s pretty straightforward.&lt;/p&gt;

&lt;p&gt;I will, however, continue to build up on this example in the next couple of posts. Some topics I?ll dig into is styling, positioning and more (interesting) templates. I?ll also post the full code in the final post of this series.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/03/15/Dynamic-Data-Forms-for-Silverlight-with-a-Data-Template-Selector-Control.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/03/15/Dynamic-Data-Forms-for-Silverlight-with-a-Data-Template-Selector-Control.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=OM5LInYi8aU:h0qz4JCMSjE:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=OM5LInYi8aU:h0qz4JCMSjE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=OM5LInYi8aU:h0qz4JCMSjE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=OM5LInYi8aU:h0qz4JCMSjE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=OM5LInYi8aU:h0qz4JCMSjE:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/OM5LInYi8aU" height="1" width="1"/&gt;</description><pubDate>Sun, 15 Mar 2009 23:04:33 GMT</pubDate></item><item><title>Disabling items in a Silverlight ListBox</title><link>http://feedproxy.google.com/~r/TheAttic/~3/Y5E7eiowHWY/post.aspx</link><guid>http://feedproxy.google.com/~r/TheAttic/~3/Y5E7eiowHWY/post.aspx60</guid><description>&lt;p&gt;This is a quick tip on making the ListBox items behave as disabled.&lt;/p&gt;  &lt;p&gt;You know the semaphore, right? STOP on red, GO on green? OK. I?m drilling this with my two-year old when driving her to kindergarten every morning so lately it?s probably stuck in my mind a bit more than it should be.&lt;/p&gt;  &lt;p&gt;OK. This is a ListBox:&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="92" alt="image" src="http://tozon.info/images/blog/DisableditemsinaSilverlightListBox_12D77/image.png" width="312" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Yes, it is:&lt;/p&gt;  &lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Lights}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;BorderThickness&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemsPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Ellipse&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Fill&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Brush}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Black&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Cursor&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Hand&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemContainerStyle&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ListBoxItem&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Template&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ListBoxItem&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentPresenter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;contentPresenter&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox.ItemContainerStyle&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The data context of this ListBox is a ViewModel with the Lights property. Lights is a collection of five Light objects.&lt;/p&gt;

&lt;p&gt;One property that the Light object exposes is the Brush property; it will simply point to a solid color brush of a red, yellow or green color, respectively. The Ellipse?s Fill property is bound to the Brush property as can observed in the above code.&lt;/p&gt;

&lt;p&gt;Semaphores usually change colors in an order. The ones in this sample will blink randomly, changing their colors in 2 second intervals:&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Light()
{
    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SetColor();
    DispatcherTimer timer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DispatcherTimer()
    {
        Interval = TimeSpan.FromSeconds(2.0)
    };
    
    timer.Tick += (s, e) =&amp;gt; { &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.SetColor(); };
    timer.Start();
}

&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SetColor()
{
    Color[] colorArray = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Color[] { Colors.Red, Colors.Yellow, Colors.Green };
    Color color = colorArray[randomizer.Next(0, 3)];
    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Brush = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SolidColorBrush(color);
    &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.IsEnabled = color == Colors.Green;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Now, we want to allow the user click only on green light, OK? The last line in the above SetColor method sets the IsEnabled property on the Light object only when the current color is set to Green.&lt;/p&gt;

&lt;p&gt;With the IsEnabled property up and about, it gets really easy. To prevent the user from clicking on the ListBox item, simply set bind its IsHitTestVisible property to IsEnabled property on the Light class (bold underlined part added):&lt;/p&gt;

&lt;div&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;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ListBoxItem&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentPresenter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;contentPresenter&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;4&amp;quot;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;&lt;u&gt;&lt;span style="color: #ff0000"&gt;IsHitTestVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding IsEnabled}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Cursor&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Hand&amp;quot;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;[Cursor property is there for instant visual feedback on when the item is enabled]&lt;/p&gt;

&lt;p&gt;That?s it, really. You can test it by adding i.e. a Click event handler to the contentPresenter and display a message box or something (included in the sample below). You would also want to build a better templates for the enabled/disabled items. If built around the bound IsEnabled property, it should work fine.&lt;/p&gt;

&lt;p align="center"&gt;&lt;iframe src="http://tozon.info/sl/semaphore/" frameborder="0" width="500" height="60"&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Semaphore.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/03/10/Disabling-items-in-a-Silverlight-ListBox.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/03/10/Disabling-items-in-a-Silverlight-ListBox.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Y5E7eiowHWY:YU4bfeWbOZI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Y5E7eiowHWY:YU4bfeWbOZI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Y5E7eiowHWY:YU4bfeWbOZI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Y5E7eiowHWY:YU4bfeWbOZI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Y5E7eiowHWY:YU4bfeWbOZI:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/Y5E7eiowHWY" height="1" width="1"/&gt;</description><category>Development,MVVM,Layout,Silverlight</category><pubDate>Tue, 10 Mar 2009 21:27:12 GMT</pubDate></item></channel></rss>