<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Developer Flotsam &#187; Uncategorized</title>
	<atom:link href="http://blog.webjak.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.webjak.net</link>
	<description>Developer Flotsam - random stuff floating around?</description>
	<lastBuildDate>Sun, 16 May 2010 13:18:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.webjak.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/c69967a9056213792a3a7b47a6f573af?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Developer Flotsam &#187; Uncategorized</title>
		<link>http://blog.webjak.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.webjak.net/osd.xml" title="Developer Flotsam" />
	<atom:link rel='hub' href='http://blog.webjak.net/?pushpress=hub'/>
		<item>
		<title>SDDN Meeting, 30 June, Melbourne</title>
		<link>http://blog.webjak.net/2009/06/26/sddn-meeting-30-june-melbourne/</link>
		<comments>http://blog.webjak.net/2009/06/26/sddn-meeting-30-june-melbourne/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 09:30:03 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.webjak.net/?p=325</guid>
		<description><![CDATA[EDIT: We&#8217;ll be giving away not one but two Expression Studio Suites worth over $1K each! Come along and see Sketchflow and Blend 3 in all their glory! Sketchflow Shane Morris, Microsoft Don&#8217;t know what Sketchflow is? Then read this!. Okay, now tell me you dont want Shane, MS UX Evangelist, to run through it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=325&subd=jakkaj&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>EDIT: <strong>We&#8217;ll be giving away not one but two Expression Studio Suites worth over $1K each!</strong></p>
<p>Come along and see Sketchflow and Blend 3 in all their glory!</p>
<p><strong>Sketchflow</strong> Shane Morris, Microsoft</p>
<p>Don&#8217;t know what Sketchflow is? Then <a href="http://team.silverlight.net/announcements/sketchflow-rapid-prototyping-that-works/" title="Sketchflow Overview">read this!</a>. Okay, now tell me you dont want Shane, MS UX Evangelist, to run through it live!</p>
<p><strong>Expression Blend 3 &#8211; What&#8217;s new?</strong> &#8211; Mahesh Krishnan, Readify</p>
<p>Expression Blend 3 improves upon the goodness of Blend 2 SP 1 by providing a whole heap of new features and more importantly, the ability to create applications for Silverlight 3. The list of new enhancements is long &#8211; Lots of improvements to the way you use the tool, Improvements to how XAML, C# and VB.NET files are edited, Support for importing Adobe Photoshop and Illustrator files, Skinning enhancements, Enhancements for animation, Sample data generation, etc, etc. </p>
<p>Mahesh Krishnan will run through these changes in a fast demo based session (without using Powerpoint!) The session is targeted at both Designers and Developers, so don&#8217;t miss out <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>About the speaker: Mahesh Krishnan, works as Senior Consultant at Readify and blogs at <a>http://blogesh.wordpress.com</a>. He has previously presented at a number of user group meetings, codecamps and Tech.Ed</p>
<p>We meet @ the Microsoft Theatre, Level 5, 4 Freshwater Place, Southbank. Be there from 6!</p>
<p><strong>Use the registration tool on <a href="http://www.sddn.org.au" title="SDDN Site">the SDDN site</a>.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jakkaj.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jakkaj.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jakkaj.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jakkaj.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jakkaj.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jakkaj.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jakkaj.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jakkaj.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jakkaj.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jakkaj.wordpress.com/325/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=325&subd=jakkaj&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.webjak.net/2009/06/26/sddn-meeting-30-june-melbourne/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/310d76b78db597d9c9d0066df9654e51?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jordan</media:title>
		</media:content>
	</item>
		<item>
		<title>Nerd Dinner, Melbourne 9 April</title>
		<link>http://blog.webjak.net/2009/04/06/nerd-dinner-melbourne-9-april/</link>
		<comments>http://blog.webjak.net/2009/04/06/nerd-dinner-melbourne-9-april/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 09:25:27 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Nerd Dinner]]></category>

		<guid isPermaLink="false">http://blog.webjak.net/?p=261</guid>
		<description><![CDATA[This Thursday, 9th April we are having a nerd dinner in Melbourne at the Elephant and Wheelbarrow on Bourke Street &#8211; 6PM till late. I was talking with a few old friends about catching up, and it grew from there in to an open invite to all nerds Remember that Friday is a public holiday [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=261&subd=jakkaj&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This Thursday, 9th April we are having a nerd dinner in Melbourne at the Elephant and Wheelbarrow on Bourke Street &#8211; 6PM till late.</p>
<p>I was talking with a few old friends about catching up, and it grew from there in to an open invite to all nerds <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Remember that Friday is a public holiday so there are no excuses!</p>
<p>To register (so we can book) head over to <a href="http://www.nerddinner.com/253" title="nerddinner.com">NerdDinner.com</a>.</p>
<p>See you there!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jakkaj.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jakkaj.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jakkaj.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jakkaj.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jakkaj.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jakkaj.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jakkaj.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jakkaj.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jakkaj.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jakkaj.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=261&subd=jakkaj&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.webjak.net/2009/04/06/nerd-dinner-melbourne-9-april/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/310d76b78db597d9c9d0066df9654e51?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jordan</media:title>
		</media:content>
	</item>
		<item>
		<title>The SDDN brings you &#8220;Silverlight in a day!&#8221;</title>
		<link>http://blog.webjak.net/2009/01/27/the-sddn-brings-you-silverlight-in-a-day/</link>
		<comments>http://blog.webjak.net/2009/01/27/the-sddn-brings-you-silverlight-in-a-day/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 03:14:33 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.webjak.net/?p=176</guid>
		<description><![CDATA[Announcing &#8220;Silverlight in a day&#8221; &#8211; a full day of hands on Silverlight training brought to you by the SDDN &#8211; FREE! When: Saturday 21st February 2009 Cost: NOTHING! (lunch is provided) Where: Level 2, Cliftons, 440 Collins St, Melbourne Contact: info@sddn.org.au to reserve your spot! The SDDN has been a little quiet since its [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=176&subd=jakkaj&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Announcing &#8220;Silverlight in a day&#8221; &#8211; a full day of hands on Silverlight training brought to you by the SDDN &#8211; FREE!</p>
<p><strong>When:</strong> Saturday 21st February 2009<br />
<strong>Cost:</strong> NOTHING! (lunch is provided)<br />
<strong>Where:</strong> Level 2, Cliftons, 440 Collins St, Melbourne<br />
<strong>Contact:</strong> <a href="mailto:info@sddn.org.au" title="Contact SDDN">info@sddn.org.au</a> to reserve your spot!</p>
<p>The SDDN has been a little quiet since its first meeting in December &#8211; but there is a great reason! Mahesh, Phil and myself have been busy organising this fantastic event.</p>
<p>The SDDN invites you to come along and get your hands dirty with Silverlight 2! Learn how to build Silverlight Applications using Visual Studio and Expression Studio.</p>
<p>In this instructor led one day course the 40 attendees will be able to work their way through hands-on labs and gain invaluable insight into the technology and how they can use it to create Rich Internet Applications (RIA).</p>
<p>Gain an understanding of varied Silverlight topics such as XAML, animation, data binding, communication and more and get the start you need to create great Silverlight applications!</p>
<p>Get in fast as spaces are limited!</p>
<p><strong>Edit: </strong> The level of the training day is aimed at people who are new to Silverlight. The course is targeted at both designers and developers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jakkaj.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jakkaj.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jakkaj.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jakkaj.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jakkaj.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jakkaj.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jakkaj.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jakkaj.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jakkaj.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jakkaj.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=176&subd=jakkaj&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.webjak.net/2009/01/27/the-sddn-brings-you-silverlight-in-a-day/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/310d76b78db597d9c9d0066df9654e51?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jordan</media:title>
		</media:content>
	</item>
		<item>
		<title>Create a Snapshot of your data in Silverlight</title>
		<link>http://blog.webjak.net/2008/09/24/create-a-snapshot-of-your-data-in-silverlight/</link>
		<comments>http://blog.webjak.net/2008/09/24/create-a-snapshot-of-your-data-in-silverlight/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 08:31:15 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jakkaj.wordpress.com/?p=98</guid>
		<description><![CDATA[I&#8217;ve been working on some Silverlight projects with a designer and in a word &#8211; it&#8217;s been fantastic. Alex, my brother, and I have been learning Silverlight 2 together. It&#8217;s been a great way to figure out what works best in our little Silverlight team. Silverlight separates concerns between me, the developer and the designer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=98&subd=jakkaj&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some Silverlight projects with a designer and in a word &#8211; it&#8217;s been fantastic. <a title="AGK Design - Blog" href="http://agkdesign.wordpress.com">Alex</a>, my brother, and I have been learning Silverlight 2 together. It&#8217;s been a great way to figure out what works best in our little Silverlight<br />
team.</p>
<p>Silverlight separates concerns between me, the developer and the designer very well. I love being able to throw a design issue over to Alex to fix. He does a &#8220;get latest&#8221;, runs it up and fixes the issue/makes the app look _not_ crap.</p>
<p>This is all good, until the application gets a little more complex. I add WCF services, databases and other technical dependencies which require some level of set up. Alex is quite technical, but some of these things sit outside the scope of his professional experience. This leads to a problem where we sit on the phone for an hour trying to figure out why it&#8217;s not working. &#8220;Works on my machine&#8221; seal doesn&#8217;t apply here unfortunately.</p>
<p><strong>So what do you do?</strong></p>
<p>There are a range of ways to fix a problem like this. One way is to use dummy test data. Put the application in to &#8220;dummy&#8221; mode and load the data from another source rather than your WCF service etc.</p>
<p>This means that your designers can press F5 and have the application &#8220;just work&#8221; &#8211; a pretty ideal situation you have to admit. This solution is also great for sales demonstrations &#8211; keeping a sales person&#8217;s notebook up to date with the latest website version, WCF, database etc is a PITA <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I don&#8217;t know how many times I&#8217;ve been caught before a big demo fixing the demo notebook because it has some arcane issue that never seems to occur on any other notebook I&#8217;ve ever used.</p>
<p>The problem then becomes &#8211; how to you get _good_ dummy data? You really don&#8217;t want to be creating this by hand&#8230; Why not set your model classes up in a way that you can take a snapshot of them and re-load it in dummy mode?</p>
<p>This is actually pretty easy to achieve by using the DataContractSerializer class which is built in to Silverlight.</p>
<p>The process overview is:</p>
<ul>
<li> Design model classes in a way that supports DataContractSerialization</li>
<li> Apply DataContract attributes to the classes</li>
<li> Serialise the object graph to ISO storage</li>
<li> Find the file on the hard drive and copy in to Silverlight project</li>
<li> Add a setting to place the project in to &#8220;dummy&#8221; mode</li>
<li> Load the serialised object from the XAP (it will be compiled in)</li>
<li> Enjoy a problem free relationship with your designer <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<h2><span style="color:#ff0000;">&lt;Sample Code&gt;</span></h2>
<p><a href="http://www.webjak.net/Files/FileDetail.aspx?fileId=de9d9112-edf9-4a37-80e8-fa778dead577" title="Serialise your Silverlight Object Graph Example">Serialise your Silverlight Object Graph Example</a></p>
<h2><span style="color:#ff0000;">&lt;/Sample Code&gt;</span></h2>
<p><strong>Preparing for Serialisation</strong></p>
<p>There are a couple of simple rules when performing serialisation in Silverlight using DataContractSerializer.</p>
<ul>
<li>In partial trust (which Silverlight runs in) you can only serialise public fields</li>
<li>It&#8217;s easiest to serialise object graphs which do not have circular dependencies</li>
</ul>
<p>With these two rules in mind let&#8217;s smash together some code.</p>
<ul>
<li>Create a new Silverlight project</li>
<li>Create some simple demonstration model classes</li>
<li>Create Serialize and Deserialize methods</li>
<li>Manually populate with test data (normally this would be some real database data)</li>
<li>Serialize data, get file, copy to project and set up for deserialization</li>
</ul>
<p>When creating a serializable data model ensure you have one starting point. That is a main object which is the root of the object graph. Ensure that you have no circular dependencies.</p>
<ul>
<li>Create two simple classes called ModelMainClass and SomeOtherClass</li>
<li>Add a couple of simple properties to ModelMainClass</li>
<li>Add a couple of simple properties to SomeOtherClass</li>
<li>Add a reference to System.Runtime.Serialization</li>
<li>Decorate each class with [DataContract] attribute</li>
<li>Decorate the properties and member variables in each class you want to serialise with the [DataMember] attribute</li>
<li>Add a List property to ModelMainClass to hold references to instances of SomeOtherClass. Ensure it is also marked with the DataMemberAttribute</li>
</ul>
<pre class="brush: csharp;">

[DataContract]
public class ModelMainClass
{
	[DataMember]
	public string SomeProperty
	{
		get;
		set;
	}

	[DataMember]
	public long SomeValue
	{
		get;
		set;
	}
	[DataMember]
	public List&lt;SomeOtherClass&gt; SomeOtherClassInstances
	{
		get;
		set;
	}
}

[DataContract]
public class SomeOtherClass
{
	[DataMember]
	public string SomeOtherClassValue
	{
		get;
		set;
	}
}
</pre>
<p><strong>Get the data in to isolated storage</strong></p>
<p>Next up we need to create the serialisation and deserialisation class.</p>
<p>Create a new file called Persistence.cs</p>
<p>This file will have the following functionality</p>
<ul>
<li>
		A method to serialise to a byte array
	</li>
<li>
		A method to deserialise from a byte array
	</li>
<li>
		A method to write a byte array to isolated storage
	</li>
<li>
		For posterity a method to read a byte array from isolated storage
	</li>
<li>
		A method to read a byte array from the XAP file
	</li>
</ul>
<pre class="brush: csharp;">
const string PERSISTFILENAME = &quot;persist.dat&quot;;

static List&lt;Type&gt; knownTypes = null;

public static void ISOSave(ModelMainClass mmc)
{
	try
	{
		MemoryStream ms = new MemoryStream();

		DataContractSerializer ser = new DataContractSerializer(mmc.GetType(), getKnownTypes());

		ser.WriteObject(ms, mmc);

		byte[] data = ms.ToArray();
		commit(data);
	}
	catch (Exception ex)
	{
		Console.WriteLine(&quot;Argh&quot;);
	}
}

static void commit(byte[] data)
{
	using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
	{
		IsolatedStorageFileStream isfs = new IsolatedStorageFileStream(PERSISTFILENAME, FileMode.Create, isf);

		isfs.Write(data, 0, data.Length);

		isfs.Close();
	}
}

static byte[] load(bool dummyData)
{
	if (dummyData)
	{
		StreamResourceInfo s = Application.GetResourceStream(new Uri(&quot;MockData/persisted.dat&quot;, UriKind.Relative));

		byte[] result = new byte[s.Stream.Length];
		s.Stream.Read(result, 0, result.Length);
		s.Stream.Close();
		return result;
	}
	else
	{
		using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
		{
			if (isf.FileExists(PERSISTFILENAME))
			{
				IsolatedStorageFileStream isfs = new IsolatedStorageFileStream(PERSISTFILENAME, FileMode.Open, isf);

				byte[] result = new byte[isfs.Length];
				isfs.Read(result, 0, Convert.ToInt32(isfs.Length));
				isfs.Close();
				return result;
			}
			else
			{
				return null;
			}
		}
	}
}

public static ModelMainClass ISOLoad(bool dummyData)
{
	byte[] data = load(dummyData);

	if (data == null)
	{
		return new ModelMainClass();
	}
	else
	{
		DataContractSerializer ser = new DataContractSerializer(typeof(ModelMainClass), getKnownTypes());
		MemoryStream ms = new MemoryStream(data);

		ModelMainClass mmc = ser.ReadObject(ms) as ModelMainClass;
		return mmc;
	}

}

private static List&lt;Type&gt; getKnownTypes()
{
	if (knownTypes == null)
	{
		knownTypes = new List&lt;Type&gt;();
		knownTypes.Add(typeof(SomeOtherClass));
		knownTypes.Add(typeof(ModelMainClass));
	}
	return knownTypes;

}
</pre>
<p>Note here the Load method has the ability to load data from isolated storage and from the dummy data in the XAP. This is for posterity and completeness <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Generate some test data</strong></p>
<p>In Page.xaml create a button to create and save the test data. In the button&#8217;s Click even drop in the following code:</p>
<pre class="brush: csharp;">

ModelMainClass mmc = new ModelMainClass();

mmc.SomeProperty = string.Format(&quot;This is a test {0}&quot;, DateTime.Now.ToString());
mmc.SomeValue = DateTime.Now.Ticks;

List&lt;SomeOtherClass&gt; list = new List&lt;SomeOtherClass&gt;();

for (int i = 0; i &lt; 100; i++)
{
	list.Add(new SomeOtherClass() { SomeOtherClassValue = i.ToString() });
}

mmc.SomeOtherClassInstances = list;

Persistence.ISOSave(mmc);
</pre>
<p>Pretend this code is getting some stuff from your WCF service etc. Serialise your completed object graph here.</p>
<p>Note the call to Persistence.ISOSave which is our new method&#8230;</p>
<p><strong>Find the data in isolated storage</strong></p>
<p>Silverlight keeps its isolated storage underneath the user&#8217;s data folder.</p>
<p>On Vista look under here: <strong>C:\Users\&lt;user&gt;\AppData\LocalLow\Microsoft\Silverlight\is</strong><br />
On XP look under here: <strong>C:\Documents and Settings\&lt;user&gt;\Local Settings\Application Data\Microsoft\Silverlight\is</strong></p>
<p>You will need to have a bit of a hunt around in these folders to find what you are looking for (search doesn&#8217;t seem to work). For example on my machine the file was located here:</p>
<p><strong>C:\Users\jordank\AppData\LocalLow\Microsoft\Silverlight\is\tuigc5pi.rqh\xhfonuik.kdv\1\s\rqotqem0g1s0rro4dxwbnvcvci50t01b4knyscivinuy3ejenraaaeda\f.</strong></p>
<p>Nice.</p>
<p>Copy this file in to your Silverlight project, and set it&#8217;s Build Action to &#8220;Content&#8221;. Setting this to content allows the Persistence class to read the data using the following code:</p>
<pre class="brush: csharp;">
StreamResourceInfo s = Application.GetResourceStream(new Uri(&quot;MockData/persisted.dat&quot;, UriKind.Relative));
</pre>
<p><strong>Finishing off</strong></p>
<p>Back in Page.xaml, create another button to load the data, and a TextBlock to proove the load worked. In the click event for the button drop the following code:</p>
<pre class="brush: csharp;">
ModelMainClass mmc = Persistence.ISOLoad(true);
foreach (SomeOtherClass soc in mmc.SomeOtherClassInstances)
{
	SomeOutput.Text += soc.SomeOtherClassValue;
}
</pre>
<p>Too easy! You just loaded your snapshot from the XAP file! </p>
<p>You can see how easy it would be to build complex dummy data object graphs and distribute them with your application.</p>
<p>And everyone lives happily ever after </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jakkaj.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jakkaj.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jakkaj.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jakkaj.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jakkaj.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jakkaj.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jakkaj.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jakkaj.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jakkaj.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jakkaj.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.webjak.net&blog=1986956&post=98&subd=jakkaj&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.webjak.net/2008/09/24/create-a-snapshot-of-your-data-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/310d76b78db597d9c9d0066df9654e51?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jordan</media:title>
		</media:content>
	</item>
	</channel>
</rss>