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

<channel>
	<title>An Original Idea</title>
	<atom:link href="http://anoriginalidea.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anoriginalidea.wordpress.com</link>
	<description>because all great software begins with an original idea</description>
	<lastBuildDate>Wed, 30 Sep 2009 08:26:06 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='anoriginalidea.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/28c3803caf8755f2f2ac56555648c3aa?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>An Original Idea</title>
		<link>http://anoriginalidea.wordpress.com</link>
	</image>
			<item>
		<title>Enabling callto (Skype) in your application</title>
		<link>http://anoriginalidea.wordpress.com/2009/09/30/enabling-callto-skype-in-your-application/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/09/30/enabling-callto-skype-in-your-application/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 08:26:06 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[.net Framework]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[calling phone numbers]]></category>
		<category><![CDATA[callto]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[winforms]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/09/30/enabling-callto-skype-in-your-application/</guid>
		<description><![CDATA[  
You may have noticed that Skype seems to embed itself into Internet Explorer, Firefox and Chrome.&#160; It recognises contacts and phone numbers in the page and provides the ability to call them.
I believe people will expect this kind of functionality in conventional windows applications also.&#160; To assist with this I created a little [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=292&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/09/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb1.png?w=244&#038;h=189" width="244" height="189" /></a> <a href="http://anoriginalidea.files.wordpress.com/2009/09/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb2.png?w=244&#038;h=216" width="244" height="216" /></a> </p>
<p>You may have noticed that Skype seems to embed itself into Internet Explorer, Firefox and Chrome.&#160; It recognises contacts and phone numbers in the page and provides the ability to call them.</p>
<p>I believe people will expect this kind of functionality in conventional windows applications also.&#160; To assist with this I created a little class that will not only allow calls, but allows a check for the existence of a skype and give the ability to extract the calling applications icon.</p>
<p><strong>Sample Project</strong></p>
<p>The sample winforms project includes the CallTo class and a simple Winforms test form:</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/09/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb3.png?w=111&#038;h=86" width="111" height="86" /></a> </p>
<p>The form has a textbox and button.&#160;&#160; One load, the call button is enabled and give an image.&#160; The button makes the call.</p>
<p>&#160;</p>
<p> <code>
<p>Public Class Form1 </p>
<p>&#160;&#160;&#160; Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loCallTo As New CallTo       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; cmdCall.Image = loCallTo.Image       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; cmdCall.Enabled = loCallTo.Enabled       <br />&#160;&#160;&#160; End Sub       <br />&#160;&#160;&#160; Private Sub cmdCall_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCall.Click       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loCallTo As New CallTo       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; loCallTo.DoCall(txtPhoneNumber.Text)       <br />&#160;&#160;&#160; End Sub </p>
<p>End Class</p>
<p>&#160;</p>
<p> </code>
<p>&#160;</p>
<p>Heres the source of CallTo.vb:</p>
<p>&#160;</p>
<p> <code>
<p>Imports Microsoft.Win32      <br />Imports System.Runtime       <br />Imports System.Runtime.InteropServices </p>
<p>''' &lt;summary&gt;      <br />''' This class allows for making callto calls       <br />''' &lt;/summary&gt;       <br />Public Class CallTo </p>
<p>&#160;&#160;&#160; ''' &lt;summary&gt;      <br />&#160;&#160;&#160; ''' Gets the image.       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;value&gt;The image.&lt;/value&gt;       <br />&#160;&#160;&#160; Public ReadOnly Property Image() As Image       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Get       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; If Not Enabled Then Return Nothing </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsValue As String      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; With Registry.ClassesRoot.OpenSubKey(&quot;callto\DefaultIcon&quot;)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lsValue = .GetValue(&quot;&quot;)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; End With </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; If lsValue.Contains(&quot;,&quot;) Then      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsBits() As String = lsValue.Split(&quot;,&quot;c)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsFilename As String = lsBits(0).Trim(New Char() {&quot;&quot;&quot;&quot;c})       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim liPosition As Integer = Val(lsBits(1))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return moGetIconFromExeOrDll(lsFilename, liPosition)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Else       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return Nothing       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; End If </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; End Get      <br />&#160;&#160;&#160; End Property       <br />&#160;&#160;&#160; Private Declare Auto Function ExtractIcon Lib &quot;shell32&quot; ( _       <br />ByVal hInstance As IntPtr, ByVal lpszExeFileName As String, _       <br />ByVal nIconIndex As Integer) As IntPtr       <br />&#160;&#160;&#160; Private Function moGetIconFromExeOrDll(ByVal filename As String, ByVal position As Integer) As Image       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim hInstance As IntPtr = Marshal.GetHINSTANCE( _       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim hIcon As IntPtr = ExtractIcon(hInstance, filename, position)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loBitmap As Bitmap = Bitmap.FromHicon(hIcon)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loReturn As Image = loBitmap.GetThumbnailImage(16, 16, Nothing, Nothing) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; loBitmap.Dispose()      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return loReturn </p>
<p>&#160;&#160;&#160; End Function </p>
<p>&#160;&#160;&#160; ''' &lt;summary&gt;      <br />&#160;&#160;&#160; ''' Gets a value indicating whether this CallTo is enabled.       <br />&#160;&#160;&#160; ''' &lt;/summar       <br />&#160;&#160;&#160; ''' &lt;value&gt;&lt;c&gt;true&lt;/c&gt; if enabled; otherwise, &lt;c&gt;false&lt;/c&gt;.&lt;/value&gt;       <br />&#160;&#160;&#160; Public ReadOnly Property Enabled() As Boolean       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Get       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Try       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loReg As RegistryKey = Registry.ClassesRoot.OpenSubKey(&quot;callto&quot;, False)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loReg.Close()       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Catch       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return False       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; End Try       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return True       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; End Get       <br />&#160;&#160;&#160; End Property       <br />&#160;&#160;&#160; ''' &lt;summary&gt;       <br />&#160;&#160;&#160; ''' Does the call.       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;param name=&quot;destination&quot;&gt;The destination.&lt;/param&gt;       <br />&#160;&#160;&#160; Public Sub DoCall(ByVal destination As String) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; If Not Enabled Then Throw New ApplicationException(&quot;Callto is not enabled&quot;)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Process.Start(&quot;callto://&quot; &amp; destination) </p>
<p>&#160;&#160;&#160; End Sub </p>
<p>End Class</p>
<p> </code>
<p>&#160;</p>
<p><a href="http://cid-5f1708eb705d1c65.skydrive.live.com/self.aspx/Public/CallTo.zip">Download Sample</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/292/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=292&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/09/30/enabling-callto-skype-in-your-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Sketchflow to create iPhone UX Prototypes</title>
		<link>http://anoriginalidea.wordpress.com/2009/09/21/using-sketchflow-to-create-iphone-ux-prototypes/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/09/21/using-sketchflow-to-create-iphone-ux-prototypes/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 04:03:37 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Sketchflow]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/09/21/using-sketchflow-to-create-iphone-ux-prototypes/</guid>
		<description><![CDATA[&#160; 
I’ve been using Expression Sketchflow for many things over the past few weeks for both prototyping Winforms, mobile, web and sometimes even Silverlight applications.
Once you give up on the idea of reusing your prototype it’s amazing what it can be used for.
I’ve found the creation of an iPhone usercontrol useful in prototyping.&#160; Simply add [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=285&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/09/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb.png?w=169&#038;h=244" width="169" height="244" /></a>&#160; </p>
<p>I’ve been using Expression Sketchflow for many things over the past few weeks for both prototyping Winforms, mobile, web and sometimes even Silverlight applications.</p>
<p>Once you give up on the idea of reusing your prototype it’s amazing what it can be used for.</p>
<p>I’ve found the creation of an iPhone usercontrol useful in prototyping.&#160; Simply add iPhone.xaml to your project and drop this onto your screens.</p>
<p>To create iPhone.xaml, create a blank usercontrol, then use the following xaml (remember to change MyProject to the name of your project):</p>
<p>&#160;<code></code>
<p>&lt;UserControl      <br />&#160;&#160;&#160; xmlns=&quot;<a href="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;">http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</a>       <br />&#160;&#160;&#160; xmlns:x=&quot;<a href="http://schemas.microsoft.com/winfx/2006/xaml&quot;">http://schemas.microsoft.com/winfx/2006/xaml&quot;</a>       <br />&#160;&#160;&#160; xmlns:d=&quot;<a href="http://schemas.microsoft.com/expression/blend/2008&quot;">http://schemas.microsoft.com/expression/blend/2008&quot;</a>       <br />&#160;&#160;&#160; xmlns:mc=&quot;<a href="http://schemas.openxmlformats.org/markup-compatibility/2006&quot;">http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</a>       <br />&#160;&#160;&#160; mc:Ignorable=&quot;d&quot;       <br />&#160;&#160;&#160; xmlns:ps=&quot;clr-namespace:Microsoft.Expression.Prototyping.SketchControls;assembly=Microsoft.Expression.Prototyping.SketchControls&quot;       <br />&#160;&#160;&#160; x:Class=&quot;MyProject.iPhone&quot;       <br />&#160;&#160;&#160; d:DesignWidth=&quot;341&quot; d:DesignHeight=&quot;685&quot; Width=&quot;341&quot; Height=&quot;685&quot;&gt; </p>
<p>&#160;&#160;&#160; &lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Rectangle Fill=&quot;#FF0A0000&quot; Stroke=&quot;Black&quot; RadiusX=&quot;21&quot; RadiusY=&quot;21&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Margin=&quot;11,103,10,102&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; Height=&quot;480&quot; Width=&quot;320&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Ellipse Fill=&quot;White&quot; Stroke=&quot;Black&quot; Height=&quot;59&quot; Margin=&quot;139,0,139,20&quot; VerticalAlignment=&quot;Bottom&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Rectangle Fill=&quot;White&quot; Stroke=&quot;Black&quot; Height=&quot;26&quot; Margin=&quot;157,0,157,36&quot; VerticalAlignment=&quot;Bottom&quot; RadiusX=&quot;2.75&quot; RadiusY=&quot;2.75&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Rectangle Stroke=&quot;Black&quot; RadiusX=&quot;3.5&quot; RadiusY=&quot;3.5&quot; Height=&quot;7&quot; Margin=&quot;139,51,139,0&quot; VerticalAlignment=&quot;Top&quot; Fill=&quot;White&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;24&quot; Margin=&quot;11,103,10,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Background=&quot;#FF020000&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;13&quot; HorizontalAlignment=&quot;Right&quot; Margin=&quot;0,109,23,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;27&quot; Background=&quot;#FFFCFCFC&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;7&quot; HorizontalAlignment=&quot;Right&quot; Margin=&quot;0,112,20,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;5&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TextBlock Margin=&quot;41,107,0,0&quot; Style=&quot;{StaticResource BasicTextBlock-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Text=&quot;Carrier&quot; TextWrapping=&quot;Wrap&quot; Foreground=&quot;#FFFCFCFC&quot; HorizontalAlignment=&quot;Left&quot; Width=&quot;41&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;10&quot; HorizontalAlignment=&quot;Left&quot; Margin=&quot;33,111,0,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;4&quot; BorderBrush=&quot;#FFFFFDFD&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;8&quot; HorizontalAlignment=&quot;Left&quot; Margin=&quot;29,113,0,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;4&quot; BorderBrush=&quot;#FFFFFDFD&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;6&quot; HorizontalAlignment=&quot;Left&quot; Margin=&quot;25,115,0,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;4&quot; BorderBrush=&quot;#FFFFFDFD&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;5&quot; HorizontalAlignment=&quot;Left&quot; Margin=&quot;21,116,0,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;4&quot; BorderBrush=&quot;#FFFFFDFD&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ps:SketchRectangleSL Height=&quot;3&quot; HorizontalAlignment=&quot;Left&quot; Margin=&quot;17,118,0,0&quot; Style=&quot;{StaticResource Rectangle-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;4&quot; BorderBrush=&quot;#FFFFFDFD&quot;/&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TextBlock Margin=&quot;141,107,121,0&quot; Style=&quot;{StaticResource BasicTextBlock-Sketch}&quot; VerticalAlignment=&quot;Top&quot; Foreground=&quot;#FFFCFCFC&quot; Text=&quot;12:00 PM&quot; TextWrapping=&quot;Wrap&quot;/&gt;       <br />&#160;&#160;&#160; &lt;/Grid&gt;       <br />&lt;/UserControl&gt;</p></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/285/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=285&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/09/21/using-sketchflow-to-create-iphone-ux-prototypes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/09/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Sketchflow &#8211; &#8220;Duplicate&#8221; Bug</title>
		<link>http://anoriginalidea.wordpress.com/2009/08/27/sketchflow-duplicate-bug/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/08/27/sketchflow-duplicate-bug/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 23:43:05 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[.net Framework]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Sketchflow]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/08/27/sketchflow-duplicate-bug/</guid>
		<description><![CDATA[&#160;
 
&#160;
The Problem
At the moment I’m trialling Sketchflow for Expression Blend.&#160; There’s an annoying bug that happens when you use the “Duplicate” action on a node:
 
If you use this action, sooner or later you’ll end up with this error:
‘InitializeComponent’ is not a member of ‘xxxxxxxxxx.xxxxxxxxxxxxxx’
This can be very frustrating if you are trying to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=281&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image3.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb3.png?w=244&#038;h=118" width="244" height="118" /></a> </p>
<p>&#160;</p>
<p><strong>The Problem</strong></p>
<p>At the moment I’m trialling Sketchflow for Expression Blend.&#160; There’s an annoying bug that happens when you use the “Duplicate” action on a node:</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image4.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb4.png?w=406&#038;h=280" width="406" height="280" /></a> </p>
<p>If you use this action, sooner or later you’ll end up with this error:</p>
<p>‘InitializeComponent’ is not a member of ‘xxxxxxxxxx.xxxxxxxxxxxxxx’</p>
<p>This can be very frustrating if you are trying to advocate Sketchflow as a prototyping tool for non wpf savvy analysts.</p>
<p><strong>The Workaround</strong></p>
<p>The simplest workaround is to delete the code-behind file.&#160; To do this, go to the project pane and choose “Delete”.</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image5.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb5.png?w=365&#038;h=234" width="365" height="234" /></a> </p>
<p>&#160;</p>
<p>At first I tried hard to ensure that the xaml filenames and classnames were correct.&#160; This just causes a cascading comedy of errors.</p>
<p>Upgrading Sketchflow prototype projects to real code is a pipe-dream at the moment.</p>
<p>If you know of a better way of handling this situation (and fixing the errors) more quickly, feel free to comment.&#160; I just want get on with the prototyping.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=281&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/08/27/sketchflow-duplicate-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Serialize and Deserialize objects as Xml using generic types in VB.Net</title>
		<link>http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 06:55:13 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[.net Framework]]></category>
		<category><![CDATA[VB.Net]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/</guid>
		<description><![CDATA[ 
In his blog post Serialize and deserialize objects as xml using generic types in C# 2.0 , Paul Whitaker creates some ubiquitous functions for doing Xml Serialization with generics.
&#160;
To serialize:
 
Dim lsXml As String = GenericXmlSerializer.SerializeObject(of MyObjectType)(myObject)
 
&#160;
To deserialize:
 
Dim myObject As MyObjectType = GenericXmlSerializer.DeserializeObject(of MyObjectType)(lsXml)
 
&#160;
Here&#8217;s the code
 
Imports System.Collections.Generic    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=272&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image2.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="240" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb2.png?w=244&#038;h=240" width="244" border="0" /></a> </p>
<p>In his blog post <a href="http://geekswithblogs.net/paulwhitblog/archive/2007/07/20/114076.aspx">Serialize and deserialize objects as xml using generic types in C# 2.0</a> , Paul Whitaker creates some ubiquitous functions for doing Xml Serialization with generics.</p>
<p>&#160;</p>
<p>To serialize:</p>
<p> <code>
<p>Dim lsXml As String = GenericXmlSerializer.SerializeObject(of MyObjectType)(myObject)</p>
<p> </code>
<p>&#160;</p>
<p>To deserialize:</p>
<p> <code>
<p>Dim myObject As MyObjectType = GenericXmlSerializer.DeserializeObject(of MyObjectType)(lsXml)</p>
<p> </code>
<p>&#160;</p>
<p>Here&#8217;s the code</p>
<p> <code>
<p>Imports System.Collections.Generic      <br />Imports System.Text       <br />Imports System.Xml       <br />Imports System.IO       <br />Imports System.Xml.Serialization</p>
<p>Class GenericXmlSerializer      <br />&#160;&#160;&#160; ''' &lt;summary&gt;       <br />&#160;&#160;&#160; ''' To convert a Byte Array of Unicode values (UTF-8 encoded) to a complete String.       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;param name=&quot;characters&quot;&gt;Unicode Byte Array to be converted to String&lt;/param&gt;       <br />&#160;&#160;&#160; ''' &lt;returns&gt;String converted from Unicode Byte Array&lt;/returns&gt;       <br />&#160;&#160;&#160; Public Shared Function UTF8ByteArrayToString(ByVal characters As Byte()) As String </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim encoding As New UTF8Encoding      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim constructedString As String = encoding.GetString(characters)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return constructedString </p>
<p>&#160;&#160;&#160; End Function </p>
<p>&#160;&#160;&#160; ''' &lt;summary&gt;      <br />&#160;&#160;&#160; ''' Converts the String to UTF8 Byte array and is used in De serialization       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;param name=&quot;pXmlString&quot;&gt;&lt;/param&gt;       <br />&#160;&#160;&#160; ''' &lt;returns&gt;&lt;/returns&gt;       <br />&#160;&#160;&#160; Public Shared Function StringToUTF8ByteArray(ByVal pXmlString As String) As Byte() </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim encoding As New UTF8Encoding()      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim byteArray As Byte() = encoding.GetBytes(pXmlString)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return byteArray       <br />&#160;&#160;&#160; End Function </p>
<p>&#160;&#160;&#160; ''' &lt;summary&gt;      <br />&#160;&#160;&#160; ''' Serialize an object into an XML string       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;typeparam name=&quot;T&quot;&gt;&lt;/typeparam&gt;       <br />&#160;&#160;&#160; ''' &lt;param name=&quot;obj&quot;&gt;&lt;/param&gt;       <br />&#160;&#160;&#160; ''' &lt;returns&gt;&lt;/returns&gt;       <br />&#160;&#160;&#160; Public Shared Function SerializeObject(Of T)(ByVal obj As T) As String </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Try      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim xmlString As String = Nothing </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim memoryStream As New MemoryStream()      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim xs As New XmlSerializer(GetType(T))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim xmlTextWriter As New XmlTextWriter(memoryStream, Encoding.UTF8)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xs.Serialize(xmlTextWriter, obj)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; memoryStream = CType(xmlTextWriter.BaseStream, MemoryStream)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlString = UTF8ByteArrayToString(memoryStream.ToArray())       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; memoryStream.Dispose() </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return xmlString      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Catch </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return String.Empty      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; End Try       <br />&#160;&#160;&#160; End Function </p>
<p>&#160;&#160;&#160; ''' &lt;summary&gt;      <br />&#160;&#160;&#160; ''' Reconstruct an object from an XML string       <br />&#160;&#160;&#160; ''' &lt;/summary&gt;       <br />&#160;&#160;&#160; ''' &lt;param name=&quot;xml&quot;&gt;&lt;/param&gt;       <br />&#160;&#160;&#160; ''' &lt;returns&gt;&lt;/returns&gt;       <br />&#160;&#160;&#160; Public Shared Function DeserializeObject(Of T)(ByVal xml As String) As T </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim xs As New XmlSerializer(GetType(T))      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim memoryStream As New MemoryStream(StringToUTF8ByteArray(xml))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim xmlTextWriter As New XmlTextWriter(memoryStream, Encoding.UTF8) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim theObject As T = CType(xs.Deserialize(memoryStream), T)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; memoryStream.Dispose()       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return theObject </p>
<p>&#160;&#160;&#160; End Function </p>
<p>End Class</p>
<p> </code>
<p>&#160;</p>
<p>Rather than be original, I converted most of his code verbatim and have found the functions useful.&#160; </p>
<p>I offer them to you warranty free, unadorned and hopefully useful.</p>
<p>&#160;</p>
<p>&#160;</p>
<p> <span class="sbmLink"><br />
<table cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td class="sbmText">Share this post : </td>
<td class="sbmDim"><a class="sbmDim" title="Post it to del.icio.us" href="http://del.icio.us/post?url=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to digg" href="http://digg.com/submit?phase=2&amp;url=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to dotnetkicks" href="http://www.dotnetkicks.com/kick/?url=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to live" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to reddit!" href="http://reddit.com/submit?url=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to technorati!" href="http://technorati.com/faves/?add=http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/&amp;title=Serialize and Deserialize Objects as Xml using generic types in VB.Net" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<p> </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=272&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/08/10/serialize-and-deserialize-objects-as-xml-using-generic-types-in-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" medium="image" />
	</item>
		<item>
		<title>Flick Scrolling in Winforms</title>
		<link>http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 00:12:16 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<category><![CDATA[scrolling]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[winforms]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/</guid>
		<description><![CDATA[ 
&#160;
In the article A Simple Scroll Controller for Winforms I mentioned that I was working on a FlickScrolling framework for Winforms.
I finished a version of this code a couple of months ago and it seems to work well.&#160;&#160; 
The code never went into production because I think that Windows 7 will provide this functionality [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=266&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image.png"><img title="image" style="display:inline;border-width:0;" height="134" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb.png?w=244&#038;h=134" width="244" border="0" /></a> </p>
<p>&#160;</p>
<p>In the article <a title="Permanent Link to A Simple Scroll Controller for Winforms" href="http://anoriginalidea.wordpress.com/2009/02/20/a-simple-scroll-controller-for-winforms/">A Simple Scroll Controller for Winforms</a> I mentioned that I was working on a FlickScrolling framework for Winforms.</p>
<p>I finished a version of this code a couple of months ago and it seems to work well.&#160;&#160; </p>
<p>The code never went into production because I think that Windows 7 will provide this functionality automatically for winforms applications.&#160; </p>
<p>Nevertheless, some people have showed an interest in what I came up with, so I’m posting it here for your edification.&#160; I hope someone finds it useful.</p>
<p><strong>Usage</strong></p>
<p>To use, simply instantiate the “ApplicationFlickScrolling” class, passing in the datatypes of the container controls you wish to scroll.</p>
<p>For example:</p>
<p>Private Shared moApplicationFlick As New ApplicationFlickScrolling(GetType(Panel))</p>
<p>To switch it on and off, used the “Enabled” property:</p>
<p>moApplicationFlick.Enabled = True</p>
<p> That’s it!</p>
<p>&#160;</p>
<p><strong>The Implementation</strong></p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/08/image1.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="144" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb1.png?w=240&#038;h=144" width="240" border="0" /></a> </p>
<p>The code consists of 3 classes:</p>
<ul>
<li>ApplicationFlickScrolling to act as the master controller class </li>
<li>ApplicationMouseEvents class for detecting mouse events </li>
<li>FlickDetector for detecting simple gestures </li>
<li>ScrollController for performing elastic-style easing of scrolling </li>
</ul>
<p><strong>Improvements</strong></p>
<p>If I’d have continued developing this I would have modified ScrollController to use “proper” easing functions.&#160; </p>
<p> <a href="http://www.filedropper.com/flickscrollingprototype"><img height="145" src="http://www.filedropper.com/download_button.png" width="127" border="0" /></a>  <br /> 
<div style="font-size:9px;font-family:arial,;"><a href="http://www.filedropper.com">FileDropper Free File Hosting</a></div>
<div style="font-size:9px;font-family:arial,;">&#160;</div>
<div style="font-size:9px;font-family:arial,;">Note: The usual disclaimers apply for this code, which has been given freely to help others learn and is not intended for usage in your business application or for running a nuclear facility.</div>
</p>
<p> <span class="sbmLink"><br />
<table cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td class="sbmText">Share this post : </td>
<td class="sbmDim"><a class="sbmDim" title="Post it to del.icio.us" href="http://del.icio.us/post?url=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to digg" href="http://digg.com/submit?phase=2&amp;url=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to dotnetkicks" href="http://www.dotnetkicks.com/kick/?url=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to live" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to reddit!" href="http://reddit.com/submit?url=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to technorati!" href="http://technorati.com/faves/?add=http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/&amp;title=Flick Scrolling in Winforms" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<p> </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=266&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/08/10/flick-scrolling-in-winforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/08/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://www.filedropper.com/download_button.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" medium="image" />
	</item>
		<item>
		<title>RIAServices &#8211; Proudly using SessionState within your DomainServices</title>
		<link>http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 07:17:03 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[RIAServices]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[sessionstate]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/</guid>
		<description><![CDATA[&#160; 
&#160;
As mentioned in my previous article How to build huge dynamically loading cross platform Silverlight Business Applications, I’m experimenting with the idea of a hybrid web application that has some parts implement as webforms, others as Silverlight.
A problem I encountered was that RIAService calls did not necessarily access to the same information as my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=262&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;<a href="http://anoriginalidea.files.wordpress.com/2009/07/image10.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="169" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb10.png?w=244&#038;h=169" width="244" border="0" /></a> </p>
<p>&#160;</p>
<p>As mentioned in my previous article <a title="Permanent Link to How to build huge dynamically loading cross platform Silverlight Business Appl" href="http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/">How to build huge dynamically loading cross platform Silverlight Business Applications</a>, I’m experimenting with the idea of a hybrid web application that has some parts implement as webforms, others as Silverlight.</p>
<p>A problem I encountered was that RIAService calls did not necessarily access to the same information as my webforms did.&#160; An example is “SessionState”.&#160; In the case of my company’s framework, the authentication system must be invoked prior to anything else within my domain services.&#160; In addition the authentication system needs access to SessionState.</p>
<p>&#160;</p>
<p>To do this I thought I could inherit from DataServiceFactory and add what I needed.&#160; Unfortunately the class is marked as not inheritable.&#160; The way around this is to encapsulate the class.</p>
<p>In the code sample below you can see an implementation of MyDataServiceFactory that encapsulates DataServiceFactory and returns an encapsulated HttpHandler that flags to ASP.Net that sessionstate is needed.</p>
<p> <code>
<p>&#160;</p>
<p>Imports System.Web      <br />Imports System.Web.SessionState </p>
<p>Public Class MyDataServiceFactory      <br />&#160;&#160;&#160; Implements IHttpHandlerFactory       <br />&#160;&#160;&#160; Private moHandlerFactory As IHttpHandlerFactory </p>
<p>&#160;&#160;&#160; Public Sub New()      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; moHandlerFactory = New System.Web.Ria.DataServiceFactory       <br />&#160;&#160;&#160; End Sub </p>
<p>&#160;&#160;&#160; Public Function GetHandler(ByVal context As System.Web.HttpContext, ByVal requestType As String, ByVal url As String, ByVal pathTranslated As String) As System.Web.IHttpHandler Implements System.Web.IHttpHandlerFactory.GetHandler </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return New MyDataServicesHandler(moHandlerFactory.GetHandler(context, requestType, url, pathTranslated)) </p>
<p>&#160;&#160;&#160; End Function </p>
<p>&#160;&#160;&#160; Public Sub ReleaseHandler(ByVal handler As System.Web.IHttpHandler) Implements System.Web.IHttpHandlerFactory.ReleaseHandler      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; moHandlerFactory.ReleaseHandler(DirectCast(handler, MyDataServicesHandler).InnerHandler)       <br />&#160;&#160;&#160; End Sub       <br />End Class       <br />Public Class MyDataServicesHandler       <br />&#160;&#160;&#160; Implements IHttpHandler       <br />&#160;&#160;&#160; Implements IRequiresSessionState ' Let ASP.Net know that you need to use the session object </p>
<p>&#160;&#160;&#160; Public InnerHandler As IHttpHandler      <br />&#160;&#160;&#160; Public Sub New(ByVal handlerToWrap As IHttpHandler)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; InnerHandler = handlerToWrap       <br />&#160;&#160;&#160; End Sub       <br />&#160;&#160;&#160; Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.IsReusable       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Get       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return InnerHandler.IsReusable       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; End Get       <br />&#160;&#160;&#160; End Property </p>
<p>&#160;&#160;&#160; Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' You can access context.Session here if you want to...       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; InnerHandler.ProcessRequest(context)       <br />&#160;&#160;&#160; End Sub       <br />End Class</p>
<p>&#160;</p>
<p> </code>
<p>Of course to use this, you need to modify the web.config and change the two references to DataServicesFactory to point to your new class instead, which should be hosted in it’s own class library.</p>
<p>&#160;</p>
<p> <span class="sbmLink"><br />
<table cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td class="sbmText">Share this post : </td>
<td class="sbmDim"><a class="sbmDim" title="Post it to del.icio.us" href="http://del.icio.us/post?url=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to digg" href="http://digg.com/submit?phase=2&amp;url=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to dotnetkicks" href="http://www.dotnetkicks.com/kick/?url=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to live" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to reddit!" href="http://reddit.com/submit?url=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to technorati!" href="http://technorati.com/faves/?add=http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/&amp;title=Proudly using sessionstate within RiaServices" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<p> </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=262&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/07/31/riaservices-proudly-using-sessionstate-within-your-domainservices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" medium="image" />
	</item>
		<item>
		<title>How to build huge dynamically loading cross platform Silverlight Business Applications</title>
		<link>http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 00:52:03 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[dynamically loaded assemblies]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[silverlight 3 navigation]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/</guid>
		<description><![CDATA[The Silverlight 3 navigation framework provides a really nice way of integrating with the browser history.  By default it tends to support a single silverlight control model rather than leveraging the full power of asp.net.  In this article I propose an way of structuring applications that utilise asp.net and Silverlight.   The approach even allows the use of HTML, WPF-XBAP and Flash as an alternative to Silverlight or in any combination.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=254&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image8.png"><img title="Embedding RIAs in your web pages can be a rewarding experience" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="244" alt="Embedding RIAs in your web pages can be a rewarding experience" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb8.png?w=214&#038;h=244" width="214" border="0" /></a> </p>
<p>The Silverlight 3 navigation framework provides a really nice way of integrating with the browser history.&#160; By default it tends to support a single silverlight control model rather than leveraging the full power of asp.net.&#160; In this article I propose an way of structuring applications that utilise asp.net and Silverlight.&#160;&#160; The approach even allows the use of HTML, WPF-XBAP and Flash as an alternative to Silverlight or in any combination.&#160; </p>
<p>&#160;</p>
<p><strong>Out of the box with Silverlight 3</strong></p>
<p>It seems to me that the Silverlight 3 navigation system works best as a single control embedded in a page (contained in a single xap file).&#160; Navigation (and loading of the many parts of an application) happen within that single control.&#160; This is similar to the traditional “smart client” architecture.</p>
<p>The Silverlight 3 navigation samples provided allow the straight forward creation of this kind of smart client, with a nice Silverlight themeable container.&#160; For simple applications, I recommend people take a look.</p>
<p>To take this even further the Prism framework (which I have found integrates well with Silverlight 3) provides and excellent container framework for those who would like to take this model further.</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image9.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="291" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb9.png?w=628&#038;h=291" width="628" border="0" /></a> </p>
<p>&#160;</p>
<p><strong>Dynamically loaded Assemblies in Silverlight 3</strong></p>
<p>In the article “Silverlight 3 Navigation: Navigating to Pages in dynamically-loaded assemblies” , David Poll shows a way of dynamically loading pages into the primary navigation container by using “shim” pages within it.&#160; </p>
<p>David describes his strategy as follows:</p>
<ul>
<li>Load an assembly containing a Page dynamically </li>
<li>Include in this assembly a “shim” Page with no code behind.&#160; In its XAML, reference the real page with code behind, and forward any navigation-related information (events, title, query strings, etc.) to that Page </li>
<li>When that page is navigated to, replace the Frame’s content with the real page. </li>
<li>From the application, navigate to the “shim” page in the dynamically-loaded assembly </li>
</ul>
<p>For a developer, this means creating empty shim pages in the main project for every page they require in other assemblies.</p>
<p>As admitted by the author, this solution is “it’s a bit obtuse, and still harder to do than it ought to be”.&#160; I believe David has pushed the Silverlight smart client model as far as it can go.&#160; </p>
<p>If you read through the comments section of David’s article “<a href="http://www.davidpoll.com/?p=92#comment-2759" target="_blank">mitkodi</a>” discusses a way of using UriMapping to simplify the solution.&#160; This is similar to the approach I’m proposing in this article.&#160; (I didn’t see this before)</p>
<p>Perhaps Microsoft will create some markup of some kind to allow cross navigation between assemblies.&#160; I hope they do.&#160; </p>
<p>&#160;</p>
<p><strong>Another Way</strong></p>
<p>It seems to me that there are two ways RIA applications can be built, either as a smart client (as described above) or as true web application web pages, each with embedded controls.&#160; </p>
<p>In the second approach, each Silverlight page could be embedded on it’s own web page.&#160; Navigation could happen at the page level, leveraging the natural navigability of web solutions.&#160;&#160;&#160; The web page could act as a simple “shim” for hosting the RIA content, or it could provide more such as cross-platform and “deep linking”.</p>
<p>&#160;</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image3.png"><img title="image" style="display:inline;border-width:0;" height="263" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb3.png?w=391&#038;h=263" width="391" border="0" /></a> </p>
<p>&#160;</p>
<p>In short you would have a solution that is:</p>
<ul>
<li>Navigable : Navigation could work without the Navigation framework </li>
<li>Cross Platform : An alternate web rendering of it’s content could be provided (which also allows for simpler “deep linking” for SEO) </li>
<li>Modular : If each Silverlight page was on it’s own webpage, each page could have it’s own xap file, with no special workarounds or compromises </li>
<li>Versatile: You can use any Silverlight 3 features you like (including RIA Services for example), using as many or as few assemblies you wish </li>
<li>Not Silverlight Specific : The solution could work for any embedded RIA technology, including Flash (Flex) or WPF-XBAP. </li>
</ul>
<p>&#160;</p>
<p>I’ve always thought that combining existing web technologies (DHTML, AJAX, Server side rendering) with RIA would provide something far greater than just an RIA or a web application on their own.</p>
<p>In the the RIA Hybrid example shown in this article, Routing support (introduced in .NET 3.5 SP1) and master pages are used to make the solution simpler.</p>
<p>&#160;</p>
<h4>The RIA Hybrid</h4>
<p>&#160;</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image4.png"><img title="Write a letter Maria, address it to Silverlight..." style="display:inline;border-width:0;" height="140" alt="Write a letter Maria, address it to Silverlight..." src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb4.png?w=244&#038;h=140" width="244" border="0" /></a></p>
<p>&#160;</p>
<p>In this example, Maria the customer begins at a “home” page, then navigates from this page to a contact enquiry, then to a contact detail.</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image5.png"><img title="image" style="display:inline;border-width:0;" height="114" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb5.png?w=592&#038;h=114" width="592" border="0" /></a> </p>
<p><strong>The Solution</strong></p>
<p>To the Maria it’s just a normal website with normal navigation.&#160; They can use browser history and bookmarking work regardless of the browser they are using.&#160; Here’s what the solution looks like:</p>
<p>&#160;</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image6.png"><img title="The solution" style="display:inline;border-width:0;" height="240" alt="The solution" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb6.png?w=174&#038;h=240" width="174" border="0" /></a> </p>
<p>The content Maria sees is actually implemented entirely in Silverlight.&#160; In web page“Home.aspx” is a simple web page that provides an alternate web rendering of it’s content if Silverlight is not available.</p>
<p>&#160;</p>
<p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image7.png"><img title="image" style="display:inline;border-width:0;" height="258" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb7.png?w=384&#038;h=258" width="384" border="0" /></a> </p>
<p>&#160;</p>
<p>Here’s the layout xaml of Home.Mainpage,xaml:</p>
<blockquote><p>&#160; &lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;StackPanel&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TextBlock FontSize=&quot;100&quot; Text=&quot;Welcome to Home&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;HyperlinkButton&#160; x:Name=&quot;lnkViewContactEnquiry&quot;&#160; Content=&quot;View Contact Enquiry&quot; Tag=&quot;ContactEnquiry.aspx&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/StackPanel&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/Grid&gt;       <br />&lt;/UserControl&gt;</p>
</blockquote>
<p>Here’s the code of Home.Mainpage.vb:</p>
<blockquote><p>Private Sub lnkViewContactEnquiry_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles lnkViewContactEnquiry.Click      <br />&#160;&#160;&#160; System.Windows.Browser.HtmlPage.Window.Navigate(New Uri(sender.Tag, UriKind.Relative))       <br />End Sub</p>
</blockquote>
<p>&#160;</p>
<p>As you can see, the code is quite simple and provides an almost html-like approach to navigation.</p>
<p>The code for Home.aspx is also straight forward:</p>
<blockquote><p>&lt;%@ Page Title=&quot;&quot; Language=&quot;vb&quot; AutoEventWireup=&quot;false&quot; MasterPageFile=&quot;~/Container.Master&quot; CodeBehind=&quot;Home.aspx.vb&quot; Inherits=&quot;WebHybrid.Web.Home&quot; %&gt;      <br />&lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;head&quot; runat=&quot;server&quot;&gt;       <br />&lt;/asp:Content&gt;       <br />&lt;asp:Content ID=&quot;Content2&quot; ContentPlaceHolderID=&quot;ContentPlaceHolder1&quot; runat=&quot;server&quot;&gt;</p>
<p>&#160;&#160;&#160;&#160; &lt;h1&gt;Welcome to Home&lt;/h1&gt;&#160;&#160; <br />&#160;&#160;&#160; &lt;asp:HyperLink ID=&quot;HyperLink1&quot; runat=&quot;server&quot; NavigateUrl=&quot;ContactEnquiry.aspx&quot; &gt;View Contact Enquiry&lt;/asp:HyperLink&gt;       <br />&lt;/asp:Content&gt;</p>
</blockquote>
<p>As you can see, the asp.net page only contains simple html.&#160;&#160; This means that the developer only has to concentrate on providing the cross-platform rendering of the content.&#160;&#160; So where’s the Silverlight? </p>
<p>I’ve stored the Silverlight magic in a master page (“Container.Master”) which can be reused with other Shim pages.&#160; Basically it checks to see if a matching xbap file exists for the page, and if it does it will render this in a Silverlight host instead of the “ContentPlaceHolder1” web content.</p>
<p>You may notice, that in either case, Maria navigates successfully to ContactEnquiry.aspx.&#160; If you look at the solution screenshot above you’ll notice there is not ContactEnquiry.aspx.</p>
<p>&#160;</p>
<p><strong>The Phantom ContactEnquiry.aspx &#8211; Routing</strong></p>
<p>If the developer doesn’t need to provide web content, the cool new .NET3.5 SP1 “Routing” feature comes to the rescue.&#160;&#160; This feature allows redirection to a generic hosting page if the called aspx doesn’t exist.&#160; In this case, GenericSilverlightHost.aspx.&#160; </p>
<p>&#160;</p>
<p>The magic of redirection is accomplished by creating a “Route Handler” class.&#160; I haven’t seen any vb.net examples of these on the web, so here’s the code:</p>
<blockquote><p>Imports System.Web.Routing      <br />Imports System.Web       <br />Imports System.Web.UI       <br />Imports System.Web.Compilation       <br />Imports System.IO       <br />Public Class WebFormRouteHander       <br />&#160;&#160;&#160; Implements IRouteHandler       <br />&#160;&#160;&#160; Private msWebFolder As String       <br />&#160;&#160;&#160; Public Sub New(ByVal path As String)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; msWebFolder = path       <br />&#160;&#160;&#160; End Sub       <br />&#160;&#160;&#160; Public Function GetHttpHandler(ByVal requestContext As System.Web.Routing.RequestContext) As System.Web.IHttpHandler Implements System.Web.Routing.IRouteHandler.GetHttpHandler </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsPage As String = requestContext.RouteData.GetRequiredString(&quot;Page&quot;) &amp; &quot;.aspx&quot; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsFullPathOfPage As String = Path.Combine(msWebFolder, lsPage)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; If File.Exists(lsFullPathOfPage) Then       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return BuildManager.CreateInstanceFromVirtualPath(&quot;~/&quot; &amp; lsPage, GetType(Page))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Else       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return BuildManager.CreateInstanceFromVirtualPath(&quot;~/GenericSilverlightHost.aspx&quot;, GetType(Page))       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; End If </p>
<p>&#160;&#160;&#160; End Function      <br />End Class</p>
</blockquote>
<p>It’s wired up with this code in Global.asax:</p>
<blockquote><p>Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)      <br />&#160;&#160;&#160; &#8216; Fires when the application is started       <br />&#160;&#160;&#160; RouteTable.Routes.Add(New Route(&quot;{Page}.aspx&quot;, New WebFormRouteHander(Server.MapPath(&quot;/&quot;))))       <br />End Sub </p>
</blockquote>
<p>Please remember that to get Routing working on your site you will need to modify your web.config file.&#160; The easiest way is to search for the word “Routing” in the sample web.config.</p>
<p>So that’s it!</p>
<p><a href="http://www.filedropper.com/webhybrid" target="_blank">Download the code now</a> and try out the solution, I think you’ll like it.</p>
<p>&#160;</p>
<h4>Conclusion</h4>
<p>So developers can create an unlimited number of Silverlight pages, in any number of dynamically loaded xbap assemblies and provide navigation between these. </p>
<p>This rather obvious solution could be taken much further. It could work with other web frameworks such as ASP.Net-MVC or a completely non-Microsoft one.&#160; It could work with any RIA technology or combinations of those.</p>
<p>I’m really interested in what people have to say about this approach. </p>
<p>&#160;</p>
<h4>Download the Code</h4>
<p> <a href="http://www.filedropper.com/webhybrid"><img height="145" src="http://www.filedropper.com/download_button.png" width="127" border="0" /></a>  <br /> 
<div style="font-size:9px;font-family:arial,;"><a href="http://www.filedropper.com">FileDropper Free File Hosting</a></div>
<h4>Links</h4>
<p><a href="http://www.davidpoll.com/?p=92" target="_blank">Silverlight 3 Navigation: Navigating to Pages in dynamically-loaded assemblies</a> – David Poll</p>
<p><a href="http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/" target="_blank">Goodbye to Url Rewriting</a></p>
<p>&#160;</p>
<p> <span class="sbmLink"><br />
<table cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td class="sbmText">Share this post : </td>
<td class="sbmDim"><a class="sbmDim" title="Post it to del.icio.us" href="http://del.icio.us/post?url=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to digg" href="http://digg.com/submit?phase=2&amp;url=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to dotnetkicks" href="http://www.dotnetkicks.com/kick/?url=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to live" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to reddit!" href="http://reddit.com/submit?url=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to technorati!" href="http://technorati.com/faves/?add=http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/&amp;title=How to build huge dynamically loading Silverlight Business Applications" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<p> </span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=254&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/07/22/how-to-build-huge-dynamic-cross-platform-silverlight-business-applications/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb8.png" medium="image">
			<media:title type="html">Embedding RIAs in your web pages can be a rewarding experience</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb4.png" medium="image">
			<media:title type="html">Write a letter Maria, address it to Silverlight...</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb6.png" medium="image">
			<media:title type="html">The solution</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://www.filedropper.com/download_button.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" medium="image" />
	</item>
		<item>
		<title>Silverlight 3 style NavigationContext in WPF</title>
		<link>http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 03:00:04 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>
		<category><![CDATA[prism]]></category>
		<category><![CDATA[silverlight 3]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/</guid>
		<description><![CDATA[&#160; 
At the moment I’m experimenting with various user interface technologies.&#160; Because the prototypes are working in parallel, I want to reuse code where possible.&#160; With this in mind, I’ve created a couple of useful wrapper functions for navigation in both Silveright 3 and WPF that I thought I’d share.
&#160;
In case you don’t know the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=239&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#160;<a href="http://anoriginalidea.files.wordpress.com/2009/07/image1.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="226" alt="image" src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb1.png?w=244&#038;h=226" width="244" border="0" /></a> </p>
<p>At the moment I’m experimenting with various user interface technologies.&#160; Because the prototypes are working in parallel, I want to reuse code where possible.&#160; With this in mind, I’ve created a couple of useful wrapper functions for navigation in both Silveright 3 and WPF that I thought I’d share.</p>
<p>&#160;</p>
<p>In case you don’t know the Silverlight 3 Beta now has a navigation framework that works in a similar way to WPF’s Frame navigation feature.&#160;&#160; To learn more about it, check our Jeff Poise’s great article <a title="Silverlight 3&#39;s New Navigation Framework" href="http://www.wintellect.com/CS/blogs/jprosise/archive/2009/04/07/silverlight-3-s-new-navigation-framework.aspx">Silverlight 3&#8217;s New Navigation Framework</a>.</p>
<p>&#160;</p>
<p>I brief, to navigate to a new page and pass a parameters you use a syntax like this in the code behind:</p>
<p> <code>
<p>&#160;</p>
<p>Me.NavigationService.Navigate(New Uri(String.Format(“/SomePage.xaml?someparameter={0}”,somevalue), UriKind.Relative))</p>
<p> </code>
<p>&#160;</p>
<p>In the loaded event of the page you’re navigating to, you use code like this:</p>
<p>&#160;</p>
<p> <code>
<p>Private Sub MyPage_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded      <br />&#160;&#160;&#160;&#160; txtSomeTextbox.Text =&#160; Me.NavigationContext.QueryString(&quot;someparameter&quot;)       <br />End Sub</p>
<p> </code>
<p>&#160;</p>
<p><strong>Nicer Navigating</strong></p>
<p>I found the Navigate method above a little awkward, so in Silverlight I created a little helper function called “NavigateTo”, on page that makes the code a bit nicer.</p>
<p>&#160;</p>
<p> <code>
<p>Me.NavigateTo(“/SomePage.xaml”,”someparameter”,somevalue)</p>
<p> </code>
<p>&#160;</p>
<p>Here’s the implementation:</p>
<p>&#160;</p>
<p> <code>
<p>Imports System.ComponentModel      <br />Public Module PageHelper       <br />&#160;&#160;&#160; &lt;System.Runtime.CompilerServices.Extension()&gt; _       <br />&#160;&#160; Public Sub NavigateTo(ByVal page As System.Windows.Controls.Page, ByVal navigationUrl As String, ByVal ParamArray arguments() As String)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsUrl As String = navigationUrl &amp; &quot;?&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lbIsParamName As Boolean = True       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; For Each lsArg As String In arguments       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lsUrl &amp;= lsArg       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; If lbIsParamName Then lsUrl &amp;= &quot;=&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lbIsParamName = Not lbIsParamName       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Next </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; page.NavigationService.Navigate(New Uri(lsUrl, UriKind.Relative))      <br />&#160;&#160;&#160; End Sub </p>
<p>End Module</p>
<p> </code>
<p>&#160;</p>
<p><strong>Nicer NavigationContext</strong></p>
<p>&#160;</p>
<p>I found Silverlight3’s NavigationContext quite nice to use.&#160; Unfortunately this is not available in WPF.&#160; I set about creating a helper function that would emulate this functionality in WPF.</p>
<p>&#160;</p>
<p><strong>WPF Navigation Helper</strong></p>
<p>&#160;</p>
<p>Here’s a WPF version of PageHelper that allows a compatible syntax with Silverlight3.&#160;&#160; </p>
<p> <code>
<p>&#160;</p>
<p>Imports System.ComponentModel      <br />Public Module PageHelper </p>
<p>&#160;&#160;&#160; Private WithEvents moCurrentNav As NavigationService      <br />&#160;&#160;&#160; &lt;System.Runtime.CompilerServices.Extension()&gt; _       <br />&#160;&#160; Public Sub NavigateTo(ByVal page As System.Windows.Controls.Page, ByVal navigationUrl As String, ByVal ParamArray arguments() As String) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; '&#160; Update Navigation Args      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loNavigationUri As New NavigationContext </p>
<blockquote><p>&#160; If arguments.Length &gt; 0 Then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; For i As Integer = 0 To arguments.Length - 1 Step 2         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loNavigationUri.QueryString.Add(arguments(i), arguments(i + 1))         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Next </p>
</blockquote>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; End If</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; loNavigationUri.Uri = New Uri(navigationUrl, UriKind.Relative) </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Strip the Xaml extension&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsClassName As String = navigationUrl.Substring(0, navigationUrl.Length - 5)&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Make my class name&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim lsName As String = page.GetType.Namespace &amp; &quot;.&quot; &amp; lsClassName&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Instantiate the class&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Dim loPage As Page = page.GetType.Assembly.CreateInstance(lsName)&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Do the Navigation&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page.NavigationService.Navigate(loPage, loNavigationUri)       <br />&#160;&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Store the current NavigationService so we can complete      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; moCurrentNav = page.NavigationService </p>
<p>&#160;&#160;&#160; End Sub      <br />&#160;&#160;&#160; &lt;System.Runtime.CompilerServices.Extension()&gt; _       <br />Public Function NavigationContext(ByVal page As System.Windows.Controls.Page) As NavigationContext       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Return moLastNavContext       <br />&#160;&#160;&#160; End Function       <br />&#160;&#160;&#160; Private Sub moCurrentNav_Navigated(ByVal sender As Object, ByVal e As System.Windows.Navigation.NavigationEventArgs) Handles moCurrentNav.Navigated       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; moLastNavContext = e.ExtraData       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; moCurrentNav = Nothing       <br />&#160;&#160;&#160; End Sub       <br />&#160;&#160;&#160; Private moLastNavContext As New NavigationContext </p>
<p>End Module      <br />Public Class NavigationContext       <br />&#160;&#160;&#160; Public QueryString As New Dictionary(Of String, String)       <br />&#160;&#160;&#160; Public Uri As Uri       <br />End Class </p>
<p> </code>
<p>&#160;</p>
<p>I also have provided primitive support for cross-assembly navigation. </p>
<p>&#160;</p>
<p>I hope someone found this useful, let me know.</p>
<p>&#160;</p>
<p>&#160;</p>
<p> <span class="sbmLink"><br />
<table cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td class="sbmText">Share this post : </td>
<td class="sbmDim"><a class="sbmDim" title="Post it to del.icio.us" href="http://del.icio.us/post?url=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to digg" href="http://digg.com/submit?phase=2&amp;url=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to dotnetkicks" href="http://www.dotnetkicks.com/kick/?url=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to live" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;mkt=en-us&amp;url=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to reddit!" href="http://reddit.com/submit?url=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" border="0" /></a></td>
<td class="sbmDim"><a class="sbmDim" title="Post it to technorati!" href="http://technorati.com/faves/?add=http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/&amp;title=Silverlight 3 style navigation in WPF" target="_blank"><img src="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" border="0" /></a></td>
</tr>
</tbody>
</table>
<p> </span>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p><a title="Jeff Prosise&#39;s Blog" href="http://www.wintellect.com/CS/blogs/jprosise/default.aspx">&#160;</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=239&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/07/08/silverlight-3-style-navigationcontext-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/deliciou4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/digg14.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/CropperCapture154.jpg" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/live4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/reddit4.png" medium="image" />

		<media:content url="http://blogs.msdn.com/blogfiles/rahulso/WindowsLiveWriter/IconsfordifferentSocialBookmarkingSites_B387/technora4.png" medium="image" />
	</item>
		<item>
		<title>Silverlight &#8220;Name &#8216;InitializeComponent&#8217; is not declared&#8221;</title>
		<link>http://anoriginalidea.wordpress.com/2009/07/01/silverlight-name-initializecomponent-is-not-declared/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/07/01/silverlight-name-initializecomponent-is-not-declared/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 04:51:28 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[silverlighterror]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/07/01/silverlight-name-initializecomponent-is-not-declared/</guid>
		<description><![CDATA[ 
It is quite common in Webforms, Winforms and other environements to copy user interface views from one project to another.
When you copy xaml files from one Silverlight project to another you may experience the error:
“Name &#8216;InitializeComponent&#8217; is not declared”
&#160;
This happens because the “x:Class” directive in the top of the xaml file includes the project [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=236&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://anoriginalidea.files.wordpress.com/2009/07/image.png"><img title="She&#39;d be far less frutrated if she plugged it into the network first." style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="240" alt="She&#39;d be far less frutrated if she plugged it into the network first." src="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb.png?w=194&#038;h=240" width="194" border="0" /></a> </p>
<p>It is quite common in Webforms, Winforms and other environements to copy user interface views from one project to another.</p>
<p>When you copy xaml files from one Silverlight project to another you may experience the error:</p>
<p>“Name &#8216;InitializeComponent&#8217; is not declared”</p>
<p>&#160;</p>
<p>This happens because the “x:Class” directive in the top of the xaml file includes the project namespace.</p>
<p>So, open up your xaml file, and change this:</p>
<p>&#160;</p>
<p>x:Class=”PreviousProject.YourClass”</p>
<p>&#160;</p>
<p>To the new project namespace:</p>
<p>x:Class=”NewProject.YourClass”</p>
<p>&#160;</p>
<p>Oh and BTW…..<strong>ITS CASE SENSITIVE!</strong>&#160; </p>
<p>&#160;</p>
<p>I know this isn’t much of a post, but hopefully it will provide a useful search engine hit for the desperate.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/236/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=236&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/07/01/silverlight-name-initializecomponent-is-not-declared/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="http://anoriginalidea.files.wordpress.com/2009/07/image_thumb.png" medium="image">
			<media:title type="html">She&#39;d be far less frutrated if she plugged it into the network first.</media:title>
		</media:content>
	</item>
		<item>
		<title>Reflections on Permutation City</title>
		<link>http://anoriginalidea.wordpress.com/2009/04/15/reflections-on-permutation-city/</link>
		<comments>http://anoriginalidea.wordpress.com/2009/04/15/reflections-on-permutation-city/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 23:06:23 +0000</pubDate>
		<dc:creator>anoriginalidea</dc:creator>
				<category><![CDATA[Book Review]]></category>

		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2009/04/15/reflections-on-permutation-city/</guid>
		<description><![CDATA[
&#160;
Imagine a world where your a copy of your consciousness could be downloaded into a supercomputer, where you continue to exist, running as another computer program.&#160;&#160; A Virtual World is provided for your &#8220;Copy&#8221; to exist in.
Although Copies only run at one seventeenth of the speed (at most) of &#8220;real&#8221; humans, they don&#8217;t notice, as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=232&subd=anoriginalidea&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a title="Take a look at the book on Amazon" href="http://www.amazon.com/gp/product/006105481X?ie=UTF8&amp;tag=anoriide-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=006105481X" target="_blank"><img title="" height="240" alt="Permutation City" src="https://images-na.ssl-images-amazon.com/images/G/01/ciu/29/bc/3fc7e03ae7a06a2449a6f110.L._AA240_.jpg" width="240" border="0"></a></p>
<p>&nbsp;</p>
<p>Imagine a world where your a copy of your consciousness could be downloaded into a supercomputer, where you continue to exist, running as another computer program.&nbsp;&nbsp; A Virtual World is provided for your &#8220;Copy&#8221; to exist in.</p>
<p>Although Copies only run at one seventeenth of the speed (at most) of &#8220;real&#8221; humans, they don&#8217;t notice, as from their point of view, time seems normal.&nbsp; </p>
<p>The Copy itself made up of a brain and a body.&nbsp; The brain is a software simulation of the neural network of the brain, which provides a copy of the consciousness with full fidelity.&nbsp; The &#8220;body&#8221; is made up of a number of less sophisticated simulations of various organs.</p>
<p>The way a Copy actually &#8220;thinks&#8221; is not fully understood.&nbsp; Nevertheless it is possible for the Copy to alter it&#8217;s world, body, memories and emotions.</p>
<p>The ability to dull or intensify specific emotions is a key driver of life.&nbsp; We continue to seek happiness, thrills and highs whilst trying to alleviate suffering, unpleasantness and guilt. </p>
<p>In our society this is done using both external and internal stimulus.&nbsp; The use of alcohol and drugs (or the iPhone) in our society provide many with a quick (although temporary) fix, others follow a seemingly endless variety of ideas, philosophies, sciences and religions. </p>
<p>In the book &#8220;Permutation City&#8221;, by Greg Egan, the idea of &#8220;Copies&#8221; began in medicine, where medical researchers were creating increasingly sophisticated software models of the brain and body.&nbsp; A breakthrough occurred when a researcher was able to activate the consciousness of a scan of himself and place it in a primitive VR environment.&nbsp; It&#8217;s first words were &#8220;Please let me out! This feels like being buried alive.&#8221;&nbsp; Despite this (as it turns out common) reaction, copies became an attempt at designer immortality, with very interesting repercussions.</p>
<p>The book is full of great ideas and was a really interesting read. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anoriginalidea.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anoriginalidea.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anoriginalidea.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anoriginalidea.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anoriginalidea.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anoriginalidea.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anoriginalidea.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anoriginalidea.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anoriginalidea.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anoriginalidea.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anoriginalidea.wordpress.com&blog=1093530&post=232&subd=anoriginalidea&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://anoriginalidea.wordpress.com/2009/04/15/reflections-on-permutation-city/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a70f6e33c95b7744068ecffceac0aa31?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">anoriginalidea</media:title>
		</media:content>

		<media:content url="//images-na.ssl-images-amazon.com/images/G/01/ciu/29/bc/3fc7e03ae7a06a2449a6f110.L._AA240_.jpg" medium="image">
			<media:title type="html">Permutation City</media:title>
		</media:content>
	</item>
	</channel>
</rss>