<?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; xbap</title>
	<atom:link href="http://scorbs.com/tag/xbap/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>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>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>WPF Internet Sandbox Feature List (XBAPS &amp; Loose XAML)</title>
		<link>http://scorbs.com/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/</link>
		<comments>http://scorbs.com/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 02:12:54 +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/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/</guid>
		<description><![CDATA[Two main types of WPF content is sandboxed today: XAML Browser Applications (XBAPs).&#160; XBAPs are online-only ClickOnce applications that are cached &#38; run in the browser. Loose XAML.&#160; Loose XAML are XAML-only files that can be navigated to in the &#8230; <a href="http://scorbs.com/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>Two main types of WPF content is sandboxed today:
<ul>
<li><strong>XAML Browser Applications (XBAPs)</strong>.&nbsp; XBAPs are online-only ClickOnce applications that are cached &amp; run in the browser.
<li><strong>Loose XAML</strong>.&nbsp; Loose XAML are XAML-only files that can be navigated to in the browser.</li>
</ul>
<p>I&#8217;ve gotten questions about the specific feature list for the WPF sandbox.&nbsp; Below&nbsp;is the high level list.&nbsp; &nbsp;Other great resources about the sandbox include:</p>
<ul>
<li><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/wpfsecuritysandbox.asp">Windows Presentation Foundation Security Sandbox Whitepaper</a>
<li><a href="http://msdn2.microsoft.com/en-us/library/aa970910.aspx">Windows SDK: WPF Partial Trust Security</a>
<li>Security Notes on individual <a href="http://msdn2.microsoft.com/en-us/library/ms753307.aspx">API reference pages</a></li>
</ul>
<p>If you&#8217;re interested in why something was including/excluding from the sandbox, check the above <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/wpfsecuritysandbox.asp">whitepaper</a>.&nbsp; If you can&#8217;t find an answer here, feel free to post a comment on this blog entry.</p>
<p><strong>V1 Internet&nbsp;Sandbox Features</strong></p>
<p>These features are available in the WPF Internet sandbox:</p>
<table style="margin-left: 4.65pt; width: 307pt; border-collapse: collapse" cellspacing="0" cellpadding="0" width="409" border="0">
<tbody>
<tr style="height: 15pt">
<td style="padding-right: 5.4pt; border-top: #d8d8d8 1pt solid; padding-left: 5.4pt; background: #d8d8d8; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-width: 1pt; border-right-color: #d8d8d8" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal"><b><span style="color: black">Category<o:p></o:p></span></b></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; border-top: #d8d8d8 1pt solid; padding-left: 5.4pt; border-left-width: 1pt; border-left-color: #d8d8d8; background: #d8d8d8; padding-bottom: 0in; width: 206pt; padding-top: 0in; border-bottom: #d8d8d8 1pt solid" valign="bottom" nowrap width="275">
<p style="margin-bottom: 0pt; line-height: normal"><b><span style="color: black">Features<o:p></o:p></span></b></p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; margin-bottom: 0pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; line-height: normal; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap>General </td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">Browser Window<br />Site of Origin (SOO) Access<br />IsolatedStorage (512KB Limit)<br />UIAutomation Providers<br />Commanding<br />Input Method Editors (IMEs)<br />Tablet Stylus/Ink<br />Simulated drag/drop&nbsp;via MouseCapture/MouseMove<br />OpenFileDialog<br />XAML Deserialization (via XamlWriter.Load)</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Web Integration</span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">Browser Download Dialog<br /><span class="SpellE">TopLevel</span> User-Initiated Navigation<br />mailto:links<br />URI Parameters<br />ASMX Web Services<br /><span class="SpellE">HTTPWebRequest</span>&nbsp;to Site of origin<br />XBAP/Loose XAML Hosted in IFRAME<br />Hosting of&nbsp;Site of Origin&nbsp;HTML pages</span></p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Visuals</span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">2D/3D<br />Animations<br />Media (Site of Origin &amp; Cross D<span class="SpellE">omain</span>)<br />Imaging/Audio/Video</span></p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Reading<o:p></o:p></span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal"><span class="SpellE">FlowDocuments</span> <br />XPS Documents<br />Embedded &amp; System Fonts<br />CFF &amp; TrueType Fonts</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none; mso-border-left-alt: solid #d8d8d8 .5pt; mso-border-bottom-alt: solid #d8d8d8 .5pt" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Editing<o:p></o:p></span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">Spell Check<br /><span class="SpellE">RichTextBox</span> <br />Plaintext/Ink Clipboard Support<br />Partial XAML Clipboard&nbsp;Support<br />User Initiated Paste<br />Copy of Selected Content<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Controls<o:p></o:p></span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">All basic controls<br /><span class="SpellE">Popups</span> bound to Window</span></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>V1 Features Excluded from Internet Sandbox</strong></p>
<p>The features are disabled in the WPF Internet sandbox.&nbsp; Some these features were excluded from the sandbox for&nbsp;inherent security reasons.&nbsp; Others were the result of V1 timeline/resource constraints.&nbsp;</p>
<table style="margin-left: 4.65pt; width: 307pt; border-collapse: collapse" cellspacing="0" cellpadding="0" width="409" border="0">
<tbody>
<tr style="height: 15pt">
<td style="padding-right: 5.4pt; border-top: #d8d8d8 1pt solid; padding-left: 5.4pt; background: #d8d8d8<br />
; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-width: 1pt; border-right-color: #d8d8d8" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal"><b><span style="color: black">Category<?XML:NAMESPACE PREFIX = O /><o:p></o:p></span></b></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; border-top: #d8d8d8 1pt solid; padding-left: 5.4pt; border-left-width: 1pt; border-left-color: #d8d8d8; background: #d8d8d8; padding-bottom: 0in; width: 206pt; padding-top: 0in; border-bottom: #d8d8d8 1pt solid" valign="bottom" nowrap width="275">
<p style="margin-bottom: 0pt; line-height: normal"><b><span style="color: black">Features<o:p></o:p></span></b></p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; margin-bottom: 0pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; line-height: normal; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap>General </td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">Window class (includes app-defined dialogs)<br />Launching of New Windows<br />SaveFileDialog<br />Cross Domain Access<br />File System &amp; Registry Access<br />Drag &amp; Drop<br />XAML Serialization (via XamlWriter.Save)<br />UI Automation Clients</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Web Integration</span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">Windows Communication Foundation (&#8220;Indigo&#8221;)<br />Windows Workflow Foundation<br />Scripting<br />Document Object Model (DOM) exposure/access</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">General Integration</p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">HwndHost<br />Full Speech Support<br />WindowsForms Interop (&#8220;Crossbow&#8221;)</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal"><o:p></o:p></span></p>
<p style="margin-bottom: 0pt; line-height: normal">Visuals</span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal"><span class="SpellE"></span>BitmapEffects<br />Image Encoding</p>
</td>
</tr>
<tr>
<td style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; border-left: #d8d8d8 1pt solid; width: 101pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-right-style: none; mso-border-left-alt: solid #d8d8d8 .5pt; mso-border-bottom-alt: solid #d8d8d8 .5pt" valign="bottom" nowrap width="135">
<p style="margin-bottom: 0pt; line-height: normal">Editing<o:p></o:p></span></p>
</td>
<td style="border-right: #d8d8d8 1pt solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 206pt; border-top-style: none; padding-top: 0in; border-bottom: #d8d8d8 1pt solid; border-left-style: none" valign="bottom" width="275">
<p style="margin-bottom: 0pt; line-height: normal">RTF Clipboard<br />Full XAML Clipboard Support</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Vocabulary/Drill Downs</strong></p>
<ul>
<li>Site of Origin or Same Site Access.
<ul>
<li>Ability to talk to back to application deployment server.
<li>Example: <a href="http://foo.com">http://foo.com</a> has access content/web services at <a href="http://foo.com">http://foo.com</a> &amp; <a href="http://foo.com/bar">http://foo.com/bar</a>.&nbsp; It does NOT have access to <a href="https://foo.com">https://foo.com</a> (secure) or <a href="http://zoo.foo.com">http://zoo.foo.com</a> (subdomain).</li>
</ul>
<li>Simulated Drag/Drop
<ul>
<li>OLE Drag/Drop is not enabled in V1.
<li>App developers can simulate INTRA-app drag/drop using MouseCapture &amp; MouseMove.</li>
</ul>
<li>Browser Download Dialog
<ul>
<li>Browser-specific download dialog shown when navigating to a file whose HTTP header has&nbsp;&#8217;Content-Disposition: Attachment&#8217;
<li>As SaveFileDialog is not available in V1 sandbox, Browser Download Dialog is possible workaround.</li>
</ul>
<li>IsolatedStorage
<ul>
<li>Data storage mechanism that provides isolation &amp; safety.&nbsp; (<a href="http://msdn2.microsoft.com/en-us/library/bdts8hk0.aspx">More details</a>.)
<li>Place to store data between sessions. </li>
</ul>
<li>Partial XAML Clipboard Support
<ul>
<li>Copy/paste of content between two Internet XBAPs will&nbsp;copy/paste XAML.
<li>Copy from a Internet XBAP in to a full trust WPF application will paste plain text.
<li>Copy from a full trust WPF application in to an Internet XBAP will paste XAML.
<li>Note: this constraint is to prevent escalation of privilege attacks using the clipboard.</li>
</ul>
<li>User Initiated Paste
<ul>
<li>Programmatic paste is disallowed in the sandbox.
<li>Only Ctrl-P &amp; Paste Menus (context menu, browser menu) will result in a paste.</li>
</ul>
<li>User Initiated Top Level Navigation
<ul>
<li>A navigation is top level if it is to content <em>external</em> to the application.&nbsp;
<li>Example:&nbsp; &lt;Hyperlink NavigateUri=&#8221;http://foo.com&gt;Link&lt;/Hyperlink&gt;
<li>A user initiated navigation is&nbsp;a navigation that results from&nbsp;a user click on a &lt;Hyperlink&gt; element.</li>
</ul>
<li>Media (Site of Origin &amp; Cross D<span class="SpellE">omain</span>)
<ul>
<li>Rendering &amp; bits/pixel access to site of origin images/videos/audio.
<li>Rendering (but not bits/pixel access) to cross domain images, with below constraints.</li>
</ul>
</li>
</ul>
<p><img src="http://static.flickr.com/120/293438543_4ef5f3b395.jpg?v=0"></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/11/09/wpf-internet-sandbox-feature-list-xbaps-loose-xaml/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Healthcare Application &#8211; Source Code Posted!</title>
		<link>http://scorbs.com/2006/10/30/healthcare-application-source-code-posted/</link>
		<comments>http://scorbs.com/2006/10/30/healthcare-application-source-code-posted/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 22:28:25 +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/2006/10/30/healthcare-application-source-code-posted/</guid>
		<description><![CDATA[Source code for the Contoso Healthcare Application is now posted on the community site! (Thanks Karsten!) This is a great app. (I demoed it&#160;at TechEd Southeast Asia &#38; its been shown at many other events as well).&#160; It showcases, among &#8230; <a href="http://scorbs.com/2006/10/30/healthcare-application-source-code-posted/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>Source code for the <a title="Healthcare Application" href="http://wpf.netfx3.com/files/folders/applications/entry6608.aspx">Contoso Healthcare Application</a> is now <a href="http://wpf.netfx3.com/files/folders/applications/entry6608.aspx">posted</a> on the community site!  (Thanks <a href="http://blogs.msdn.com/karstenj/default.aspx">Karsten</a>!)</p>
<p>This is a great app. (I demoed it&nbsp;at TechEd Southeast Asia &amp; its been shown at many other events as well).&nbsp; It showcases, among other things:</p>
<ol>
<li>3D fliptransitions.&nbsp; (This UX paradigm is similar to a doctor&#8217;s real world experience of flipping through a patient chart.)
<li>Data visualization on a 3D surface for fast comparison.
<li>Listbox styling dependent on level of information desired.
<li>Annotations on video.
<li>Patient diagnosis in flow document format.</li>
</ol>
<p>Get the code <a href="http://wpf.netfx3.com/files/folders/applications/entry6608.aspx">here</a>.</p>
<p><a href="http://wpf.netfx3.com/files/folders/applications/entry6608.aspx"><img height="262" src="http://scorbs.com/wp-content/uploads/2006/10/WindowsLiveWriter/HealthcareApplicationSourceCodePosted_B78B/healthcareapp_thumb%5B1%5D.png" width="361"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/10/30/healthcare-application-source-code-posted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FontPlayer XBAP</title>
		<link>http://scorbs.com/2006/08/11/fontplayer-xbap/</link>
		<comments>http://scorbs.com/2006/08/11/fontplayer-xbap/#comments</comments>
		<pubDate>Sat, 12 Aug 2006 00:22: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/2006/08/11/fontplayer-xbap/</guid>
		<description><![CDATA[I thought it would be fun to update the UI (and some functionality) for the FontPlayer SDK sample. This app lets you to play with the fonts installed on your the machine. It also shows off the OpenType features of &#8230; <a href="http://scorbs.com/2006/08/11/fontplayer-xbap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>I thought it would be fun to update the UI (and some functionality) for the <a href="http://windowssdk.msdn.microsoft.com/en-us/library/ms771358.aspx">FontPlayer SDK sample</a>.  This app lets you to play with the fonts installed on your the machine.  It also shows off the OpenType features of specific fonts.</p>
<p>Some of the interesting features that I added to this app:</p>
<ul>
<li> Embedded fonts in XBAP</li>
<li> ComboBox bound to system fonts, displayed using font</li>
<li> New CheckBox template</li>
<li> Text &#8220;reflection&#8221; effect</li>
</ul>
<p>FontPlayer works with <strong>RC 1</strong>.  Run it <a href="http://scorbs.com/workapps/fontplayer/FontPlayer.xbap">here</a>.  Code found <a href="http://scorbs.com/workapps/fontplayer/FontPlayer.zip">here</a>.</p>
<p><a href="http://scorbs.com/workapps/fontplayer/FontPlayer.xbap"><img src="http://static.flickr.com/77/211440717_5294498eff_m.jpg"/></a></p>
<p><a href="http://scorbs.com/workapps/fontplayer/FontPlayer.xbap"><img src="http://static.flickr.com/77/211440688_84f3ce3bd2_m.jpg"/></a></p>
<p><strong>Screen Shots &#8211; Details</strong></p>
<p><img src="http://static.flickr.com/67/212815816_31ad30b021_t.jpg"/><br />
<em>custom font</em></p>
<p><img src="http://static.flickr.com/84/212813058_7d64c54dfd_t.jpg"/><br />
<em>font ComboBox</em></p>
<p><img src="http://static.flickr.com/57/212812175_6051398180_t.jpg"/><br />
<em>new CheckBox template</em></p>
<p><strong>Embedded fonts in XBAP</strong><br />
Custom fonts are a great way to brand the look &#038; feel for your app.  WPF&#8217;s embedded font support means I can use a custom font in a web app without affecting/installing system fonts.</p>
<p>In this app, I&#8217;m using <a href="http://notstatic.com/">Robby&#8217;s</a> custom font, <a href="http://notstatic.com/archives/43">Ingebretsen Neato</a>.  To accomplish this, I included &#8220;Ingebretsen Neato.ttf&#8221; in the project and then referenced it in this style:</p>
<p><code><br />
&#160;&#160;&lt;Style x:Key="Heading" TargetType="{x:Type TextBlock}"&#160;&#160;&gt;<br />
&#160;&#160;&#160;&#160;&lt;!– Custom font from http://notstatic.com --&gt;<br />
&#160;&#160;&#160;&#160;&lt;Setter Property=”FontFamily” <br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Value=”./Resources/#Ingebretsen Neato” /&gt;<br />
&#160;&#160;&#160;&#160;&lt;Setter Property=”FontSize” Value=”20″ /&gt;<br />
&#160;&#160;&#160;&#160;&lt;Setter Property=”Foreground” Value=”#FFFFFFFF”/&gt;<br />
&#160;&#160;&#160;&#160;&lt;Setter Property=”HorizontalAlignment” Value=”Center”/&gt;<br />
&#160;&#160;&lt;/Style&gt;<br />
</code></p>
<p>The <a href="http://blogs.msdn.com/text/">text team&#8217;s blog</a> has a lot more info about fonts &#038; typography if you&#8217;re interested.</p>
<p><strong>ComboBox bound to system fonts</strong></p>
<p>The XAML to create a ComboBox bound to the system&#8217;s font:</p>
<p><code><br />
&#160;&#160;&lt;ComboBox Name="FontFamilyComboBox" <br />
&#160;&#160;&#160;&#160;ItemsSource=<br />
&#160;&#160;&#160;&#160;&#160;&#160; ”{Binding Source={x:Static media:Fonts.SystemFontFamilies}}” <br />
&#160;&#160;&#160;&#160;ItemTemplate=”{StaticResource FontFamilyTemplate}”<br />
&#160;&#160;&#160;&#160;SelectionChanged=”FontFamilySelectionChanged”<br />
&#160;&#160;&#160;&#160;Width=”150″ HorizontalAlignment=”Center”<br />
&#160;&#160;/&gt;<br />
</code></p>
<p>In order display the font names in the actual font, I used a data template w/ a type converter.</p>
<p><code><br />
&#160;&#160;&lt;local:FontFamilyToStringConverter x:Key="FontFamilyToString" /&gt;<br />
&#160;&#160;...<br />
&#160;&#160;&lt;DataTemplate x:Key=”FontFamilyTemplate” &gt;<br />
&#160;&#160;&#160;&#160;&lt;TextBlock <br />
&#160;&#160;&#160;&#160;&#160;&#160;Text=<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;”{Binding Converter={StaticResource FontFamilyToString}}” <br />
&#160;&#160;&#160;&#160;&#160;&#160;FontFamily=”{Binding}” <br />
&#160;&#160;&#160;&#160;/&gt;<br />
&#160;&#160;&lt;/DataTemplate&gt;<br />
</code></p>
<p>The type converter was defined in the code-behind file:</p>
<p><code><br />
&#160;&#160;public class FontFamilyToStringConverter : IValueConverter<br />
&#160;&#160;{<br />
&#160;&#160;&#160;&#160;public object Convert(object value, Type targetType, <br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;object parameter, CultureInfo culture)<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160; FontFamily fontFamily = value as FontFamily;<br />
&#160;&#160;&#160;&#160;&#160;&#160; return fontFamily.ToString();<br />
&#160;&#160;&#160;&#160;}<br />
&#160;&#160;&#160;&#160;...&#160;&#160;<br />
&#160;&#160;}<br />
</code></p>
<p><strong>New CheckBox template</strong></p>
<p>I thought that a new look &#038; feel for the CheckBox would more sense for toggling the options.  I based the control template on <a href="http://notstatic.com">Robby&#8217;s<a> <a href="http://notstatic.com/archives/39">SimpleStyles</a>.  I then animated the opacity of the OptionsGrid based on the CheckBox.Checked event.</p>
<p>To see it, look at ResourcesCheckBox.xaml.</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/08/11/fontplayer-xbap/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Loose XAML, XBAPs &amp; Hyperlink Images</title>
		<link>http://scorbs.com/2006/08/01/loose-xaml-xbaps-hyperlink-images/</link>
		<comments>http://scorbs.com/2006/08/01/loose-xaml-xbaps-hyperlink-images/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 06:48:52 +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/2006/08/01/loose-xaml-xbaps-hyperlink-images/</guid>
		<description><![CDATA[As Mark Alaczar points out in his WPF sandbox whitepaper, sandboxed top level navigation requires user initiation. Some definitions to help this make sense: Top level navigation: Navigations that target the hosting web browser. For instance, navigating the entire browser, &#8230; <a href="http://scorbs.com/2006/08/01/loose-xaml-xbaps-hyperlink-images/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>As Mark Alaczar points out in his <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/wpfsecuritysandbox.asp">WPF sandbox whitepaper</a>, sandboxed top level navigation requires user initiation.</p>
<p>Some definitions to help this make sense:</p>
<ul>
<li><strong>Top level navigation:</strong> Navigations that target the hosting web browser.  For instance, navigating the entire browser, or a specific HTML &lt;iframe&gt;, to http://netfx3.com.</li>
<li><strong>User initiated:</strong> Direct result of an explicit user action.  In the case of top level navigation, this is most likely the user clicking on a hyperlink.  &#8220;Programmatic&#8221;, on the other hand, is the direct result of a dev action, like NavigationService.Navigate(&#8230;).</li>
</ul>
<p>In this version of WPF, top level navigations in sandboxed apps require &#8220;user initiation.&#8221;  Today, only the <a href="http://windowssdk.msdn.microsoft.com/en-us/library/system.windows.documents.hyperlink.aspx">Hyperlink</a> class has this notion of &#8220;user-initiatedness,&#8221; and it cannot (for security reasons) be subclassed in the internet sandbox.</p>
<p>There are many cases, however, where a more interesting Hyperlink than the default is desired.  <strong>This post uses styling to create an image hyperlink that works in the internet sandbox.</strong></p>
<p>Hyperlink is an inline-level flow content element that derives from TextElement, not ContentControl.  This means it must be put inside of a text element container like Paragraph or TextBlock.</p>
<p>To create a more general control that can be used in different layout containers, you can use a ContentControl with the following style:</p>
<p><code>
<pre>
&lt;ControlTemplate TargetType="ContentControl" x:Key="Hyperlink"&gt;
&#160;&#160;&lt;TextBlock Text="" TextWrapping="Wrap"&gt;
&#160;&#160;&#160;&#160;&lt;Hyperlink TextDecorations="" NavigateUri="http://www.netfx3.com"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&lt;Image Style="{StaticResource HyperlinkImage}"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&lt;/Image&gt;
&#160;&#160;&#160;&#160;&lt;/Hyperlink&gt;
&#160;&#160;&lt;/TextBlock&gt;
&lt;/ControlTemplate&gt;
</pre>
<p></code></p>
<p>You can than style the image, perhaps adding a mouse over trigger:</p>
<p><code>
<pre>
&lt;Style x:Key="HyperlinkImage" TargetType="{x:Type Image}"&gt;
&#160;&#160;&lt;Setter Property="Source"&gt;
&#160;&#160;&#160;&#160;&lt;Setter.Value&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&lt;BitmapImage UriSource="flowers_color.jpg"/&gt;
&#160;&#160;&#160;&#160;&lt;/Setter.Value&gt;
&#160;&#160;&lt;/Setter&gt;

&#160;&#160;&lt;Setter Property="HorizontalAlignment" Value="center"/&gt;
&#160;&#160;&lt;Setter Property="VerticalAlignment" Value="center"/&gt;
&#160;&#160;&lt;Setter Property="Stretch" Value="Uniform"/&gt;
&#160;&#160;&lt;Setter Property="IsEnabled" Value="true"/&gt;

&#160;&#160;&lt;!-- Hover Trigger to change image source--&gt;
&#160;&#160;&lt;Style.Triggers&gt;
&#160;&#160;&#160;&#160;&lt;Trigger Property="Image.IsMouseOver" Value="true"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&lt;Setter Property="Image.Source"&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;Setter.Value&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;BitmapImage UriSource="flowers_bw.jpg"/&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;/Setter.Value&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&lt;/Setter&gt;
&#160;&#160;&#160;&#160;&lt;/Trigger&gt;
&#160;&#160;&lt;/Style.Triggers&gt;
&lt;/Style&gt;
</pre>
<p></code></p>
<p>Then create the ContentControl itself:</p>
<p><code>
<pre>
&lt;WrapPanel Margin="40" Orientation="Vertical"&gt;
&#160;&#160;&lt;ContentControl&#160;&#160;Width="100" Template="{StaticResource Hyperlink}"/&gt;
&lt;/WrapPanel&gt;
</pre>
<p></code></p>
<p>You can try it out in loose xaml <a href="http://scorbs.com/workapps/hyperlink/HyperlinkSample.xaml">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/08/01/loose-xaml-xbaps-hyperlink-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XBAPs: OnDemand &amp; ClickOnce</title>
		<link>http://scorbs.com/2006/06/28/xbaps-ondemand-clickonce/</link>
		<comments>http://scorbs.com/2006/06/28/xbaps-ondemand-clickonce/#comments</comments>
		<pubDate>Thu, 29 Jun 2006 05:06:56 +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/2006/06/28/xbaps-ondemand-clickonce/</guid>
		<description><![CDATA[If your XBAP has some &#8220;heft&#8221; to it (large resource files, large assemblies, etc), it may make sense to architect your app to use ClickOnce&#8217;s OnDemand APIs. OnDemand APIs enable developers to delay download parts of the application. This can &#8230; <a href="http://scorbs.com/2006/06/28/xbaps-ondemand-clickonce/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>If your XBAP has some &#8220;heft&#8221; to it (large resource files, large assemblies, etc), it may make sense to architect your app to use ClickOnce&#8217;s OnDemand APIs.</p>
<p>OnDemand APIs enable developers to delay download parts of the application. This can result in a friendlier end-user UX. Note: OnDemand files can be traditional resource files (e.g. images, xml files, etc) or assemblies.</p>
<p><strong>Architecture Tips &#038; Tricks</strong><br />
Got satellite assemblies or large resource files? Slim down your primary EXE to the bare minimum needed to start the app. Then, when the XBAP is launched, only the application manifest, deployment manifest, and primary EXE will be downloaded. As the user navigates around the xbap, you can use a second thread to download other files/assemblies silently in the background or show app-specific progress UI.</p>
<p><strong>The Sample</strong><br />
I&#8217;ve created a sample XBAP that does just this:</p>
<ol>
<li>Has slim primary EXE.</li>
<li>Utilizes 4 large image files and a controls dll. (Approx 3MB)</li>
<li>When user navigates to xbap, she sees a landing screen while the controls dll &#038; images are being downloaded on separate thread.</li>
</ol>
<p>The major implementation steps are:</p>
<ol>
<li>Include resource files (i.e. images) as <a href="http://nerddawg.blogspot.com/2005/11/resources-in-windows-presentation.html">Content </a>not <a href="http://nerddawg.blogspot.com/2005/11/resources-in-windows-presentation.html">Resource</a>.</li>
<li>No change to control assemblies.</li>
<li>On the project properties page, select the publish tab. Click the Application Files button. Put the “OnDemand” files in to a separate group. (NOT “Required”.)</li>
<li>Add a reference to System.Deployment</li>
<li>Call the OnDemand Deployment APIs on a separate thread.</li>
</ol>
<p>Try it out <a href="http://scorbs.com/workapps/ondemand/OnDemandSample.xbap">the xbap (RC 1)</a>.  Get the code <a href="http://scorbs.com/workapps/ondemand/OnDemandSample.zip">here</a>.</p>
<p>Note: OnDemand APIs should only be called when applications are actually deployed using ClickOnce, not during F5 debug.</p>
<p><em>Pretty Illustrations</em><br />
Step 1 above: Setting resources files as Content<br />
<img src="http://scorbs.com/workapps/ondemand/ResourceProperties.bmp" /></p>
<p> Step 3 above: Setting resources files as Content<br />
<img src="http://scorbs.com/workapps/ondemand/ApplicationFiles.bmp" /></p>
<p><em>More Resources</em></p>
<ol>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms404266.aspx">MSDN ClickOnce Deployment and Localization</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/library/6czbkkbe.aspx">MSDN ClickOnce OnDemand Deployment Technology Sample</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ak58kz04.aspx">MSDN Walkthrough: Downloading Assemblies on Demand with the ClickOnce Deployment API Using the Designer</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/06/28/xbaps-ondemand-clickonce/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Caching &amp; XBAPs</title>
		<link>http://scorbs.com/2006/06/21/caching-xbaps/</link>
		<comments>http://scorbs.com/2006/06/21/caching-xbaps/#comments</comments>
		<pubDate>Thu, 22 Jun 2006 02:03:12 +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/2006/06/21/caching-xbaps/</guid>
		<description><![CDATA[When relying on resources living on a server, you can increase client app perf &#038; decrease network traffic by storing local versions. When trying to build a sandboxed XBAP, however, you cannot create your own local cache store in the &#8230; <a href="http://scorbs.com/2006/06/21/caching-xbaps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p></p><br /><p>When relying on resources living on a server, you can increase client app perf &#038; decrease network traffic by storing local versions. When trying to build a sandboxed XBAP, however, you cannot create your own local cache store in the file system beyond the space available in isolated storage (512KB).</p>
<p>Fortunately, WPF resource loading uses System.NET’s HttpWebRequest and its “Default” caching policy. In addition, depending on your resources’ sizes and your scenario, it may make sense to use a non-default caching policy when issuing your own HttpWebRequest.</p>
<p>This post aims to give you a little bit of caching context, an overview of your caching options and some sample code.<br />
<strong><br />
Understanding the HTTP Cache<br />
</strong><em><br />
How long is something good for?<br />
</em>This answer is determined through a combination of server &#038; client settings.</p>
<p>The server sets the HTTP Response Header “Expires” to indicate the time after which a resource is considered stale. A stale cache entry may not normally be retrieved unless it is first validated with the origin server as being the current version. In addition, the server may specifiy certain cache directives in the header. These include “no-cache,” “max-age,” and “must-revalidate.”</p>
<p>The client/app’s cache policy can determine whether or not a “stale” or even a “not yet stale” value should be returned. Some of these policies are time based (e.g. “okay if stale only for X days”) or location based (“return cached value if it’s there and meets server specified revalidation requirements.) However whatever the app’s cache policy, it must respect the server’s cache directives.</p>
<p><em><br />
System.Net’s Cache<br />
</em>System.Net.HttpWebRequest’s cache uses the IE cache. This has many benefits: there is a single place for user management perspective. Also, a shared store widens the chance that a recent response might have already been cached. The IE cache (“inet cache”) uses the Temporary Internet Files (“TIF”) to cache results of HTTP requests. Some details:</p>
<p>System.Net.HttpWebRequest’s cache uses the IE cache. This has many benefits: there is a single place for user management perspective. Also, a shared store widens the chance that a recent response might have already been cached. The IE cache (“inet cache”) uses the Temporary Internet Files (“TIF”) to cache results of HTTP requests. Some details:</p>
<ul>
<li><em>(Update 11 Oct 06)</em>The TIF is by default 3% of the harddrive on XP and 50MB on Vista. This amount is user configurable.</li>
<li>The TIF is clearable by users through the Internet Options control panel. It is scavenged when full.</li>
<li>On Vista, IE7 Protected Mode puts Low Integrity Level content in a separate cache.</li>
</ul>
<p><strong>Understanding the most common cache matrixes<br />
</strong>The below table calls out some of the most common caching policies. (Note: We assume that no additional server cache constraints were set other than Expires header.)<br />
<img alt="Cache Policy " src="http://static.flickr.com/64/172291043_90d1836e0d.jpg" /><br />
Note: If the server does not set the Expires http header, than the expiration=none. In this case, the machine determines what the right “Freshness” time for the resource. By default, this is 1 day but it is <a href="http://msdn2.microsoft.com/en-us/system.net.configuration.requestcachingsection.unspecifiedmaximumage.aspx">configurable</a>.</p>
<p>Note: For System.Net.HttpWebRequest, “Default” policy is somewhat misleading. Unless you explicitly set HttpWebRequest.CachePolicy (or HttpWebRequest.DefaultCachePolicy), the policy is “BypassCache.”</p>
<p><strong>What cache version to use<br />
</strong>If your resource files are large &#038; unlikely to change (and having current version is not critical), you should consider:</p>
<ul>
<li>Set a large value in your resources HTTP Expires header</li>
<li>Set cache policy to HttpRequestCacheLevel.Default.</li>
</ul>
<p>If it is critical to have the current version of the resource, you should consider:</p>
<ul>
<li>Set cache policy to HttpRequestCacheLevel.Revalidate.</li>
</ul>
<p>If you don’t want a unique caching policy, you should stiil:</p>
<ul>
<li>Manually set the cache policy to HttpRequestCacheLevel.Default when creating your own HttpWebRequests</li>
</ul>
<p><strong>How to set cache policy</strong><br />
Here is a code snippet:<br />
<code>
<pre>
      //  eCreate request
      HttpWebRequest request =
         (HttpWebRequest)WebRequest.Create(requestURI);

      //  Create &#038; set cache policy
      HttpRequestCachePolicy cachePolicy =
         new HttpRequestCachePolicy(HttpRequestCacheLevel.Default);
      request.CachePolicy = cachePolicy;
 
      //  Send request/Get response
      HttpWebResponse response = (HttpWebResponse) request.GetResponse();

      //  Put response in to stream
      Encoding enc = Encoding.GetEncoding(1252);
      StreamReader responseStream =
         new StreamReader(response.GetResponseStream(), enc);

      //  Manipulate Response stream
      //  Cleanup
      response.Close();
      responseStream.Close();
</pre>
<p></code><br />
 <strong>Resources to more deeply understand standard caching</strong></p>
<ul>
<li> <a href="http://msdn2.microsoft.com/en-us/6szcd7yh.aspx">System.NET Cache Management for Networks Applications Overview</a>
</li>
<li><a href="http://msdn2.microsoft.com/en-us/system.net.cache.httprequestcachelevel.aspx>HttpRequestCacheLevel: enum values &#038; descriptions</a>
</li>
<li>
<a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP Protocol RFC 2616 (See sections 13 &#038; 14)</a>
</li>
<li>I&#8217;ve also written a small xbap to demonstrate grabbing a text file from the web using the different caching mechanisms.  You can run it <a href="http://scorbs.com/workapps/cachetest/CacheTest.xbap">here </a>or look at the <a href="http://scorbs.com/workapps/cachetest/CacheTest.zip">code</a>.
</li>
</ul>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://scorbs.com/2006/06/21/caching-xbaps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

