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

<channel>
	<title>scorbs &#187; wpf</title>
	<atom:link href="http://scorbs.com/tag/wpf/feed/" rel="self" type="application/rss+xml" />
	<link>http://scorbs.com</link>
	<description>karen corby&#039;s fabulous blog</description>
	<lastBuildDate>Thu, 16 Feb 2012 02:20:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Expression Blend &#8211; Release Candidate Available</title>
		<link>http://scorbs.com/2007/03/14/expression-blend-release-candidate-available/</link>
		<comments>http://scorbs.com/2007/03/14/expression-blend-release-candidate-available/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 07:32:31 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/03/14/expression-blend-release-candidate-available/</guid>
		<description><![CDATA[The Expression Blend release candidate is now available! Get&#160;it here! As was recently noted in a comment, there are a bunch of very cool&#160;samples in Blend.&#160; One of them has a sweet page turning demo.&#160;&#160; I converted it to an &#8230; <a href="http://scorbs.com/2007/03/14/expression-blend-release-candidate-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /></p>
<p><font color="#444444">The <a href="http://www.microsoft.com/products/expression/en/expression-blend/default.mspx">Expression Blend</a> release candidate is now available!</font></p>
<p>Get&nbsp;it <a href="http://www.microsoft.com/products/expression/en/Expression-Blend/try.mspx">here</a>!</p>
<p><img class="center" src="http://www.microsoft.com/products/expression/en/images/ex-blend/boxShot_Blend.jpg"></p>
<p>As was recently noted in a comment, there are a bunch of very cool&nbsp;samples in Blend.&nbsp; One of them has a sweet page turning demo.&nbsp;&nbsp; I converted it to an xbap&#8230; check it out <a href="http://scorbs.com/workapps/photobook/PhotoBook.xbap">here</a>:</p>
<p>&nbsp;</p>
<p><a href="http://scorbs.com/workapps/photobook/PhotoBook.xbap"><img class="Center" src="http://farm1.static.flickr.com/170/421860499_b6604e596f.jpg"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/03/14/expression-blend-release-candidate-available/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>XBAP Contest! Deadline: March 12, 2007</title>
		<link>http://scorbs.com/2007/02/16/xbap-contest-deadline-march-12-2007/</link>
		<comments>http://scorbs.com/2007/02/16/xbap-contest-deadline-march-12-2007/#comments</comments>
		<pubDate>Sat, 17 Feb 2007 03:53:07 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[xbap]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/02/16/xbap-contest-deadline-march-12-2007/</guid>
		<description><![CDATA[Josh Smith (formerly of Infragistics) is putting on an XBAP contest! Submissions are required by March 12th. I can&#8217;t wait to see what people create!]]></description>
			<content:encoded><![CDATA[<p></p><br /><p><a href="http://joshsmithonwpf.wordpress.com/">Josh Smith</a> (formerly of <a href="http://www.infragistics.com/">Infragistics</a>) is putting on an <a href="http://joshsmithonwpf.wordpress.com/2007/02/10/the-wpf-challenge/">XBAP contest</a>!</p>
<p>Submissions are required by March 12th.</p>
<p>I can&#8217;t wait to see what people create!</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/02/16/xbap-contest-deadline-march-12-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>British Library &#8211; 3D Rare Books Experience as an XBAP</title>
		<link>http://scorbs.com/2007/01/30/british-library-3d-rare-books-experience-as-an-xbap/</link>
		<comments>http://scorbs.com/2007/01/30/british-library-3d-rare-books-experience-as-an-xbap/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 20:10:35 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[xbap]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/01/30/british-library-3d-rare-books-experience-as-an-xbap/</guid>
		<description><![CDATA[As Tim Sneath announced earlier in his blog today, the British Library has released a just awesome XBAP.&#160; I&#8217;ve been&#160;giddy about this app since I saw the first prototype.&#160; Here&#8217;s an example of technology really opening doors and offering new &#8230; <a href="http://scorbs.com/2007/01/30/british-library-3d-rare-books-experience-as-an-xbap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>As <a href="http://blogs.msdn.com/tims/">Tim Sneath</a> announced earlier in his blog today, the British Library has released a just <a href="http://www.bl.uk/ttp2/ttp1.html">awesome XBAP</a>.&nbsp; </p>
<p>I&#8217;ve been&nbsp;giddy about this app since I saw the first prototype.&nbsp; Here&#8217;s an example of technology really opening doors and offering new experiences.&nbsp; The public can see these Da Vinci&#8217;s notebooks, Mozart&#8217;s compositions, and&nbsp;many other (usually locked up) rare books&nbsp;in a fuller fidelity, richer environment&nbsp;than ever before.</p>
<p>Tim goes in to all the <a href="http://blogs.msdn.com/tims/archive/2007/01/30/great-wpf-applications-1-british-library-turning-the-pages.aspx">specific coolness</a> of the app in <a href="http://blogs.msdn.com/tims/archive/2007/01/30/great-wpf-applications-1-british-library-turning-the-pages.aspx">his post</a>.&nbsp; I definitely recommend the read.</p>
<p>Try out&nbsp;&#8221;Turning the Pages&#8221; <a href="http://www.bl.uk/ttp2/ttp1.html">here</a>.</p>
<p><a href="http://www.bl.uk/ttp2/ttp1.html"><img src="http://farm1.static.flickr.com/157/374756168_4cdab4691d.jpg"></a></p>
<p>&nbsp;</p>
<p><a href="http://www.bl.uk/ttp2/ttp1.html"><img src="http://farm1.static.flickr.com/131/374756169_d7eba08764.jpg"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/01/30/british-library-3d-rare-books-experience-as-an-xbap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TOTALLY TOTALLY cool xbap: Doninoken</title>
		<link>http://scorbs.com/2007/01/25/totally-totally-cool-xbap-doninoken/</link>
		<comments>http://scorbs.com/2007/01/25/totally-totally-cool-xbap-doninoken/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 23:24:15 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[xbap]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/01/25/totally-totally-cool-xbap-doninoken/</guid>
		<description><![CDATA[Hats off to the Japanese design agency&#160;Bascule&#160;for this excellent xbap.&#160; The funky 3D &#38; music is just awesome.&#160; A great watch. &#160; Notice the little camera in the lower left hand corner? Click on it to control the camera position &#8230; <a href="http://scorbs.com/2007/01/25/totally-totally-cool-xbap-doninoken/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>Hats off to the Japanese design agency&nbsp;<a href="http://bascule.co.jp/">Bascule</a>&nbsp;for this excellent <a href="http://www.microsoft.com/japan/windowsvista/webshowcase/domino.htm">xbap</a>.&nbsp; The funky 3D &amp; music is just awesome.&nbsp; A great watch.</p>
<p>&nbsp;</p>
<p><a href="http://www.microsoft.com/japan/windowsvista/webshowcase/domino.htm"><img src="http://farm1.static.flickr.com/83/369348243_098304f165.jpg"></a></p>
<p><i>Notice the little camera in the lower left hand corner?  Click on it to control the camera position and zoom in/out.  Sweetness.</i></p>
<p>&nbsp;</p>
<p>Thanks <a href="http://blogs.msdn.com/karstenj/archive/2007/01/25/doninoken-wpf-xbap-piece-by-bascule.aspx"/>Karsten</a> for the tip!</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/01/25/totally-totally-cool-xbap-doninoken/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Expression Design &#8211; Your CTP Copy About to Expire?</title>
		<link>http://scorbs.com/2007/01/17/expression-design-your-ctp-copy-about-to-expire/</link>
		<comments>http://scorbs.com/2007/01/17/expression-design-your-ctp-copy-about-to-expire/#comments</comments>
		<pubDate>Wed, 17 Jan 2007 18:28:06 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/01/17/expression-design-your-ctp-copy-about-to-expire/</guid>
		<description><![CDATA[An updated version of the December CTP Expression Design&#160;has been posted that has a 180 day trial license.&#160; Get it here!]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>An updated version of the December CTP <a href="http://www.microsoft.com/products/expression/en/expression-design/default.mspx">Expression Design</a>&nbsp;has been posted that has a 180 day trial license.&nbsp; Get it <a href="http://www.microsoft.com/products/expression/en/expression-design/free-trial.mspx">here</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/01/17/expression-design-your-ctp-copy-about-to-expire/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XBAP &amp; Trust Levels</title>
		<link>http://scorbs.com/2007/01/10/xbap-trust-levels/</link>
		<comments>http://scorbs.com/2007/01/10/xbap-trust-levels/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 18:19:55 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>
		<category><![CDATA[xbap]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/01/10/xbap-trust-levels/</guid>
		<description><![CDATA[XAML Browser Applications (XBAPs) in this version are promptless in-browser experiences.&#160; This has many implications: clean experience when navigating to an XBAP.&#160; (There is no Information Bar or security warning before launching the app.)&#160; cached (not installed) on the user’s &#8230; <a href="http://scorbs.com/2007/01/10/xbap-trust-levels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /></p>
<p>XAML Browser Applications (XBAPs) in this version are <b>promptless in-browser experiences</b>.&nbsp; </p>
<p>This has many implications:
<ol>
<li><b>clean experience</b> when navigating to an XBAP.&nbsp; (There is no Information Bar or security warning before launching the app.)&nbsp;
<li><b>cached</b> (not installed) on the user’s machine.
<li><b>security</b> <b>sandbox</b>. </li>
</ol>
<p>&nbsp;</p>
<h5><b>Sandboxed Applications</b> </h5>
<p>The third bullet above is especially important for XBAP developers.&nbsp;&nbsp; XBAPs obey the security contract of being in the browser: they are sandboxed according to their deployment zone.&nbsp; Today, there is no way to seamlessly “elevate” and prompt the user for additional permissions.&nbsp; (This is an often-requested feature and something we are investigating for future versions.)&nbsp; The sandboxed restriction also means that XBAP developers need to be conscious of the bounds of the security sandbox as they develop their app.&nbsp; (See <a href="http://scorbs.com/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/">previous post</a>.)
<p>Note: By default, all XBAPs request the Internet Zone permission set in their application manifest.&nbsp; In V1, there is no significant difference between the Internet &amp; Intranet permission sets.
<p>&nbsp;<br />
<h5><b>“I want my XBAP to run with full trust.&nbsp; I heard there are workarounds..?”</b> </h5>
<p>Given the sandbox restrictions and the wide range of experiences desired in the browser, this is not surprisingly a frequently asked question about XBAPs.&nbsp;
<p>If you want full trust, you should first consider building a standalone installed WPF application.&nbsp; These by default run in full trust and can be deployed using <a href="http://msdn.microsoft.com/msdnmag/issues/04/05/clickonce/default.aspx">ClickOnce</a>, giving many of the deployment benefits of a browser application.
<p>If your scenario requires that you’re an XBAP, there is <b>no built-in way for XBAPs to prompt and request more permissions.</b><b> </b>That being said, XBAPs are ClickOnce applications behind the scenes.&nbsp; That means it is possible to use ClickOnce-based methods to gain access to trusted actions.&nbsp; There are two main options:
<p><b></b>
<ol>
<li>Install an AllowPartiallyTrustedCallersAttribute’d (APTCA)assembly in to the client’s Global Assembly Cache (GAC).&nbsp; Use this full trust assembly to proxy calls for the XBAP.
<li>Install a certificate in to the user’s trusted publisher’s store.&nbsp; Use ClickOnce <a href="http://msdn2.microsoft.com/en-us/library/01daf08f.aspx">trusted application deployment</a> by signing the XBAP with the certificate. </li>
</ol>
<p><b>Neither of these workarounds are ideal from a security standpoint, but we believe the latter is the better option. </b>
<p>GAC’d APTCA assemblies are accessible to ALL partial trust callers and therefore are susceptible to repurposing by 3<sup>rd</sup> parties.&nbsp; There are ways to mitigate this exposure – for instance, one could use the [InternalsVisibleTo] attribute to only expose methods to specific “friend” XBAP assemblies.&nbsp; However, mistakes or incomplete usage of this mitigation could potentially open wide security holes.&nbsp; In addition, the management of installed APTCA assemblies is very end-user unfriendly.
<p>For intranet XBAPs, pushing out a trusted publisher certificate through group policy is a fine way of enabling LOB scenarios.&nbsp;</p>
<p> However, for consumer scenarios, trusted deployment via trusted publisher certs has its drawbacks.&nbsp; This is because it affects more than just XBAP deployment:&nbsp; many trust decisions prompts are bypassed for trusted publishers.&nbsp; Still, this workaround has the advantage of being scoped to the specific publisher.
<p>For V1 consumer XBAPs, we make the following <b>recommendations</b>:
<ol>
<li><u>Be sure your app needs to be an XBAP</u>.&nbsp; (Can it be a full trust standalone ClickOnce application?)
<li><u>Trusted app deployment is preferred</u> of the two workarounds.
<li><u>Use a separate cert to sign each XBAP group</u>.&nbsp; Otherwise, a user who decides to trust one set of XBAP will implicitly agree to trust all XBAPs (&amp; ActiveX controls, etc) signed with that certificate.&nbsp; This scopes the security impact (and responsibility) of any particular certificate.
<li><u>Use an MSI to install the cert</u>.&nbsp; This ensures installation is consistent with the configured security installation settings on the client machine (e.g. requiring Admin rights).
<li><u>Install the cert into the <i>user’s </i>trusted publisher store</u>, not the machine’s.&nbsp; This reduces the machine decisions that the trusted publisher cert can impact.
<li><u>Clearly notify the user</u> at installation that they are changing the user’s trusted publisher store.&nbsp;
<li><u>Provide clear installation instructions </u>on the page containing the XBAP.&nbsp; If the cert is not installed and the XBAP requests full trust, a “Trust Not Granted” error is shown.<u></u> </li>
</ol>
<p><b></b>
<p>Please use the above method with extreme care. We’re exploring changing XBAP elevation to work better in future versions.&nbsp; Your feedback in this area, as always, is appreciated.
<p>&nbsp;<br />
<h5><b>Other FAQs</b> </h5>
<p><em><b>How did you implement the sandbox?</b> </em>
<p>The XBAP sandbox is based on the .NET Framework security model: Code Access Security.&nbsp; In this model, permissions gate the actions that a particular app can do (i.e.&nbsp; FileIOPermission controls file system access).&nbsp; What permissions are granted depends on what deployment zone an application is deployed from.&nbsp; A detailed explanation on our implementation strategy can be found in the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/wpfsecuritysandbox.asp">WPF Sandbox Whitepaper</a>.
<p><b><i>When will you be expanding the sandbox?</i></b>
<p>We’ve had a lot of requests for specific features to be brought in to the Internet sandbox.&nbsp; Currently, we’re exploring plans for our next version.&nbsp; We would love feedback if there is a non-sandboxed feature that is blocking you.&nbsp; Please leave comments on this blog post or send requests to wpfsec at microsoft dot com.</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/01/10/xbap-trust-levels/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Yahoo! Messenger for Windows Vista (in WPF!)</title>
		<link>http://scorbs.com/2007/01/08/yahoo-messenger-for-windows-vista-in-wpf/</link>
		<comments>http://scorbs.com/2007/01/08/yahoo-messenger-for-windows-vista-in-wpf/#comments</comments>
		<pubDate>Mon, 08 Jan 2007 17:54:14 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2007/01/08/yahoo-messenger-for-windows-vista-in-wpf/</guid>
		<description><![CDATA[At CES today, Yahoo announced a new Windows Vista Messenger application built in WPF.&#160; It looks&#160;VERY hot. On Yahoo&#8217;s&#160;announcement page,&#160;they have a video demo.&#160; Check it out!]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>At CES today, Yahoo announced a new Windows Vista Messenger application built in WPF.&nbsp; It looks&nbsp;VERY hot.</p>
<p>On Yahoo&#8217;s&nbsp;<a href="http://messenger.yahoo.com/windowsvista.php">announcement page</a>,&nbsp;they have a <a href="http://us.rd.yahoo.com/evt=49874/*http://messenger.yahoo.com/vista_popup.php">video demo</a>.&nbsp; Check it out!</p>
<p><a href="http://messenger.yahoo.com/windowsvista.php" atomicselection="true"><img height="218" src="http://scorbs.com/wp-content/uploads/2007/01/WindowsLiveWriter/YahooMessengerforWindowsVistainWPF_8B38/buddy_list_04%5B2%5D_thumb%5B2%5D.jpg" width="240"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2007/01/08/yahoo-messenger-for-windows-vista-in-wpf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Photo Screen Saver</title>
		<link>http://scorbs.com/2006/12/21/photo-screen-saver/</link>
		<comments>http://scorbs.com/2006/12/21/photo-screen-saver/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 20:03:10 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2006/12/21/photo-screen-saver/</guid>
		<description><![CDATA[Using my new template, I wanted to create&#160;a screen saver&#160;for my photos.&#160; I liked the look of the Picasa screen saver and wanted to see if I&#160;accomplish something similar in WPF.&#160; Below is the result.&#160; The photos animate in &#38; &#8230; <a href="http://scorbs.com/2006/12/21/photo-screen-saver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>Using my new <a href="http://scorbs.com/2006/12/21/wpf-screen-saver-template/">template</a>, I wanted to create&nbsp;a screen saver&nbsp;for my photos.&nbsp; I liked the look of the Picasa screen saver and wanted to see if I&nbsp;accomplish something similar in WPF.&nbsp; Below is the result.&nbsp; </p>
<p><img src="http://farm1.static.flickr.com/135/328898823_ae9eb3dfd6_m.jpg">
<p>The photos animate in &amp; out&nbsp;to random locations.&nbsp; It&#8217;s also configurable to show photos from any directory on your machine.</p>
<p>You can get the screen saver <a href="http://scorbs.com/workapps/screensaver/PixPile-v2.zip">here</a>.&nbsp;&nbsp; </p>
<p><strong>To Install</strong></p>
<ol>
<li>Be sure you have <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&amp;displaylang=en">.NET Framework&nbsp;3.0</a>.&nbsp;&nbsp; (If you&#8217;re running Vista, you&#8217;re good to go!)
<li>Download the <a href="http://scorbs.com/workapps/screensaver/PixPile-v2.zip">ZIP file</a>&nbsp;and Extract All files.
<li>Copy the PixPile.scr file to convenient location on your C: drive.
<li>Right click the PixPile.scr file.
<li>Select Install. </li>
</ol>
<p><strong>To Configure</strong></p>
<ol>
<li>In the Windows Screen Saver Dialog, select the PixPile&nbsp;screen saver.
<li>Click Settings button. </li>
</ol>
<p><strong>To Uninstall:</strong></p>
<ol>
<li>Delete the Spiral.scr file.</li>
</ol>
<p>&nbsp;</p>
<p><em>08 Jan 07:&nbsp; </em></p>
<ul>
<li>Fixed&nbsp;a crash after long runs.</li>
</ul>
<p><em>18 Jan 07:&nbsp;</em></p>
<ul>
<li>Changed photo &#8220;drop shadow&#8221; from using a BitmapEffect to an transparent Rectangle&nbsp;to enhance&nbsp;perf. &nbsp;</li>
<li>Reduced border size and tweeked fade in animation,&nbsp; </li>
<li>Added&nbsp;setting to change min and max photo size to work better with screens of different resolutions.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/12/21/photo-screen-saver/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>WPF Screen Saver Visual Studio Template!</title>
		<link>http://scorbs.com/2006/12/21/wpf-screen-saver-template/</link>
		<comments>http://scorbs.com/2006/12/21/wpf-screen-saver-template/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 19:58:28 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2006/12/21/wpf-screen-saver-template/</guid>
		<description><![CDATA[I thought it would be fun to create a WPF screen saver.&#160;&#160;I built one with Robert Hogue&#8216;s most excellent Material Group &#8220;Background Animation&#8221; visuals.&#160; (You can find it in his Sample Pack.)&#160; You can download the screen saver and/or the &#8230; <a href="http://scorbs.com/2006/12/21/wpf-screen-saver-template/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /></p>
<p>I thought it would be fun to create a WPF screen saver.&nbsp;&nbsp;I built one with <a href="http://www.therhogue.com/WinFX/">Robert Hogue</a>&#8216;s most excellent Material Group &#8220;Background Animation&#8221; visuals.&nbsp; (You can find it in his <a href="http://www.therhogue.com/WinFX/">Sample Pack</a>.)&nbsp; You can download the <a href="http://scorbs.com/workapps/screensaver/Spiral.zip">screen saver</a> and/or the <a href="http://scorbs.com/workapps/screensaver/SpiralSource.zip">code</a>.
<p><img src="http://farm1.static.flickr.com/131/328627618_073aa4f3d2_m.jpg"></p>
<p>However, I thought it would be even more fun if everyone else would write screen savers too.&nbsp; :) To facilitate this, I&#8217;ve written a<u> VS template for WPF screen savers</u>.
<p><strong>Screen Saver Template &#8211; Installation Instructions</strong>
<ol>
<li>Download the template <a title="WPF Screen Saver Template" href="http://scorbs.com/vstemplates/WPFScreenSaverApplication.zip">here</a>.
<li>Move the zip file to &lt;MY DOCUMENTS&gt;Visual Studio 2005TemplatesProjectTemplatesVisual C#”..&nbsp; (DO NOT unzip it)</li>
</ol>
<p>When creating a new project, &#8220;Screen Saver Application (WPF)&#8221; will now be an&nbsp;&#8221;Visual C#&#8221; project type option.</p>
<p><img src="http://farm1.static.flickr.com/144/328627692_b72a21baa3.jpg"></p>
<p>&nbsp;</p>
<p><strong>Deploying the Screen Saver</strong></p>
<p>In order to deploy your screen saver, you must rename the RELEASE build of the screen saver executable to have a &#8220;.scr&#8221; extension:</p>
<ol>
<li>Go to binRelease folder of your project.
<li>Rename the .exe to .scr.&nbsp; (e.g.&#8221;ScreenSaver.exe&#8221; becomes &#8220;ScreenSaver.scr&#8221;)
<li><u>If using .NET Application Settings, see important note below. </u></li>
</ol>
<p><strong>Installing the Screen Saver</strong></p>
<p>To install on a user&#8217;s machine:</p>
<ol>
<li>Copy the .scr file (&amp; any dependent files) to convenient location on your C: drive.
<li>Right click the .scr file.
<li>Select Install. </li>
</ol>
<p>To configure on a client machine:</p>
<ol>
<li>In the Windows Screen Saver Dialog, select the screen saver.
<li>Click Settings button. </li>
</ol>
<p>To uninstall:</p>
<ol>
<li>Delete .scr file. </li>
</ol>
<p><strong>Screen Saver Files</strong></p>
<p>The template creates the following main files for you: </p>
<ol>
<li>App.xaml/App.xaml.cs &#8211; sets up screen saver application.
<li>Window1.xaml/Window1.xaml.cs &#8211; main visuals of screen saver
<li>Settings.xaml/Settings.xaml.cs &#8211; settings window of screen saver </li>
</ol>
<p><strong>Screen Saver Modes</strong></p>
<p>The screen saver can be launched with different command line arguments:</p>
<ul>
<li>&lt;no args&gt;:&nbsp;Display screen saver
<li>&#8220;/s&#8221;: &nbsp;Display screen saver
<li>&#8220;/c&#8221;: &nbsp;Show settings window </li>
</ul>
<p><strong>Debugging <br /></strong><br />In DEBUG configurations, the screen saver window&#8217;s &#8220;topmost&#8221;-ness and &#8220;shutdown on key/mouse input&#8221; are disabled. To close the window, hit Ctl-F4. </p>
<p>To debug the settings window&#8230;</p>
<ol>
<li>Go to the project properties pane. (Right click the project in the Solution Explorer <br />&amp; select &#8220;Properties&#8221;).
<li>Select Debug on the left tabs.
<li>Find &#8220;Command Line Args&#8221; textbox under &#8220;Start Options&#8221;.
<li>Enter: /c </li>
</ol>
<p><strong>Saving Screen Saver Settings</strong></p>
<p>I highly recommend using the <a href="http://msdn2.microsoft.com/en-us/library/k4s6c3a0.aspx">.NET Application Settings</a> feature to save user-configured screen saver settings. </p>
<p>Here&#8217;s the quick run down of how to do it.
<ol>
<li>Determine which settings you need.&nbsp; The default settings store only supports limited Type, so make sure to use an appropriate format.
<li>Add the settings to the Settings.settings file using the designer.&nbsp; By default, these are saved to a per user, file system-based .NET&nbsp;settings store.
<li>Access the settings using Properties.Settings.Default.YourSettingName.</li>
</ol>
<p>For the screen saver above, I defined one setting in the designer:</p>
<p><img src="http://farm1.static.flickr.com/130/328627657_fbac84a10e.jpg"></p>
<p>In my Settings.xaml.cs file, I accessed it:</p>
<p>&nbsp;<code>//initialize color picker with BackgroundColor application setting<br />TypeConverter colorTypeConverter = TypeDescriptor.GetConverter(typeof(Color));<br />MyColorPicker.Color = (Color) colorTypeConverter.ConvertFrom(Properties.Settings.Default.BackgroundColor) ; </code></p>
<p>As well as saved it:</p>
<p><code>//set BackgroundColor application setting to color picker's color<br />TypeConverter colorTypeConverter = TypeDescriptor.GetConverter(typeof(Color));<br />Properties.Settings.Default.BackgroundColor = colorTypeConverter.ConvertTo(MyColorPicker.Color, typeof(string)) as string;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />//flush application settings<br />Properties.Settings.Default.Save(); </code></p>
<p>Finally, I renamed &#8220;MaterialGroupScreenSaver.exe&#8221; to &#8220;Spiral.scr.&#8221;</p>
<p>IMPORTANT NOTE: </p>
<p>By default, the .NET Application Settings framework stores user settings based on the executing assembly name.&nbsp;&nbsp; If you use .NET Application Settings with the default settings store,<br /><u>YOU MUST GIVE YOUR SCREEN SAVER ASSEMBLY A NAME WITH 8 CHARACTERS OR LESS. </u></p>
<p>Why? The Windows Screen Saver Dialog launches the screen saver (for settings &amp; preview) using the full assembly name (e.g. MyCoolScreenSaver.scr).&nbsp; However, when launching the screensaver for real, Windows uses the shortened version (e.g. MYCOOL~1.SCR). Since the name is different, the settings are loaded from a different place.
<p>&nbsp;
<p><strong>Release Notes</strong></p>
<ul>
<li>Does not support real time preview in the Windows Screen Saver Dialog&#8217;s embedded display.
<li>The screen saver duplicates the visuals on each monitor by creating an additional instances of Window1. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/12/21/wpf-screen-saver-template/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>WPF Updates!</title>
		<link>http://scorbs.com/2006/12/06/wpf-updates/</link>
		<comments>http://scorbs.com/2006/12/06/wpf-updates/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 19:09:54 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://scorbs.com/2006/12/06/wpf-updates/</guid>
		<description><![CDATA[A couple exciting updates: WPF/E&#160;has released their first CTP!&#160; Download it for Windows&#160;and Mac. Karsten Januszewski has released source code for the Woodgrove Finance Application. Expression Blend (formerly Expression Interactive Designer) has released their Beta with a hot new look.&#160; &#8230; <a href="http://scorbs.com/2006/12/06/wpf-updates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>A couple exciting updates:</p>
<ul>
<li><a href="http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx">WPF/E</a>&nbsp;has released their first CTP!&nbsp; Download it for <a href="http://go.microsoft.com/fwlink/?LinkID=77792&amp;clcid=0x409">Windows</a>&nbsp;and <a href="http://go.microsoft.com/fwlink/?LinkID=77792&amp;clcid=0x409">Mac</a>.
<li><a href="http://blogs.msdn.com/karstenj/default.aspx">Karsten Januszewski</a> has released <a href="http://blogs.msdn.com/karstenj/archive/2006/12/05/woodgrove-finance-application-source-code-posted.aspx">source code</a> for the <a href="http://scorbs.com/2006/06/16/woodgrove-demo/">Woodgrove Finance Application</a>.
<li><a href="http://blogs.msdn.com/expression/default.aspx">Expression Blend</a> (formerly Expression Interactive Designer) has released their Beta with a hot new look.&nbsp; Download&nbsp;the trial <a href="http://www.microsoft.com/products/expression/en/expression-design/free-trial.mspx">here</a>. </li>
</ul>
<p><img src="http://static.flickr.com/102/315861754_683adc869f.jpg"></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/12/06/wpf-updates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

