<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>End of Stream</title>
	
	<link>http://endofstream.com</link>
	<description>Bits falling into nothingness</description>
	<lastBuildDate>Thu, 28 Jul 2011 13:41:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/EndOfStream" /><feedburner:info uri="endofstream" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Unable to open links in Office Outlook or Word 2007</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/4k3WcCTXba4/</link>
		<comments>http://endofstream.com/unable-to-open-links-in-office-outlook-or-word-2007/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 15:13:10 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows Registry]]></category>
		<category><![CDATA[Word]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=391</guid>
		<description><![CDATA[Recently I had a friend with a very curious problem, every time he tried to open a link embedded in an email in Office Outlook 2007 &#8211; or just in Office Word 2007, he would get an error. This operation has been cancelled dye to restrictions in effect on this computer. This problem appeared to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a friend with a very curious problem, every time he tried to open a link embedded in an email in Office Outlook 2007 &#8211; or just in Office Word 2007, he would get an error.</p>
<pre>This operation has been cancelled dye to restrictions in effect on this computer.</pre>
<p>This problem appeared to be due to problems with Google Chrome in this case, however the same issue can arise with other browsers such as Firefox. I found the solution online for an older version of windows, since I encountered the problem on Windows 7.</p>
<p>To solve the problem you will have to be logged into your computer as administrator, and follow these steps:</p>
<ol>
<li>Press start, and type &#8216;regedit&#8217; in the search field &#8211; then press enter (alternative use &#8220;win+r&#8221; and type regedit)</li>
<li>If windows asks permission say ok!</li>
<li>Navigate to the following path:<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Classes</li>
<li>Here locate the folder .html in the left pane</li>
<li>If the (Standard) value in the right side says anything else than htmlfile then delete the value and type htmlfile and press ok.</li>
<li>Repeat step 4&amp;5 for the folders named .htm &amp; .shtml</li>
<li>Exit the registry editor</li>
<li>Restart windows</li>
</ol>
<p>This solved the problem in my case, the values in the registry was not htmlfile as it should be but was ChromeHTML, had the problem been with Firefox it would have been FireFoxHTML.</p>
<p>Best Regards</p>
<p>/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_4" ><img src="http://ecx.images-amazon.com/images/I/41DDJftQoyL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/41DDJftQoyL.jpg" class="aga aga_5"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_6" ><span class="asin-title">Microsoft Office Home & Student 2010 - 3PC/1User [Download] (Software Download)</span></a></h2>
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$149.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$124.99 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<span class="amazon-release-date">Release date June 15, 2010.</span>
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_7"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/Tyc6vbNNxPaOWoMPPwMnbUKsDIg/0/da"><img src="http://feedads.g.doubleclick.net/~a/Tyc6vbNNxPaOWoMPPwMnbUKsDIg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Tyc6vbNNxPaOWoMPPwMnbUKsDIg/1/da"><img src="http://feedads.g.doubleclick.net/~a/Tyc6vbNNxPaOWoMPPwMnbUKsDIg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/4k3WcCTXba4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/unable-to-open-links-in-office-outlook-or-word-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://endofstream.com/unable-to-open-links-in-office-outlook-or-word-2007/</feedburner:origLink></item>
		<item>
		<title>Deploying SQL CompactDB on Vista – Continued</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/MPJdwsdJrvI/</link>
		<comments>http://endofstream.com/deploying-sql-compactdb-on-vista-continued/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 12:31:01 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=382</guid>
		<description><![CDATA[This post is a follow up to the original post &#8220;Deploying SQL CompactDB on Vista&#8220;. The reason for this continued post is that when the time came for deploing my particular application utilizing SQL CompactDB I ran into some additional problems &#8211; which has not been covered in my first post. The scenario in my [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow up to the original post &#8220;<a href="http://endofstream.com/sql-compact-db-vista/"  target="_blank">Deploying SQL CompactDB on Vista</a>&#8220;. The reason for this continued post is that when the time came for deploing my particular application utilizing SQL CompactDB I ran into some additional problems &#8211; which has not been covered in my first post.</p>
<p>The scenario in my case was that I could deploy the application on the local machine - but when I tried deploying the application on another machine running Vista, it crashed! After some digging around (had not spent too much time creating and or logging proper error messages or exceptions &#8211; let that be a lesson to me) I found the problem. The exception thrown held the following message:</p>
<pre>"The specified store provider cannot be found in the configuration, or is not valid."</pre>
<p>As it turned out the App.config file was missing the provider &#8211; to remedy this fact I added the following code to the App.config file:</p>
<pre>&lt;system.data&gt;
   &lt;DbProviderFactories&gt;
      &lt;remove invariant="System.Data.SqlServerCe.3.5"/&gt;
      &lt;add name="Microsoft SQL Server Compact Data Provider"  invariant="System.Data.SqlServerCe.3.5"
                 description=".NET Framework Data Provider for Microsoft SQL Server Compact"
                 type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt;
   &lt;/DbProviderFactories&gt;
&lt;/system.data&gt;</pre>
<p>The invariant value is the name of the provider which you call from the code.</p>
<p>With this small addition, all the problems was solved with deployment to other Vista machines&#8230;</p>
<p>Best Regards<br />
/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Server-Database-Development-Compact-Framework/dp/1590591194%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1590591194" class="aga aga_12" ><img src="http://ecx.images-amazon.com/images/I/51YaSqM9OQL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/51YaSqM9OQL.jpg" class="aga aga_13"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Server-Database-Development-Compact-Framework/dp/1590591194%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1590591194" class="aga aga_14" ><span class="asin-title">SQL Server CE Database Development with the .NET Compact Framework (Paperback)</span></a></h2>
					<span class="amazon-author">By (author) Rob Tiffany</span><br />
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$49.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$32.99 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$3.70 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Server-Database-Development-Compact-Framework/dp/1590591194%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1590591194" class="aga aga_15"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/moztiG2GLWA5dYYFGhmfQQahmL8/0/da"><img src="http://feedads.g.doubleclick.net/~a/moztiG2GLWA5dYYFGhmfQQahmL8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/moztiG2GLWA5dYYFGhmfQQahmL8/1/da"><img src="http://feedads.g.doubleclick.net/~a/moztiG2GLWA5dYYFGhmfQQahmL8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/MPJdwsdJrvI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/deploying-sql-compactdb-on-vista-continued/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://endofstream.com/deploying-sql-compactdb-on-vista-continued/</feedburner:origLink></item>
		<item>
		<title>Remove document edit protection in Word 2007</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/Y9zfmz-msX8/</link>
		<comments>http://endofstream.com/remove-document-edit-protection-in-word-2007/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 08:30:17 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Word]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=379</guid>
		<description><![CDATA[When editing a word 2007 document you may, as I did, run into a situation where the document has been protected against editing. In office 2003 this can be fixed by the use of the Script Editor &#8211; as seen in this example. However in 2007 the method is a bit different, here is what [...]]]></description>
			<content:encoded><![CDATA[<p>When editing a word 2007 document you may, as I did, run into a situation where the document has been protected against editing. In office 2003 this can be fixed by the use of the Script Editor &#8211; as seen in <a href="http://www.whatsmypass.com/remove-document-protection-in-word" class="aga aga_21" target="_blank">this example</a>. However in 2007 the method is a bit different, here is what I had to do &#8211; inspired by the example from 2003:</p>
<ul>
<li>First you need to change the .docx file extension to .zip</li>
<li>Then you open the file with winrar/winzip or whatever</li>
<li>You now navigate into the word folder and locate the settings.xml file &#8211; you extract this file and open it for editing</li>
<li>In the settings.xml file you locate the &lt;w:documentProtection&gt; element and delete all attributes for this element &#8211; and then save the settings.xml file</li>
<li>Now you replace the original settings.xml file (in the zip file) with the new edited settings.xml file</li>
<li>Finally you rename the .zip file extension back to .docx and that&#8217;s all &#8211; you can now open and edit the file in Word 2007</li>
</ul>
<p>Best Regards<br />
/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_22" ><img src="http://ecx.images-amazon.com/images/I/41DDJftQoyL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/41DDJftQoyL.jpg" class="aga aga_23"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_24" ><span class="asin-title">Microsoft Office Home & Student 2010 - 3PC/1User [Download] (Software Download)</span></a></h2>
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$149.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$124.99 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<span class="amazon-release-date">Release date June 15, 2010.</span>
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B004E9SKEQ%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB004E9SKEQ" class="aga aga_25"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/W3Vos2_bl3MWJy9jDP_aljVMPV4/0/da"><img src="http://feedads.g.doubleclick.net/~a/W3Vos2_bl3MWJy9jDP_aljVMPV4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/W3Vos2_bl3MWJy9jDP_aljVMPV4/1/da"><img src="http://feedads.g.doubleclick.net/~a/W3Vos2_bl3MWJy9jDP_aljVMPV4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/Y9zfmz-msX8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/remove-document-edit-protection-in-word-2007/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://endofstream.com/remove-document-edit-protection-in-word-2007/</feedburner:origLink></item>
		<item>
		<title>Charts: Custom LineDataPoint style with different line colors</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/41240Gi51zE/</link>
		<comments>http://endofstream.com/charts-custom-linedatapoint-style-with-different-line-colors/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 12:39:17 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Styles & Themes]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=372</guid>
		<description><![CDATA[This post is a follow up to my initial post on much the same topic &#8211; &#8220;Charts: Creating custom style for LineDataPoint&#8221;. The reason for this new post was that after the last post I needed to create a new chart with multiple lines, on these lines I wanted a custom DataPoint style &#8211; and different [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow up to my initial post on much the same topic &#8211; <a href="http://endofstream.com/charts-creating-custom-style-for-linedatapoint/"  target="_blank">&#8220;Charts: Creating custom style for LineDataPoint&#8221;</a>. The reason for this new post was that after the last post I needed to create a new chart with multiple lines, on these lines I wanted a custom DataPoint style &#8211; and different dynamically set line colors.</p>
<p>When trying to change the colors on a LineSeries with a custom DataPointStyle, I ran into some problems. As in the previous post, I used a custom style called  &#8221;DataPointStyle&#8221; (yes I know, not very inventive <img src='http://endofstream.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) and referenced it from the code in the same way as previously:</p>
<pre>Style dpStyle = Application.Current.Resources["DataPointStyle"] as Style;
lineSeries.DataPointStyle = dpStyle;</pre>
<p>What I did differently this time was that I wanted to change the Background color of the style, allowing me to have different colors for the lines shown on the chart.</p>
<pre>Style dpStyle = Application.Current.Resources["DataPointStyle"] as Style;
dpStyle.Setters.Add(new Setter(BackgroundProperty, new SolidColorBrush(Colors.Red)));
lineSeries.DataPointStyle = dpStyle;</pre>
<p>Changing the color like in the code above did actually work, but only if there was a single LineSeries shown on the chart. As soon as the style was applied to line two the application crashed.</p>
<p>It seemed obvious that it was because I was adding a new setter to the style multiple times, so I tried different solutions where I checked if the setter was already set in the style &#8211; and if so then just changing the value. However try as I might, it did not want to work&#8230;</p>
<p>Changing the color of the lines with the default style however, was not a problem. It could be done like in the following example:</p>
<pre>Style dpStyle = new Style(typeof(LineDataPoint));
dpStyle.Setters.Add(new Setter(BackgroundProperty, new SolidColorBrush(Colors.Red)));
lineSeries.DataPointStyle = dpStyle;</pre>
<p>In light of the example above I was pretty confident that problem had something to do with the fact that a new instance of this style was not created for each line. Finally after too many frustrating failed attempts, I managed to find the solution &#8211; a simple one indeed, but one that I was not aware of:</p>
<pre>Style originalStyle = Application.Current.Resources["DataPointStyle"] as Style;
var dpStyle = new Style() {BasedOn = originalStyle};
dpStyle.TargetType = typeof (LineDataPoint);
dpStyle.Setters.Add(new Setter(BackgroundProperty, new SolidColorBrush(Colors.Red)));
lineSeries.DataPointStyle = dpStyle;</pre>
<p>It is the BasedOn property for the style that does the magic here, also you have to manually tell the style which TargeTtype it should use. But once that is done everything works like a charm &#8211; the BasedOn property is available from Silverlight 3 and up, more info can be found <a href="http://msdn.microsoft.com/en-us/library/system.windows.style.basedon(VS.95).aspx" class="aga aga_31" target="_blank">here</a>.</p>
<p>Finally a little picture illustrating the final result with three different lines, in three different colors &#8211; and with a custom tooltip&#8230;</p>
<p style="text-align: center;"><a href="http://endofstream.com/wp-content/uploads/2010/09/custom_linedatapoint_colors.jpg" ><img class="size-full wp-image-375 aligncenter" title="Custom LineDataPoint with different line Colors" src="http://endofstream.com/wp-content/uploads/2010/09/custom_linedatapoint_colors.jpg" alt="" width="157" height="198" /></a></p>
<p> Best Regards<br />
/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_32" ><img src="http://ecx.images-amazon.com/images/I/51HV8%2BAvCaL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/51HV8%2BAvCaL.jpg" class="aga aga_33"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_34" ><span class="asin-title">Silverlight 4 in Action (Paperback)</span></a></h2>
					<span class="amazon-author">By (author) Pete Brown</span><br />
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$49.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$27.27 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$10.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_35"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/pJxV086OoXfJMX4gWCSq52jaDws/0/da"><img src="http://feedads.g.doubleclick.net/~a/pJxV086OoXfJMX4gWCSq52jaDws/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pJxV086OoXfJMX4gWCSq52jaDws/1/da"><img src="http://feedads.g.doubleclick.net/~a/pJxV086OoXfJMX4gWCSq52jaDws/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/41240Gi51zE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/charts-custom-linedatapoint-style-with-different-line-colors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://endofstream.com/charts-custom-linedatapoint-style-with-different-line-colors/</feedburner:origLink></item>
		<item>
		<title>Charts: Creating custom style for LineDataPoint</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/ATsw1BpequA/</link>
		<comments>http://endofstream.com/charts-creating-custom-style-for-linedatapoint/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 14:16:13 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Styles & Themes]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=356</guid>
		<description><![CDATA[If you have ever created a Silverlight application to displaying statistics, you will know of the charting functionality in Silverlight &#8211; or rather the Silverlight Toolkit from Codeplex . You will also know that there is tons of things that can be changed through styles and more, this post will explain how to change the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have ever created a Silverlight application to displaying statistics, you will know of the charting functionality in Silverlight &#8211; or rather the <a href="http://silverlight.codeplex.com/" class="aga aga_41" target="_blank">Silverlight Toolkit from Codeplex</a> <img src='http://endofstream.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . You will also know that there is tons of things that can be changed through styles and more, this post will explain how to change the default style of a Data Point.</p>
<p>First I will show a screenshot of a sample DataPoint &#8211; showing the ToolTip:</p>
<p style="text-align: center;"><img class="size-full wp-image-362 aligncenter" title="Default LineDataPoint" src="http://endofstream.com/wp-content/uploads/2010/09/default_linedatapoint.jpg" alt="" width="240" height="185" /></p>
<p>What is shown in the picture above is tooltip for a LineDataPoint, the tooltip displays the individual DataPoints DependentValue. What we will do in this example is simply to modify the style of the LineDataPoint so we can display the IndependentValue as well. Also in this example the IndependentValue is a DateTime value, so we will be creating and implementing a converter into the style, so we can display the IndependentValue in the desired format.</p>
<p>Firstly we will show the code for the Converter, which will convert the DateTime to the desired format:</p>
<pre>public class ChartDateTimeConverter : IValueConverter
{
   #region IValueConverter Members

   public object Convert(object value,System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
   {
      DateTime thisdate = (DateTime)value;
      return thisdate.ToLongDateString();
   }

   // ConvertBack is not implemented
   public object ConvertBack(object value,System.Type targetType, object parameter,System.Globalization.CultureInfo culture)
   {
      throw new NotImplementedException();
   }
   #endregion
}</pre>
<p>And here is the style, for the DataPoint:</p>
<pre>&lt;Style x:Key="DataPointStyle" TargetType="chartingToolkit:LineDataPoint"&gt;
    &lt;Setter Property="Background" Value="#0077CC" /&gt;
    &lt;Setter Property="BorderBrush" Value="White"/&gt;
    &lt;Setter Property="BorderThickness" Value="2"/&gt;
    &lt;Setter Property="IsTabStop" Value="False"/&gt;
    &lt;Setter Property="Template"&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType="chartingToolkit:LineDataPoint"&gt;
                &lt;Grid x:Name="Root" Opacity="1"&gt;
                    &lt;ToolTipService.ToolTip&gt;
                        &lt;StackPanel Margin="3"&gt;
                            &lt;StackPanel.Resources&gt;
                                &lt;Converters:ChartDateTimeConverter x:Key="ChartDateConverter"/&gt;
                            &lt;/StackPanel.Resources&gt;
                            &lt;dataInput:Label DataContext="{TemplateBinding IndependentValue}" Content="{Binding Converter={StaticResource ChartDateConverter}}"/&gt;
                            &lt;dataInput:Label Content="{TemplateBinding DependentValue}"/&gt;
                        &lt;/StackPanel&gt;
                    &lt;/ToolTipService.ToolTip&gt;
                    &lt;Ellipse StrokeThickness="{TemplateBinding BorderThickness}" Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/&gt;
                &lt;/Grid&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;</pre>
<p>Finally here is the code for adding the style to a given LineSeries object:</p>
<pre>Style dpStyle = Application.Current.Resources["DataPointStyle"] as Style;
lineSeries.DataPointStyle = dpStyle;</pre>
<p>That is all, to finish up here is a screenshot of the new result:</p>
<p style="text-align: center;"><img class="size-full wp-image-367 aligncenter" title="New DataPoint Style" src="http://endofstream.com/wp-content/uploads/2010/09/modified_linedatapoint.jpg" alt="" width="240" height="185" /></p>
<p>The style can of course be made more complex &#8211; this example is only to show the use of the converter <img src='http://endofstream.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Best Regards<br />
/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_42" ><img src="http://ecx.images-amazon.com/images/I/51HV8%2BAvCaL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/51HV8%2BAvCaL.jpg" class="aga aga_43"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_44" ><span class="asin-title">Silverlight 4 in Action (Paperback)</span></a></h2>
					<span class="amazon-author">By (author) Pete Brown</span><br />
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$49.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$27.27 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$10.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Silverlight-4-Action-Pete-Brown/dp/1935182374%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1935182374" class="aga aga_45"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/uNhC57_PMTyzIlA3J2cx_rblVag/0/da"><img src="http://feedads.g.doubleclick.net/~a/uNhC57_PMTyzIlA3J2cx_rblVag/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uNhC57_PMTyzIlA3J2cx_rblVag/1/da"><img src="http://feedads.g.doubleclick.net/~a/uNhC57_PMTyzIlA3J2cx_rblVag/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/ATsw1BpequA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/charts-creating-custom-style-for-linedatapoint/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://endofstream.com/charts-creating-custom-style-for-linedatapoint/</feedburner:origLink></item>
		<item>
		<title>Uploading files from Silverlight client using WCF RIA Services</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/bdvg2KRMMOA/</link>
		<comments>http://endofstream.com/uploading-files-from-silverlight-client-using-wcf-ria-services/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 14:09:51 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[WCF RIA Services]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=331</guid>
		<description><![CDATA[This article covers the topic of uploading files from a client to server (in a WCF RIA Services enabled Silverlight application). In this example it is described how to upload files in &#8216;chuncks&#8217; and how to store them in a SQL database. Also for good measure I have added a progress bar seeing that that [...]]]></description>
			<content:encoded><![CDATA[<p>This article covers the topic of uploading files from a client to server (in a WCF RIA Services enabled Silverlight application). In this example it is described how to upload files in &#8216;chuncks&#8217; and how to store them in a SQL database. Also for good measure I have added a progress bar seeing that that is kind of obvious thing to have on any site that enables uploads <img src='http://endofstream.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This articles builds on a similar article by axshon, the article can be found <a href="http://weblogs.asp.net/jimjackson/archive/2010/06/27/uploading-a-file-to-sql-server-via-silverlight-wcf-and-ef.aspx" class="aga aga_51" target="_blank">here</a>. What I have done is to tweak the application to work with WCF RIA Services, also I have added a progressbar as mentioned.</p>
<p>In this article I am assuming that you have the following things covered before beginning:</p>
<ul>
<li>You have created a Silverlight Application project with WCF RIA Services enabled.</li>
<li>You have a valid Data Connection to a SQL server that can be viewed through the server explorer.</li>
</ul>
<p>The first thing you will need to do is to create two tables in the database which will contain the file information and data. The design of the tow tables is shown below, also the FileID in the UploadedFile talble is an identity(1,1).</p>
<p style="text-align: center;"><img title="Database Design" class="size-medium wp-image-333 aligncenter" src="http://endofstream.com/wp-content/uploads/2010/09/uploadFileDbDesign-300x250.jpg" alt="" width="300" height="250" /></p>
<p>With the database setup, you need map the relational objects in the database, in my example I am using LINQ to SQL. Assuming you are using the same you need to add a new item to the SilverlightApplication.Web project and select &#8220;LINQ to SQL Classes&#8221; and name the file whatever you find relevant &#8211; in this example it is called DataClasses.</p>
<p>You now need to add the two created tables to your DataClasses file, this is done by opening the DataClasses file and hereafter you navigate to the Server Explorer and drag the two tables to the DataClasses file &#8211; after which you save the file and rebuild the SilverlightApplication.Web project.</p>
<p>Now you need to create a new DomainService in the SilverlightApplication.Web project as shown in the image below, in this example I have called the domain service UploadRiaService.</p>
<p style="text-align: center;"><img title="Domain Service" class="size-medium wp-image-335 aligncenter" src="http://endofstream.com/wp-content/uploads/2010/09/UploadFileAddDomainService-300x234.jpg" alt="" width="300" height="234" /></p>
<p>With the domain service created you paste the following code into the domain service:</p>
<pre>[Invoke]
public int UploadFile(string fileName, string fileType, string fileExtension, Int64 fileSize, byte[] firstFileData)
{
    int ret = 0;

    UploadedFile file = new UploadedFile();
    file.FileName = fileName;
    file.FileType = fileType;
    file.FileExtension = fileExtension;
    file.FileSize = fileSize;
    this.DataContext.UploadedFiles.InsertOnSubmit(file);
    this.DataContext.SubmitChanges();

    UploadedFilePart part = new UploadedFilePart();
    part.FileID = file.FileID;
    part.Ordinal = 0;
    part.FileDataPart = firstFileData;
    this.DataContext.UploadedFileParts.InsertOnSubmit(part);
    this.DataContext.SubmitChanges();
    ret = file.FileID;

    return ret;
}

[Invoke]
public int UploadFilePart(int fileID, int ordinal, bool overwrite, byte[] fileData)
{
     // return values:
     // 0 = Not inserted
     // 1 = Already exists
     // 2 = Inserted or updated
     int ret = 0;

     // Check to be sure this part does not already exist.
     var foundPart = (from p in this.DataContext.UploadedFileParts
                             where p.FileID == fileID
                             &amp;&amp; p.Ordinal == ordinal
                             select p).FirstOrDefault();

     if (foundPart != null &amp;&amp; overwrite)
     {
         foundPart.FileDataPart = fileData;
         this.DataContext.SubmitChanges();
         ret = 2;
     }
     else if (foundPart != null) // should not overwrite
     {
         ret = 1;
     }
     else // foundPart == null so ignore overwrite
     {
         UploadedFilePart nextPart = new UploadedFilePart();
         nextPart.FileID = fileID;
         nextPart.Ordinal = ordinal;
         nextPart.FileDataPart = fileData;
         this.DataContext.UploadedFileParts.InsertOnSubmit(nextPart);
         this.DataContext.SubmitChanges();
         ret = 2;
     }
     return ret;
}

[Invoke]
public int FinalizeFile(int fileID)
{
    // File upload is complete, post all file data to the UploadedFiles
    var totalPartSizes = from allParts in this.DataContext.UploadedFileParts
                                 where allParts.FileID == fileID
                                 select allParts.FileDataPart;

    Int64 totalPartSize = 0;
    foreach (var sizePart in totalPartSizes)
    {
         totalPartSize += sizePart.Length;
    }

    var totalAssignedSize = (from fileTest in this.DataContext.UploadedFiles
                                     where fileTest.FileID == fileID
                                     select fileTest.FileSize).First();

    if (totalAssignedSize &gt; totalPartSize)
    {
        // The sizes do not match - Find the first part that does not match the assigned size.
        var missingParts = from p in this.DataContext.UploadedFileParts
                                   where p.FileID == fileID
                                   orderby p.Ordinal
                                   select p;

        int iTestOrdinal = 0;
        foreach (var testPart in missingParts)
        {
             // Test for contiguous elements
             if (testPart.Ordinal != iTestOrdinal)
             {
                  return iTestOrdinal;
             }

             // Test for size of the element as long as it's not the last one.
             if (iTestOrdinal != (missingParts.Count() - 1))
             {
                 if (testPart.FileDataPart.Length != 8000)
                 {
                      return iTestOrdinal;
                 }
             }
             iTestOrdinal++;
        }

        // We didn't find the problem. Nothing to do but fail.
        return -1;
   }
   else if (totalAssignedSize &lt; totalPartSize)
   {
        // There are too many parts.
        // Not much we can do here except fail.
        return -1;
    }

    // The total size of parts is the same as the
    List allFileBytes = new List();

     // Get the list of parts for this item
    var parts = from p in this.DataContext.UploadedFileParts
                        where p.FileID == fileID
                        orderby p.Ordinal
                        select p;

    foreach (var part in parts)
    {
        allFileBytes.AddRange(part.FileDataPart.ToArray().ToList());
    }

    var file = (from f in this.DataContext.UploadedFiles
                        where f.FileID == fileID
                        select f).FirstOrDefault();

    if (file != null)
    {
        file.FileData = allFileBytes.ToArray();
    }

    this.DataContext.SubmitChanges();
    // Final test to be sure that the file updated.   

    var finalTest = (from f in this.DataContext.UploadedFiles
                             where f.FileID == fileID
                             select new { f.FileSize, f.FileData }).First();

     if (finalTest.FileSize != finalTest.FileData.Length)
     {
         return -1;
     }

     // Matching sizes detected. Go ahead and delete the parts.
     foreach (var part in parts)
     {
         this.DataContext.UploadedFileParts.DeleteOnSubmit(part);
     }

     this.DataContext.SubmitChanges();
     // We return zero because the first file part
     // was guaranteed by the fact that we received
     // a fileID in the very first call to the service.
     return 0;
}</pre>
<p>Now with the SilverlightApplication.Web project ready need to go to the SilverlightApplication project and add a new file, name this file UploadItem and paste the following code into the .xaml file:</p>
<pre>&lt;UserControl x:Class="SilverlightApplication.UploadItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="200"&gt;
    &lt;Grid&gt;
        &lt;Grid.RowDefinitions&gt;
            &lt;RowDefinition&gt;&lt;/RowDefinition&gt;
            &lt;RowDefinition&gt;&lt;/RowDefinition&gt;
        &lt;/Grid.RowDefinitions&gt;
        &lt;TextBlock Grid.Row="0" x:Name="UploaderTextField" VerticalAlignment="Center" Padding="5"/&gt;
        &lt;ProgressBar Grid.Row="1" x:Name="TotalProgress" Value="{Binding Percentage}" Maximum="1"/&gt;
        &lt;TextBlock Grid.Row="1"  x:Name="PercentLabel" FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Text="{Binding Path=Percentage, StringFormat=P0}" Padding="0"  /&gt;
    &lt;/Grid&gt;
&lt;/UserControl&gt;</pre>
<p>I UploadItem.xaml.cs tilføjer indsætter du følgende kode:</p>
<pre>using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.ServiceModel.DomainServices.Client;
using System.Windows;
using System.Windows.Controls;
using SilverlightApplication.Web;

namespace SilverlightApplication
{
    public partial class UploadItem : UserControl
    {
        private List fileBuffer = null;
        private FileInfo selectedFile = null;
        private int fileID = 0;
        private int sectionCount = 0;
        private ObservableCollection completedSections = new ObservableCollection();
        private UploadRiaContext uploadRiaContext = new UploadRiaContext();
        private bool finalizedFile = false;
        private Dictionary&gt; fileParts;

        public UploadItem()
        {
            InitializeComponent();
            completedSections.CollectionChanged += (sender, e) =&gt; FinalizeFile();
        }

        void UpdateProgress()
        {
            PercentLabel.Text = (Math.Round((decimal)(100.00 / sectionCount) * this.completedSections.Count)) + " %";
            this.TotalProgress.Value = this.completedSections.Count;
        }

        public void UploadFile()
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "All files|*.*";
            openFileDialog.Multiselect = false;
            if (openFileDialog.ShowDialog() == true)
            {
                try
                {
                    using (FileStream strm = openFileDialog.File.OpenRead())
                    {
                        selectedFile = openFileDialog.File;
                        using (BinaryReader rdr = new BinaryReader(strm))
                        {
                            fileBuffer = rdr.ReadBytes((int)strm.Length).ToList();
                        }
                    }

                    fileParts = new Dictionary&gt;();
                    var fileSections = from idx in Enumerable.Range(0, fileBuffer.Count()) group fileBuffer[idx] by idx / 8000;
                    sectionCount = fileSections.Count();
                    int ordinal = 0;

                    foreach (var section in fileSections)
                    {
                        List itm = new List();
                        foreach (var b in section)
                        {
                            itm.Add(b);
                        }
                        fileParts.Add(ordinal, itm);
                        ordinal++;
                    }

                    this.TotalProgress.Minimum = 0;
                    this.TotalProgress.Maximum = sectionCount;
                    PercentLabel.Text = "0 %";

                    StartFileUpload();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        private void StartFileUpload()
        {
            byte[] msgBody = fileParts.First().Value.ToArray();
            uploadRiaContext.UploadFile(selectedFile.Name, "image", selectedFile.Extension, fileBuffer.Count(), msgBody, StartUploadCompleated, 0);
        }

        private void StartUploadCompleated(InvokeOperation args)
        {
            if (args.Value == 0)
            {
                ResetAll();
                this.UploaderTextField.Text = "Error during upload start.";
                throw new NullReferenceException("The file insert failed.");
            }
            else
            {
                UpdateProgress();
                fileID = args.Value;
                completedSections.Add(0);

                for (int i = 1; i &lt; sectionCount; i++)
                {
                    SendSection(i, false);
                }
            }
        }

        private void SendSection(int sectionKey, bool overWrite)
        {
            List foundPart;
            if (fileParts.TryGetValue(sectionKey, out foundPart))
            {
                byte[] msgBody = foundPart.ToArray();
                uploadRiaContext.UploadFilePart(fileID, sectionKey, overWrite, msgBody, SendSectionCompleated, sectionKey);
            }
        }

        private void SendSectionCompleated(InvokeOperation args)
        {
            if (args.Value != 0)
            {
                UpdateProgress();
                completedSections.Add((int)args.UserState);
            }
            else
            {
                completedSections.Remove((int)args.UserState);
                SendSection((int)args.UserState, true);
            }
        }

        private void FinalizeFile()
        {
            if (completedSections.Count() == sectionCount &amp;&amp; !finalizedFile)
            {
                finalizedFile = true;
                uploadRiaContext.FinalizeFile(fileID, FinalizeFileCompleted, 0);
            }
        }

        private void FinalizeFileCompleted(InvokeOperation args)
        {
            if (args.Value == 0)
            {
                UpdateProgress();
                UploaderTextField.Text = "Transferred successfully.";
                ResetAll();
            }
            else if (args.Value == -1)
            {
                UploaderTextField.Text = "Upload failed. Contact the system admin.";
            }
            else
            {
                completedSections.Remove(args.Value);
                finalizedFile = false;
                MessageBox.Show("Failure detected is at ordinal position " + args.Value.ToString() + ". Retrying this file section.");
                SendSection(args.Value, true);
            }
        }

        private void ResetAll()
        {
            fileBuffer = null;
            selectedFile = null;
            fileID = 0;
            completedSections.Clear();
            finalizedFile = false;
            fileParts = null;
        }
    }
}</pre>
<p>Finally to test the uploader you can add the following the UploadItem to any xaml file, I added it to the MainPage.xaml like this:</p>
<pre>&lt;SilverlightFileUpload:UploadItem x:Name="FileUploader" Grid.Row="1" &gt;&lt;/SilverlightFileUpload:UploadItem&gt;
&lt;Button Content="Upload file" HorizontalAlignment="Right" Width="100" x:Name="UploadButton" Grid.Row="2" Click="Button_Click" /&gt;</pre>
<p>The button click just starts the Upload Process:</p>
<pre>private void Button_Click(object sender, RoutedEventArgs e)
{
    FileUploader.UploadFile();
}</pre>
<p>Thats all folks&#8230;</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Silverlight-Data-Services-Cookbook/dp/1847199844%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1847199844" class="aga aga_52" ><img src="http://ecx.images-amazon.com/images/I/51LxBmIv93L._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/51LxBmIv93L.jpg" class="aga aga_53"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Silverlight-Data-Services-Cookbook/dp/1847199844%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1847199844" class="aga aga_54" ><span class="asin-title">Microsoft Silverlight 4 Data and Services Cookbook (Paperback)</span></a></h2>
					<span class="amazon-author">By (author) Gill Cleeren, Kevin Dockx</span><br />
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$59.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$42.95 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$30.85 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Silverlight-Data-Services-Cookbook/dp/1847199844%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1847199844" class="aga aga_55"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/hXaLwirDoQ1WNodjDhePcnPhlYY/0/da"><img src="http://feedads.g.doubleclick.net/~a/hXaLwirDoQ1WNodjDhePcnPhlYY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/hXaLwirDoQ1WNodjDhePcnPhlYY/1/da"><img src="http://feedads.g.doubleclick.net/~a/hXaLwirDoQ1WNodjDhePcnPhlYY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/bdvg2KRMMOA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/uploading-files-from-silverlight-client-using-wcf-ria-services/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		<feedburner:origLink>http://endofstream.com/uploading-files-from-silverlight-client-using-wcf-ria-services/</feedburner:origLink></item>
		<item>
		<title>Reading cells from Excel file using OleDbConnection</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/UijHiJYVHU4/</link>
		<comments>http://endofstream.com/reading-cells-from-excel-file-using-oledbconnection/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 14:18:01 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=318</guid>
		<description><![CDATA[For a little project I was working on a few weeks ago, I had to be able to read the content from a single cell in an Excel file. This is properly easiest done by using the Microsoft Excel Object Library, however for my project it was a requirement that the oledb api was used instead.  In this [...]]]></description>
			<content:encoded><![CDATA[<p>For a little project I was working on a few weeks ago, I had to be able to read the content from a single cell in an Excel file. This is properly easiest done by using the <a href="http://support.microsoft.com/kb/302084" class="aga aga_62" target="_blank">Microsoft Excel Object Library</a>, however for my project it was a requirement that the oledb api was used instead. </p>
<p>In this post I have added a small example of how the connection to the Excel file is established, and how a single cell is read from a certain spreadsheet.</p>
<p>The following code snippet shows how to establish a connection to a Microsoft Excel 97-2003 file (.xls):</p>
<pre>OleDbConnection connection = new OleDbConnection"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename +";Extended Properties=\"Excel 8.0;HDR=No;IMEX=1\"");</pre>
<p>As it turns out, this only works for .xls files and not for the newer .xlsx format &#8211; so here is the code for establishing a connection to a .xlsx file:</p>
<pre>OleDbConnection connection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filename + ";Extended Properties=\"Excel 12.0;HDR=No;IMEX=1\"");</pre>
<p>Now that the connection to the excel file has been established, the following code snippet demonstrates how to read a single cell from a defined spreadsheet:</p>
<pre>connection.Open();
OleDbCommand command = new OleDbCommand("SELECT * FROM [" + sheet + column + row +":"+ column + row +"]",connection);
DataSet dataSet = new DataSet();
OleDbDataAdapter adapter = new OleDbDataAdapter(command);
adapter.Fill(dataSet);

string value = dataSet.Tables[0].Select()[0][0].ToString();
connection.Close();</pre>
<p>As it can be seen from the above code snippet, the sql syntax command selects from a defined spreadsheet, and a certain column and row (actually a range &#8211; though in this example only a single element is selected). I have chosen to add the source code for a small WPF based example so you can have a closer look for yourself.</p>
<p><a href="http://endofstream.com/wp-content/uploads/2010/09/ExcelReader.zip" class="aga aga_63">Visual Studio Project &#8211; ExcelReader</a></p>
<p>Best Regards<br />
/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B00337D8U6%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00337D8U6" class="aga aga_64" ><img src="http://ecx.images-amazon.com/images/I/41biTRm3e0L._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/41biTRm3e0L.jpg" class="aga aga_65"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B00337D8U6%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00337D8U6" class="aga aga_66" ><span class="asin-title">Microsoft Office Home & Student 2010 - 3PC/1User (Disc Version) (DVD-ROM)</span></a></h2>
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$149.99 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$123.99 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<span class="amazon-release-date">Release date June 15, 2010.</span>
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Office-Home-Student-2010/dp/B00337D8U6%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00337D8U6" class="aga aga_67"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/6VnG28uCeqD4LL4Sh-iCGwiZd8E/0/da"><img src="http://feedads.g.doubleclick.net/~a/6VnG28uCeqD4LL4Sh-iCGwiZd8E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/6VnG28uCeqD4LL4Sh-iCGwiZd8E/1/da"><img src="http://feedads.g.doubleclick.net/~a/6VnG28uCeqD4LL4Sh-iCGwiZd8E/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/UijHiJYVHU4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/reading-cells-from-excel-file-using-oledbconnection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://endofstream.com/reading-cells-from-excel-file-using-oledbconnection/</feedburner:origLink></item>
		<item>
		<title>Installing and configuring Varnish</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/UWNkcEIX_A0/</link>
		<comments>http://endofstream.com/installing-and-configuring-varnish/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 18:18:46 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Varnish]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=285</guid>
		<description><![CDATA[As they say on their web page http://www.varnish-cache.org/: Varnish is a state-of-the-art, high-performance HTTP accelerator This small guide is about installing and configuring Varnish cache, if you do not know what Varnish is used for here is the short description taken from wikipedia. Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In [...]]]></description>
			<content:encoded><![CDATA[<p>As they say on their web page <a href="http://www.varnish-cache.org/" class="aga aga_78" target="_blank">http://www.varnish-cache.org/</a>: </p>
<blockquote><p>Varnish is a state-of-the-art, high-performance HTTP accelerator </p></blockquote>
<p>This small guide is about installing and configuring Varnish cache, if you do not know what Varnish is used for here is the short description taken from <a href="http://en.wikipedia.org/wiki/Varnish_cache" class="aga aga_79" target="_blank">wikipedia</a>. </p>
<blockquote><p>Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In contrast to other HTTP accelerators, many of which began life as client-side proxies or origin servers, Varnish was designed from the ground up as an HTTP accelerator. </p></blockquote>
<p>First of all you will need a Linux distribution installed, I am assuming that you already have this ready before you start &#8211; I have used Ubuntu myself for this example. In this small guide I am covering everything that I needed to install and configure in order to get Varnish up and running, from a blank slate of a Ubuntu distribution.</p>
<p><strong>Installation and configuration of JAVA and Tomcat</strong> </p>
<ul>
<li>
The first thing I needed to do was to install java, this was done by running the following command using the terminal:<br />
<code>apt-get install sun-java6-jdk</code>
</li>
<li>
After having installed java, the next step is to download and install Tomcat, to download Tomcat I ran the following command from the terminal:<br />
<code>wget http://apache.idnr.ws/tomcat/tomcat-6/v6.0.24/bin/apache-tomcat-6.0.24.tar.gz</code></p>
<p>After you have downloaded Tomcat, you need to extract it which can be done with the following command:<br />
<code>tar xvzf apache-tomcat-6.0.24.tar.gz</code></p>
<p>Finally you can move the folder to a directory of your choosing, I chose to place Tomcat in the /usr/local/tomcat folder &#8211; the move was done with the following command:<br />
<code>sudo mv apache-tomcat-6.0.24 /usr/local/tomcat</code>
</li>
<li>
Now you need to add the JAVA_HOME environment variable to the .bashrc file, I did this by the use of the text editor nano by running the following command:<br />
<code>nano ~/.bashrc</code></p>
<p>Then you need to add the JAVA_HOME environment variable export to the end of the file, the line you add should look like, or similar depending on the java version <img src='http://endofstream.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> :<br />
<code>export JAVA_HOME=/usr/lib/jvm/java-6-sun</code>
</li>
<li>
You can now start Tomcat using the following command from the tomcat/bin folder:<br />
<code>./startup.sh</code></p>
<p>And you can stop Tomcat again using the following command:<br />
<code>./shutodwn.sh</code>
</li>
</ul>
<p><strong>Adding automatic startup to Tomcat:</strong><br />
To make it so that Tomcat starts up automatically with Ubuntu you need to edit the init.d for Tomcat. This is done by running the following command:<br />
<code>sudo nano /etc/init.d/tomcat</code> </p>
<p>In the file you paste the following code: </p>
<div><code># Tomcat auto-start<br />
#<br />
# description: Auto-starts tomcat<br />
# processname: tomcat<br />
# pidfile: /var/run/tomcat.pid</code></div>
<div><code>export JAVA_HOME=/usr/lib/jvm/java-6-sun</code></div>
<div><code>case $1 in<br />
start)<br />
sh /usr/local/tomcat/bin/startup.sh<br />
;;<br />
stop)<br />
sh /usr/local/tomcat/bin/shutdown.sh<br />
;;<br />
restart)<br />
sh /usr/local/tomcat/bin/shutdown.sh<br />
sh /usr/local/tomcat/bin/startup.sh<br />
;;<br />
esac<br />
exit 0</code></div>
<p><code> </code> </p>
<p>Now the script needs to be made executable by running the following chmod command:<br />
<code>sudo chmod 755 /etc/init.d/tomcat</code> </p>
<p>Finally you need to create a couple of symbolic links, which is done with the following two commands:</p>
<ol>
<li><code>sudo ln -s /etc/init.d/rc1.d/K99tomcat</code></li>
<li><code>sudo ln -s /etc/init.d/rc2.d/K99tomcat</code></li>
</ol>
<p><strong>Installation of Varnish</strong><br />
Varnish have their own &#8220;<a href="http://varnish-cache.org/static/getting-started.html" class="aga aga_80" target="_blank">Getting started guide</a>&#8221; that describes the installation process, so many of the things I cover here will be mostly repetition from this guide. </p>
<p>Firstly you will need to download Varnish, I did this from their <a href="http://varnish-cache.org/wiki/Installation" class="aga aga_81" target="_blank">installation site</a>. When you have downloaded the installation file you will need to unpack it to a directory of your choosing before you can begin the installation process. </p>
<p>Once you have unpacked Varnish, go to the folder and run the autogen.sh script &#8211; this will generate the config file. You run the autogen.sh script from the terminal using the following command:<br />
<code>./autogen.sh</code> </p>
<p>Once this is done you need to execute the generated config script, to do so you need to run the following command:<br />
<code>./configure --enable-debugging-symbols --enable-developer-warnings --enable-dependency-tracking</code> </p>
<p>Finally after this has been done you install Varnish with the following command:<br />
<code>make install</code> </p>
<p><strong>Avoid the &#8216;libvarnish.so.1: cannot open shared object file: No such file or directory&#8217; error:</strong><br />
After having installed Varnish I kept getting errors about libvarnish.so.1, saying no such file or directory. After some troubleshooting this issue the solution presented itself (with some inspiration from this <a href="http://ubuntuforums.org/showthread.php?t=100168" class="aga aga_82" target="_blank">thread</a>), for some reason the &#8220;/usr/local/lib&#8221; path is not by default included in the &#8220;/etc/ld.so.conf&#8221; (this might just be an Ubuntu issue). </p>
<p>However the solution itself is simple, just add /usr/local/lib to the /etc/ld.so.conf and everything is fixed &#8211; this can be done as shown below:<br />
<code><br />
sudo ldconfig /usr/local/lib/<br />
sudo sh -c "echo /usr/local/lib &gt; /etc/ld.so.conf.d/locallib.conf"<br />
sudo ldconfig<br />
</code> </p>
<p><strong>Starting and stopping Varnish</strong><br />
Installation and configuration is now done, at least the initial part required to start Varnish. Now comes all the real hairy stuff with URL rewriting and VCL programming. As for starting Varnish there is a short introduction <a href="http://varnish-cache.org/wiki/Introduction" class="aga aga_83" target="_blank">here</a>, and if you are not much for reading through it you can just start it up by writing the following command:<br />
<code>varnishd -a :80 -b localhost:8080 -T localhost:6082</code> </p>
<p>The above command means that Varnish is listening on port 80, forwards traffic to port 8080 and that the administration interface can be reached on port 6082. </p>
<p>Stopping Varnish can be done by killing the process, but to kill the process you first need to find the process id (pid) &#8211; this can be done with the following command:<br />
<code>ps aux | grep varnish</code> </p>
<p>Now that you have the pid you can stop (or &#8220;kill&#8221;) Varnish by using the kill command:<br />
<code>kill [pid]</code></p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Web-Application-Architecture-Principles-Protocols/dp/047051860X%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D047051860X" class="aga aga_84" ><img src="http://ecx.images-amazon.com/images/I/41rrUvfeURL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/41rrUvfeURL.jpg" class="aga aga_85"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Web-Application-Architecture-Principles-Protocols/dp/047051860X%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D047051860X" class="aga aga_86" ><span class="asin-title">Web Application Architecture: Principles, Protocols and Practices (Paperback)</span></a></h2>
					<span class="amazon-author">By (author) Leon Shklar, Rich Rosen</span><br />
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$49.10 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$38.77 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Web-Application-Architecture-Principles-Protocols/dp/047051860X%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D047051860X" class="aga aga_87"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/R5phyL9ZiNmMZaWXoCNT6oDFOHk/0/da"><img src="http://feedads.g.doubleclick.net/~a/R5phyL9ZiNmMZaWXoCNT6oDFOHk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/R5phyL9ZiNmMZaWXoCNT6oDFOHk/1/da"><img src="http://feedads.g.doubleclick.net/~a/R5phyL9ZiNmMZaWXoCNT6oDFOHk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/UWNkcEIX_A0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/installing-and-configuring-varnish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://endofstream.com/installing-and-configuring-varnish/</feedburner:origLink></item>
		<item>
		<title>Custom Silverlight loading screen</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/nWpkY0FIHtA/</link>
		<comments>http://endofstream.com/custom-silverlight-loading-screen/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 12:09:16 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=268</guid>
		<description><![CDATA[The default Silverlight loading screen can quickly become a little boring and conservative, so here is a small guide for the people that wishes to add a custom loading screen (og splash screen if you will). When you create a Silverlight Application using Visual Studio, you will get two projects &#8211; lets say you create a Silverlight [...]]]></description>
			<content:encoded><![CDATA[<p>The default Silverlight loading screen can quickly become a little boring and conservative, so here is a small guide for the people that wishes to add a custom loading screen (og splash screen if you will).</p>
<table border="0">
<tbody>
<tr>
<td>When you create a Silverlight Application using Visual Studio, you will get two projects &#8211; lets say you create a Silverlight Application and name it TestApp. In this case you will get a client project called TestApp and a server project called TestApp.Web as shown in the image. In the TestApp.Web project you can create a folder in the root and call it &#8220;Splash&#8221; this is where we will be placing the splash image as well as the xaml file.The first thing we need to do is to modify the TestAppTestPage.aspx (unless you have set the .html as startup of course).</td>
<td><img class="alignleft size-full wp-image-269" title="Silverlight Application" src="http://endofstream.com/wp-content/uploads/2010/08/testapp.jpg" alt="" width="242" height="257" /></td>
</tr>
</tbody>
</table>
<p>Replace the following line:</p>
<pre>&lt;script type="text/javascript" src="Silverlight.js"&gt;&lt;/script&gt;</pre>
<p>With:</p>
<pre>&lt;script type="text/javascript" src="SplashScreen.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="Silverlight.js"&gt;&lt;/script&gt;</pre>
<p>When that has been done you need to create a new JavaScript file, call it SplashScreen.js and place it in the root of the TestApp.Web project (or you can download it <a href="http://endofstream.com/wp-content/uploads/2010/08/SplashScreen.js" class="aga aga_93" target="_blank">here</a>). If you have created the file yourself you need to add the following method in the .js file:</p>
<pre>function onSourceDownloadProgressChanged(sender, eventArgs)
{
    var myHost = document.getElementById("Xaml");
    var rectBar = myHost.content.findName("rectBar");
    var rectBorder = myHost.content.findName("rectBorder");
    if (eventArgs.progress)
        rectBar.Width = eventArgs.progress * rectBorder.Width;
    else rectBar.Width = eventArgs.get_progress() * rectBorder.Width;
}</pre>
<p>The last think you need to change in the TestAppTestPage.aspx is the following object, the changes has been marked with bold:</p>
<pre>&lt;div id="silverlightControlHost"&gt;
  &lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"&gt;
    &lt;param name="source" value="ClientBin/TestApp.xap"/&gt;
    <strong>&lt;param name="splashscreensource" value="Splash/SplashScreen.xaml"/&gt;
    &lt;param name="onSourceDownloadProgressChanged" value="onSourceDownloadProgressChanged" /&gt;
</strong>    &lt;param name="onError" value="onSilverlightError" /&gt;
    &lt;param name="background" value="white" /&gt;
    &lt;param name="minRuntimeVersion" value="4.0.50401.0" /&gt;
    &lt;param name="autoUpgrade" value="true" /&gt;
    &lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50401.0" style="text-decoration:none"&gt;
      &lt;img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/&gt;
    &lt;/a&gt;
  &lt;/object&gt;
  &lt;iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"&gt;&lt;/iframe&gt;
&lt;/div&gt;</pre>
<p>The final two things you do is to first create a image file named image.jpg and place it in the Splash folder (this will be the loading image), second you need to create a xaml file and call it SplashScreen.xaml &#8211; this file should also be placed in the Splash directory. In the empty SplashScreen.xaml file you add the following code:</p>
<pre>&lt;StackPanel xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" VerticalAlignment="Center" Margin="0,100,0,0"&gt;
    &lt;Image Source="../Splash/image.jpg" Width="100" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" /&gt;
    &lt;Grid HorizontalAlignment="Center"&gt;
        &lt;Rectangle x:Name="rectBorder" StrokeThickness="1" Stroke="#64d64d" Height="7" Width="150" HorizontalAlignment="Left"/&gt;
        &lt;Rectangle x:Name="rectBar" Fill="#64d64d" Height="7" Width="0" HorizontalAlignment="Left" /&gt;
    &lt;/Grid&gt;
&lt;/StackPanel&gt;</pre>
<p>You can of course change any of this to better suit your needs&#8230; Hope this helps, if you should have any problems or questions you are welcome to leave a comment.</p>
<p>/Peter</p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_94" ><img src="http://ecx.images-amazon.com/images/I/11XacOSn3wL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/11XacOSn3wL.jpg" class="aga aga_95"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_96" ><span class="asin-title">Microsoft Expression Studio 4 Ultimate (DVD-ROM)</span></a></h2>
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$599.95 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$410.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$398.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<span class="amazon-release-date">Release date June 28, 2010.</span>
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_97"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/GVWJI5KzfEpjXF3zh7Io8fMxZvM/0/da"><img src="http://feedads.g.doubleclick.net/~a/GVWJI5KzfEpjXF3zh7Io8fMxZvM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GVWJI5KzfEpjXF3zh7Io8fMxZvM/1/da"><img src="http://feedads.g.doubleclick.net/~a/GVWJI5KzfEpjXF3zh7Io8fMxZvM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/nWpkY0FIHtA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/custom-silverlight-loading-screen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://endofstream.com/custom-silverlight-loading-screen/</feedburner:origLink></item>
		<item>
		<title>Creating custom colorpicker in Silverlight</title>
		<link>http://feedproxy.google.com/~r/EndOfStream/~3/otyRR-mm7zI/</link>
		<comments>http://endofstream.com/creating-custom-colorpicker-in-silverlight/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 11:06:35 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Colorpicker]]></category>
		<category><![CDATA[Popup]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://endofstream.com/?p=203</guid>
		<description><![CDATA[During the creation of a smaller application I found myself in need of a custom color picker, I wanted something in the same style as can be found in the ComponentOne toolkit. To accomplish this I created a class extending the System.Windows.Controls.Button class, the file called ColorPicker.cs is shown below: public class ColorPicker : Button [...]]]></description>
			<content:encoded><![CDATA[<p>During the creation of a smaller application I found myself in need of a custom color picker, I wanted something in the same style as can be found in the <a href="http://www.componentone.com/SuperProducts/ColorPickerSilverlight/" class="aga aga_104" target="_blank">ComponentOne toolkit</a>. To accomplish this I created a class extending the System.Windows.Controls.Button class, the file called ColorPicker.cs is shown below:</p>
<pre>public class ColorPicker : Button
{
  private Popup popup;

  public ColorPicker()
  {
    popup = new Popup();
    Style = Application.Current.Resources["ColorPicker"] as Style;
    Click += new RoutedEventHandler(ColorPicker_Click);
  }

  void ColorPicker_Click(object sender,RoutedEventArgs e)
  {
    if(popup.IsOpen)
    {
      popup.IsOpen = false;
    }
    else
    {
      ColorPickerControl cpc = new ColorPickerControl();
      cpc.SetProperties(this, popup);
      popup.Child = cpc;

      FrameworkElement page = Application.Current.RootVisual as FrameworkElement;
      GeneralTransform gt = ((Button)sender).TransformToVisual(page);
      Point point = gt.Transform(new Point(0,((Button)sender).ActualHeight));
      popup.VerticalOffset = point.Y;
      popup.HorizontalOffset = point.X;
      ((ColorPickerControl)popup.Child).Width = 175;
      ((ColorPickerControl)popup.Child).Height = 200;

      popup.IsOpen = true;
    }
  }
}</pre>
<table>
<tbody>
<tr>
<td> In the example above I use a custom style to get the desired look of my color picker, below is the style which I am using in the example, this style yields the result you can see to the right. The blue area of course changes depending on which color you select:</td>
<td><img class="alignleft size-full wp-image-256" title="Custom Colorpicker Control" src="http://endofstream.com/wp-content/uploads/2010/08/customcolorpicker.jpg" alt="" width="120" height="24" /></td>
</tr>
</tbody>
</table>
<pre style="text-align: left;">&lt;Style x:Key="ColorPicker" TargetType="Button"&gt;
  &lt;Setter Property="Template"&gt;
    &lt;Setter.Value&gt;
      &lt;ControlTemplate TargetType="Button"&gt;
        &lt;Grid&gt;
          &lt;VisualStateManager.VisualStateGroups&gt;
            &lt;VisualStateGroup x:Name="CommonStates"&gt;
              &lt;VisualStateGroup.Transitions&gt;
                &lt;VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/&gt;
                &lt;VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/&gt;
                &lt;VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/&gt;
              &lt;/VisualStateGroup.Transitions&gt;
              &lt;VisualState x:Name="Normal"/&gt;
              &lt;VisualState x:Name="MouseOver"&gt;
                &lt;Storyboard&gt;
                  &lt;DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)"&gt;
                    &lt;SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/&gt;
                  &lt;/DoubleAnimationUsingKeyFrames&gt;
                &lt;/Storyboard&gt;
              &lt;/VisualState&gt;
              &lt;VisualState x:Name="Disabled"&gt;
                &lt;Storyboard&gt;
                  &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity"&gt;
                    &lt;SplineDoubleKeyFrame KeyTime="0" Value="0.6"/&gt;
                  &lt;/DoubleAnimationUsingKeyFrames&gt;
                &lt;/Storyboard&gt;
              &lt;/VisualState&gt;
            &lt;/VisualStateGroup&gt;
          &lt;/VisualStateManager.VisualStateGroups&gt;
          &lt;Border x:Name="Border" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2,2,2,2"&gt;
            &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="{TemplateBinding Width}"&gt;
              &lt;Border Width="{TemplateBinding Width}" x:Name="BackgroundGradient" BorderThickness="1" Background="{TemplateBinding Background}"/&gt;
              &lt;Border Margin="-20,0,0,0" Width="20" Background="Wheat"&gt;
                &lt;Path Height="4" HorizontalAlignment="Right" Margin="4,0,6,0" Width="8" Stretch="Uniform" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z "&gt;
                  &lt;Path.Fill&gt;
                    &lt;SolidColorBrush Color="#FFFFFFFF"/&gt;
                  &lt;/Path.Fill&gt;
                &lt;/Path&gt;
              &lt;/Border&gt;
            &lt;/StackPanel&gt;
          &lt;/Border&gt;
          &lt;Border x:Name="HoverBorder" Opacity="0" BorderBrush="{StaticResource NormalBrush}" BorderThickness="2,2,2,2" CornerRadius="2,2,2,2"/&gt;
          &lt;Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Opacity="0" Background="#FFFFFFFF" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2,2,2,2"/&gt;
        &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
    &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
  &lt;Setter Property="Background" Value="Black" /&gt;
&lt;/Style&gt;</pre>
<p style="text-align: left;">To show the actual color picker I created a custom control and named it ColorPickerControl. I will hurry up and say that it was made as fast as possible  just to serve as an example, so what is seen is just a simple 5 by 6 grid with some restyled buttons. In a real life application it would be prudent to create a prettier color picker control, and possible one with more features like for example the one in <a href="http://endofstream.com/wp-content/uploads/2010/08/wordcolorpicker.jpg"  target="_blank">Microsoft Word</a>.</p>
<p style="text-align: center;"><img class="aligncenter" title="ColorPickerControl" src="http://endofstream.com/wp-content/uploads/2010/08/colorpickergrid.jpg" alt="A example of a color grid" width="136" height="66" />Custom Colorpicker Control </p>
<p style="text-align: left;">Below is shown some parts of the CustomColorPicker.xaml file, the main things being the custom button style, as well as an example button making use of this style.</p>
<pre style="text-align: left;">&lt;Style x:Key="ColorOptionButtonStyle" TargetType="Button"&gt;
  &lt;Setter Property="Background" Value="#FF1F3B53"/&gt;
  &lt;Setter Property="Foreground" Value="#FF000000"/&gt;
  &lt;Setter Property="Padding" Value="3"/&gt;
  &lt;Setter Property="BorderThickness" Value="1"/&gt;
  &lt;Setter Property="BorderBrush"&gt;
    &lt;Setter.Value&gt;
      &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
        &lt;GradientStop Color="#FFA3AEB9" Offset="0"/&gt;
        &lt;GradientStop Color="#FF8399A9" Offset="0.375"/&gt;
        &lt;GradientStop Color="#FF718597" Offset="0.375"/&gt;
        &lt;GradientStop Color="#FF617584" Offset="1"/&gt;
      &lt;/LinearGradientBrush&gt;
    &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
  &lt;Setter Property="Template"&gt;
    &lt;Setter.Value&gt;
      &lt;ControlTemplate TargetType="Button"&gt;
        &lt;Grid&gt;
          &lt;VisualStateManager.VisualStateGroups&gt;
            &lt;VisualStateGroup x:Name="CommonStates"&gt;
              &lt;VisualStateGroup.Transitions/&gt;
              &lt;VisualState x:Name="Normal"/&gt;
              &lt;VisualState x:Name="MouseOver"/&gt;
              &lt;VisualState x:Name="Pressed"/&gt;
              &lt;VisualState x:Name="Disabled"/&gt;
            &lt;/VisualStateGroup&gt;
            &lt;VisualStateGroup x:Name="FocusStates"&gt;
              &lt;VisualState x:Name="Focused"/&gt;
              &lt;VisualState x:Name="Unfocused"/&gt;
            &lt;/VisualStateGroup&gt;
          &lt;/VisualStateManager.VisualStateGroups&gt;

          &lt;Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3"&gt;
            &lt;Rectangle x:Name="BackgroundGradient" Fill="{TemplateBinding Background}" Margin="1"/&gt;
          &lt;/Border&gt;
        &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
    &lt;/Setter.Value&gt;
  &lt;/Setter&gt;
&lt;/Style&gt;

&lt;Button x:Name="ColorWhite" Background="White" Grid.Row="0" Grid.Column="0" Style="{StaticResource ColorOptionButtonStyle}"&gt;&lt;/Button&gt;</pre>
<p>Finally you can add the control as you would any other, and depending on your implementation of the CustomColorPicker.cs code behind file you can get the selected color.</p>
<pre>&lt;Controls:ColorPicker x:Name="ColorButton" Width="120" HorizontalAlignment="Left" Height="24" Grid.Column="1" Grid.Row="4"/&gt;</pre>
<p>If you have any questions or suggestions please feel free to post a comment.</p>
<p>/Peter</p>
<p><span style="color: #ff0000;"><em>Edit: As requested I have added a live example&#8230; Please remember it falls to yourself to style it <img src='http://endofstream.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </em></span><br />
<div id="silverlightControlHost"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="236" height="226"><param name="source" value="http://endofstream.com/wp-content/uploads/2010/09/CustomColorPicker.xap"/><param name="background" value="white" /><param name="minRuntimeVersion" value="3.0.40723.0" /><param name="autoupgrade" value="true" /><param name="enableHtmlAccess" value="true" /><a href="http://go.microsoft.com/fwlink/?LinkID=149156" class="aga aga_105" style="text-decoration: none;"><img src="http://storage.timheuer.com/sl4wp-ph.png" alt="Install Microsoft Silverlight" style="border-style: none; width:400px; height:200px"/></a></object><iframe style="visibility:hidden;height:0;width:0;border:0px" id="_sl_historyFrame"></iframe></div><br /></p>
<br />	<br /><table cellpadding="0"class="amazon-product-table">
		<tr>
			<td valign="top">
				<div class="amazon-image-wrapper">
					<a href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_106" ><img src="http://ecx.images-amazon.com/images/I/11XacOSn3wL._SL160_.jpg" class="amazon-image amazon-image" /></a><br />
					<a rel="appiplightbox" href="http://ecx.images-amazon.com/images/I/11XacOSn3wL.jpg" class="aga aga_107"><span class="amazon-tiny">See larger image</span></a>
				</div>
				<div class="amazon-buying">
					<h2 class="amazon-asin-title"><a href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_108" ><span class="asin-title">Microsoft Expression Studio 4 Ultimate (DVD-ROM)</span></a></h2>
				</div>
				<hr noshade="noshade" size="1" />
				<div align="left">
					<table class="amazon-product-price" cellpadding="0">
						<tr>
							<td class="amazon-list-price-label">List Price:</td>
							<td class="amazon-list-price">$599.95 USD</td>
						</tr>
						<tr>
							<td class="amazon-new-label">New From:</td>
							<td class="amazon-new">$410.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td class="amazon-used-label">Used from:</td>
						<td class="amazon-used">$398.00 <span class="instock">In Stock</span></td>
						</tr>
						<tr>
							<td valign="top" colspan="2">
								<div class="amazon-dates">
									<span class="amazon-release-date">Release date June 28, 2010.</span>
									<br /><div><a style="display:block;margin-top:8px;margin-bottom:5px;width:165px;"  href="http://www.amazon.com/Microsoft-Expression-Studio-4-Ultimate/dp/B003D1FPEO%3FSubscriptionId%3DAKIAJEMU5NCP57NFWZAQ%26tag%3Dendofstreamco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB003D1FPEO" class="aga aga_109"><img src="http://endofstream.com/wp-content/plugins/amazon-product-in-a-post-plugin/images/buyamzon-button.png" border="0" style="border:0 none !important;margin:0px !important;background:transparent !important;" /></a></div>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>

<p><a href="http://feedads.g.doubleclick.net/~a/ulm8kUe0E0sK-KNeovJi589Me_w/0/da"><img src="http://feedads.g.doubleclick.net/~a/ulm8kUe0E0sK-KNeovJi589Me_w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ulm8kUe0E0sK-KNeovJi589Me_w/1/da"><img src="http://feedads.g.doubleclick.net/~a/ulm8kUe0E0sK-KNeovJi589Me_w/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/EndOfStream/~4/otyRR-mm7zI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://endofstream.com/creating-custom-colorpicker-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://endofstream.com/creating-custom-colorpicker-in-silverlight/</feedburner:origLink></item>
	</channel>
</rss>

