<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Sergey Barskiy's Blog</title>
	
	<link>http://dotnetspeak.com</link>
	<description>All things .NET</description>
	<lastBuildDate>Thu, 11 Mar 2010 01:39:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DotNetSpeak" /><feedburner:info uri="dotnetspeak" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/DotNetSpeak" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FDotNetSpeak" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Extending Interfaces with Implementation</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/KtXivzv3C2s/</link>
		<comments>http://dotnetspeak.com/index.php/2010/03/extending-interfaces-with-implementation/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 01:39:52 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/03/extending-interfaces-with-implementation/</guid>
		<description><![CDATA[Today I was faced with an issue.&#160; I had an interface based implementation of a specific functionality.&#160; All classes that implemented this interface had different implementation of course.&#160; What I had to add is ability to run certain checks on each implementation that would need to analyze the data defined in the interface and return [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was faced with an issue.&#160; I had an interface based implementation of a specific functionality.&#160; All classes that implemented this interface had different implementation of course.&#160; What I had to add is ability to run certain checks on each implementation that would need to analyze the data defined in the interface and return a Boolean result of this check.</p>
<p>The problem was that the checks were all the same and I hated to add this check to the interface and write identical code in all implementations.&#160; As everyone knows interfaces cannot contain implementation code though.&#160; So, what should I do?</p>
<p>So, a particular .NET 3.5 feature came to my rescue.&#160; I am referring to extension methods.&#160; As you may or may not know extension methods are tied to a type.&#160; Well, interface is a type too.&#160; Here is some code to look at.</p>
<p>Here is the interface definition:</p>
<div style="font-family: courier new; background: white; color: black; font-size: 10pt">
<div style="font-family: courier new; background: white; color: black; font-size: 10pt">
<p style="margin: 0px">&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: blue">interface</span> <span style="color: #2b91af">ISupportCustomAction</span></p>
<p style="margin: 0px">&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #2b91af">Action</span> CustomAction { <span style="color: blue">get</span>; <span style="color: blue">set</span>; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">void</span> Execute();</p>
<p style="margin: 0px">&#160;&#160;&#160; }</p>
</p></div>
</p></div>
<p>Here is my class definition that implements this interface</p>
<div style="font-family: courier new; background: white; color: black; font-size: 10pt">
<p style="margin: 0px">&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: #2b91af">CustomActionOne</span> : <span style="color: #2b91af">ISupportCustomAction</span></p>
<p style="margin: 0px">&#160;&#160;&#160; {</p>
<p style="margin: 0px"><span style="color: blue">&#160;&#160;&#160;&#160;&#160;&#160;&#160; #region</span> ISupportCustomAction Members</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">private</span> <span style="color: #2b91af">Action</span> action;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: #2b91af">Action</span> CustomAction</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">get</span></p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">return</span> action;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">set</span></p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; action = <span style="color: blue">value</span>;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: blue">void</span> Execute()</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: green">// fill in the method</span></p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;</p>
<p style="margin: 0px">&#160;</p>
<p style="margin: 0px"><span style="color: blue">&#160;&#160;&#160;&#160;&#160;&#160;&#160; #endregion</span></p>
<p style="margin: 0px">&#160;&#160;&#160; }</p>
</p></div>
<p>Finally, here is my extension method</p>
<p style="margin: 0px">&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">class</span> <span style="color: #2b91af">ISupportCustomActionExtensions</span></p>
<p style="margin: 0px">&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">bool</span> Check(<span style="color: blue">this</span> <span style="color: #2b91af">ISupportCustomAction</span> action)</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">if</span> (action.CustomAction == <span style="color: blue">null</span>)</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">return</span> <span style="color: blue">false</span>;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">else</span></p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">return</span> <span style="color: blue">true</span>;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160; }</p>
<p>Here is my test code to confirm that everything works</p>
<div style="font-family: courier new; background: white; color: black; font-size: 10pt">
<p style="margin: 0px">&#160;&#160;&#160; <span style="color: blue">class</span> <span style="color: #2b91af">Program</span></p>
<p style="margin: 0px">&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">static</span> <span style="color: blue">void</span> Main(<span style="color: blue">string</span>[] args)</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #2b91af">CustomActionOne</span> action = <span style="color: blue">new</span> <span style="color: #2b91af">CustomActionOne</span>();</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; action.CustomAction = () =&gt; { <span style="color: #2b91af">Debug</span>.WriteLine(<span style="color: #a31515">&quot;Exectuted Action.&quot;</span>); };</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Analize(action);</p>
<p style="margin: 0px">&#160;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; action = <span style="color: blue">new</span> <span style="color: #2b91af">CustomActionOne</span>();</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Analize(action);</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #2b91af">Console</span>.ReadKey();</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">private</span> <span style="color: blue">static</span> <span style="color: blue">void</span> Analize(<span style="color: #2b91af">ISupportCustomAction</span> action)</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">if</span> (action.Check())</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">&quot;Can execute action&quot;</span>);</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: blue">else</span></p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">&quot;Cannot execute action&quot;</span>);</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p style="margin: 0px">&#160;&#160;&#160; }</p>
</p></div>
<p>How useful this is?&#160; Pretty useful in my case.&#160; Saved me some typing and resulted in consistent coding.&#160; My point is that is good to know what features .NET has and use them as a need arises.&#160; As you can see I have a hybrid here of a base (abstract) class and an interface.&#160; As a result, I am able to use features that belong to both concepts.</p>
<p>&#160;</p>
<p>Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/03/extending-interfaces-with-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/03/extending-interfaces-with-implementation/</feedburner:origLink></item>
		<item>
		<title>Community Events</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/nwIqbTJYw44/</link>
		<comments>http://dotnetspeak.com/index.php/2010/02/community-events/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 23:54:37 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/02/community-events/</guid>
		<description><![CDATA[I often forget about different conferences I would like to keep an eye on, so I decided to make a list of them on my blog.

VS Live
MIX
DevLink
CodeStock
Atlanta Code Camp
Alabama Code Camp
South Florida Code Camp
Orlando Code Camp
SQL Saturday

]]></description>
			<content:encoded><![CDATA[<p>I often forget about different conferences I would like to keep an eye on, so I decided to make a list of them on my blog.</p>
<ul>
<li><a href="http://vslive.com/" target="_blank">VS Live</a></li>
<li><a href="http://visitmix.com/events/" target="_blank">MIX</a></li>
<li><a href="http://www.devlink.net/" target="_blank">DevLink</a></li>
<li><a href="http://www.codestock.org/" target="_blank">CodeStock</a></li>
<li><a href="http://atlantacodecamp.com/" target="_blank">Atlanta Code Camp</a></li>
<li><a href="http://alabamacodecamp.com/" target="_blank">Alabama Code Camp</a></li>
<li><a href="http://www.fladotnet.com/codecamp/" target="_blank">South Florida Code Camp</a></li>
<li><a href="http://orlandocodecamp.com/" target="_blank">Orlando Code Camp</a></li>
<li><a href="http://orlandocodecamp.com/" target="_blank">SQL Saturday</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/02/community-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/02/community-events/</feedburner:origLink></item>
		<item>
		<title>Silverlight 4 + COM + SQL Server = Cool!</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/po-hWleN1FU/</link>
		<comments>http://dotnetspeak.com/index.php/2010/02/silverlight-4-com-sql-server-cool/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 22:53:27 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/02/silverlight-4-com-sql-server-cool/</guid>
		<description><![CDATA[Today is the day to talk about COM possibilities in Silverlight 4.&#160; One would question the titles of my post.&#160; COM and Cool in the same sentence?&#160; Let me proof this title to you.
First, let me take a closer look at COM.&#160; In order to access COM, you must install Silverlight application on a local [...]]]></description>
			<content:encoded><![CDATA[<p>Today is the day to talk about COM possibilities in Silverlight 4.&#160; One would question the titles of my post.&#160; COM and Cool in the same sentence?&#160; Let me proof this title to you.</p>
<p>First, let me take a closer look at COM.&#160; In order to access COM, you must install Silverlight application on a local machine.&#160; The access to COM is not enabled when a Silverlight application is run in the browser.&#160; So, first of all you have to enable this by checking “Enable running application out of browser” checkbox in project properties.&#160; Second of all, you have to check “Require elevated trust…” checkbox in “Out-of-browser settings” area in project properties.&#160; Now, you are ready to install you application and test COM support.&#160; How about Word automation:</p>
<pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">Microsoft.Office.Interop.Word.Application word = <span style="color: #0000ff">new</span> Microsoft.Office.Interop.Word.Application();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">var doc = word.Documents.Add();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">var paragraph = doc.Paragraphs.Add();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">paragraph.Range.Text = &quot;<span style="color: #8b0000">Some text</span>&quot;;</pre>
</pre>
<p>Now, let’s talk about database access.&#160; Parts of System.Data.SqlClient namespace are not exposed to COM by default.&#160; So, to enable database access we must write an assembly that is exposed to COM that wraps database access.&#160; To do so, check the property “Register for COM Interop” in project properties for the .NET (NOT Silverlight) based project that will fire off database queries for us.&#160; Once the assembly is built, I can just use RegAsm to register my DLL with COM on a machine.&#160; Of course, this would be a prerequisite to use Silverlight application for local data access.&#160; The other prerequisite is to have .NET Runtime installed on that machine as well.&#160; I could write an install project of course to make this process easier.</p>
<p>The next step is to write a Silverlight assembly that would use COM Interop similar to the one above for Word to talk to my database access .NET based assembly.</p>
<pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 12px">dynamic sqlDB = ComAutomationFactory.CreateObject(&quot;<span style="color: #8b0000">COMSQLClient.COMSqlDatabase</span>&quot;);</pre>
</pre>
<p>Now the most exciting part.&#160; I created and published the project on CodePlex that does exactly what I just talked about.&#160; Check out the project and let me know what you think.&#160; You can download the source code and look into the implementation details.&#160; Here is the link to it:</p>
<p><a title="http://silverlight4sqllib.codeplex.com/" href="http://silverlight4sqllib.codeplex.com/">http://silverlight4sqllib.codeplex.com/</a></p>
<p>Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/02/silverlight-4-com-sql-server-cool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/02/silverlight-4-com-sql-server-cool/</feedburner:origLink></item>
		<item>
		<title>The MSDN Southern Fried Roadshow</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/UivWIUveru4/</link>
		<comments>http://dotnetspeak.com/index.php/2010/02/the-msdn-southern-fried-roadshow/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 01:32:39 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/02/the-msdn-southern-fried-roadshow/</guid>
		<description><![CDATA[Glen Gordon, our local evangelist is doing another road show.&#160; Here are the event details.
Thursday, February 25, 2010 1:00 PM &#8211; Thursday, February 25, 2010 5:00 PM Eastern Time (US &#38; Canada)   Welcome Time: 12:30 PM
Atlanta Marriot Alpharetta 
5750 Windward Pkwy   Alpharetta Georgia 30005    United States
Language(s):   [...]]]></description>
			<content:encoded><![CDATA[<p>Glen Gordon, our local evangelist is doing another road show.&#160; Here are the event details.</p>
<p>Thursday, February 25, 2010 1:00 PM &#8211; Thursday, February 25, 2010 5:00 PM Eastern Time (US &amp; Canada)   <br />Welcome Time: 12:30 PM</p>
<p>Atlanta Marriot Alpharetta </p>
<p>5750 Windward Pkwy   <br />Alpharetta Georgia 30005    <br />United States</p>
<p><strong>Language(s):</strong>    <br />English.</p>
<p><strong>Product(s):</strong>    <br />Azure Services Platform, Microsoft technologies, Windows and Windows 7.</p>
<p><strong>Audience(s):</strong>    <br />Pro Dev/Programmer.</p>
<p><strong>Presenter(s):</strong>    <br />Glen Gordon, Joe Healy</p>
<p><b>Event Overview</b></p>
<p><b>MSDN Events presents: Take Your Applications Sky High with Cloud Computing and the Windows Azure Platform</b></p>
<p><b></b></p>
<p>Join your local MSDN Events team as we take a deep dive into cloud computing and the Windows Azure Platform. We’ll start with a developer-focused overview of this new platform and the cloud computing services that can be used either together or independently to build highly scalable applications. As the day unfolds, we’ll explore data storage, SQL Azure, and the basics of deployment with Windows Azure. Register today for these free, live sessions in your local area. </p>
<p><i>If you register and attend this event, you will be placed in a raffle to win a chance to bring home one (1) free copy of <b>Windows 7 </b>– you could be the lucky winner! Register today!</i></p>
<p><b>SESSION 1: Overview of Cloud Computing and Windows Azure</b></p>
<p><b></b></p>
<p>The Windows Azure platform is a set of high-performance cloud computing services that can be used together or independently and enable developers to leverage existing skills and familiar tools to develop cloud applications. In this session, we’ll provide a developer-focused overview of this new online service computing platform. We’ll explore the components, key features and real day-to-day benefits of Windows Azure.</p>
<p>Highlights include:</p>
<p>· What is cloud computing?</p>
<p>· Running web and web service applications in the cloud</p>
<p>· Using the Windows Azure and local developer cloud fabric</p>
<p>· Getting started – tools, SDKs and accounts</p>
<p>· Writing applications for Windows Azure</p>
<p><b>SESSION 2: Survey of Windows Azure Platform Storage Options</b></p>
<p><b></b></p>
<p>Durable data storage is a key component of any cloud computing offering. The Windows Azure Platform offers many options, which can be used alone or in combination. Windows Azure itself offers ready-to-use and lightweight storage in the form of tables, blobs, and queues. Another choice for storage is SQL Azure, a true relational database in the cloud. In this session, we’ll explore the highlights of these implementations and how to both create and use storage in each form. We’ll give you guidance on choosing the right forms of storage for your application scenarios. </p>
<p>Highlights include:</p>
<p>· Understanding table &amp; blob storage</p>
<p>· Programming against table &amp; blob storage</p>
<p>· Working with queue storage</p>
<p>· Managing credentials and connection strings</p>
<p>· Scaling and configuration</p>
<p>· Understanding SQL Azure databases versus local SQL Server databases</p>
<p>· SQL Azure firewall, logins and passwords</p>
<p>· Database creation, deployments and migrations</p>
<p>· Database management using SQL Management Studio</p>
<p>· Programming against SQL Azure databases</p>
<p><b>SESSION 3: Going Live with your Azure Solution</b></p>
<p>Windows Azure features a powerful, yet simple deployment model. By focusing on your application and abstracting away the infrastructure details, you can deploy almost any app with minimal fuss. In this session, we’ll walk you through the basics of Windows Azure deployment, including site monitoring, diagnostics and performance issues. </p>
<p>Highlights include:</p>
<p>· Start-to-Finish Visual Studio demonstration of a realistic XML data driven business web site from the desktop to the cloud.</p>
<p>· Windows Azure Deployments</p>
<p>· Start-to-Finish Visual Studio demonstration of a realistic SQL Server data driven business web site from the desktop to the cloud.</p>
<p>· Configuration of your application in the cloud</p>
<p>· Guidance and Suggestions to ensure your success</p>
<p>*Be sure to learn more about the TechNet event happening on the same day at the same location from 8:30am–12:00pm. If you are interested in attending, please register separately for that event here: <a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032439495&amp;Culture=en-US">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032439495&amp;Culture=en-US</a></p>
<p><b>Registration Options</b></p>
<p><b>Event ID: </b>    <br />1032439974</p>
<p>Here is the link to this event:</p>
<p><a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032439974&amp;Culture=en-US" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032439974&amp;Culture=en-US">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032439974&amp;Culture=en-US</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/02/the-msdn-southern-fried-roadshow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/02/the-msdn-southern-fried-roadshow/</feedburner:origLink></item>
		<item>
		<title>Entity Framework 4.0 and Multiple Data Contexts</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/yHaavGxaZMI/</link>
		<comments>http://dotnetspeak.com/index.php/2010/02/entity-framework-4-0-and-multiple-data-contexts/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 23:50:22 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/02/entity-framework-4-0-and-multiple-data-contexts/</guid>
		<description><![CDATA[In the EF version 1.0, there was a problem when one would try to update multiple contexts as part of a single transaction.&#160; For example, I can use Transaction Scope, the update one context, then second context.&#160; Here is sample code to illustrate:
&#160;
using (TransactionScope scope = new TransactionScope())
{
    try
    [...]]]></description>
			<content:encoded><![CDATA[<p>In the EF version 1.0, there was a problem when one would try to update multiple contexts as part of a single transaction.&#160; For example, I can use Transaction Scope, the update one context, then second context.&#160; Here is sample code to illustrate:</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">using </span>(<span style="color: #2b91af">TransactionScope </span>scope = <span style="color: blue">new </span><span style="color: #2b91af">TransactionScope</span>())
{
    <span style="color: blue">try
    </span>{
        <span style="color: blue">using </span>(<span style="color: #2b91af">RolodexEntities </span>context = <span style="color: blue">new </span><span style="color: #2b91af">RolodexEntities</span>())
        {
            context.Connection.Open();

            <span style="color: #2b91af">Company </span>company = <span style="color: blue">new </span><span style="color: #2b91af">Company</span>();
            company.CompanyName = <span style="color: #a31515">&quot;Test 1&quot;</span>;
            company.DateAdded = <span style="color: #2b91af">DateTime</span>.Today;
            context.AddToCompanies(company);
            context.SaveChanges();

            <span style="color: blue">using </span>(<span style="color: #2b91af">RolodexEntities </span>context2 = <span style="color: blue">new </span><span style="color: #2b91af">RolodexEntities</span>(context.Connection <span style="color: blue">as </span><span style="color: #2b91af">EntityConnection</span>))
            {
                <span style="color: #2b91af">Company </span>company2 = <span style="color: blue">new </span><span style="color: #2b91af">Company</span>();
                company2.CompanyName = <span style="color: #a31515">&quot;Test 1&quot;</span>;
                company2.DateAdded = <span style="color: #2b91af">DateTime</span>.Today;
                context2.AddToCompanies(company2);
                context2.SaveChanges();
            }
        }

        scope.Complete();
    }
    <span style="color: blue">catch </span>(<span style="color: #2b91af">Exception </span>ex)
    {
        <span style="color: #2b91af">MessageBox</span>.Show(ex.Message);
    }
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>This code in version 1.0 would throw an exception when second context’s constructor was called.&#160; The exception was quite obscure and was referring to the fact that the connection was already open.&#160; This was actually correct, but that was the whole reason I was passing in the connection.&#160; I was trying to make sure that my transaction would not get promoted to Distributed Transactions Coordinator.&#160; The transaction would always get promoted as soon as there are multiple SQL Server connections used within using scope/.end using scope code block.&#160; So, in version 1.0 MSDTC would be required in the code above.</p>
<p>This issue still exists in EF 4.0.&#160; You can vote to fix the issue here : <a title="https://connect.microsoft.com/data/feedback/details/533240/cannot-share-a-store-connection-between-multiple-contexts-in-order-to-avoid-dtc-promotion" href="https://connect.microsoft.com/data/feedback/details/533240/cannot-share-a-store-connection-between-multiple-contexts-in-order-to-avoid-dtc-promotion">https://connect.microsoft.com/data/feedback/details/533240/cannot-share-a-store-connection-between-multiple-contexts-in-order-to-avoid-dtc-promotion</a></p>
<p>Here is the code that confirms the problem:</p>
<pre class="code"><span style="color: blue">using </span>(<span style="color: #2b91af">TransactionScope </span>scope = <span style="color: blue">new </span><span style="color: #2b91af">TransactionScope</span>())
{
    <span style="color: blue">try
    </span>{
        <span style="color: blue">using </span>(<span style="color: #2b91af">RolodexEntities </span>context = <span style="color: blue">new </span><span style="color: #2b91af">RolodexEntities</span>())
        {
            context.Connection.Open();

            <span style="color: #2b91af">Company </span>company = <span style="color: blue">new </span><span style="color: #2b91af">Company</span>();
            company.CompanyName = <span style="color: #a31515">&quot;Test 11&quot;</span>;
            company.DateAdded = <span style="color: #2b91af">DateTime</span>.Today;
            context.AddToCompanies(company);
            context.SaveChanges();

            <span style="color: #2b91af">RolodexEntities1 </span>contextTemp = <span style="color: blue">new </span><span style="color: #2b91af">RolodexEntities1</span>();
            <span style="color: #2b91af">MetadataWorkspace </span>space = (contextTemp.Connection <span style="color: blue">as </span><span style="color: #2b91af">EntityConnection</span>).GetMetadataWorkspace();
            <span style="color: #2b91af">EntityConnection </span>connection = <span style="color: blue">new </span><span style="color: #2b91af">EntityConnection</span>(space, (context.Connection <span style="color: blue">as </span><span style="color: #2b91af">EntityConnection</span>).StoreConnection);

            <span style="color: blue">using </span>(<span style="color: #2b91af">RolodexEntities1 </span>context2 = <span style="color: blue">new </span><span style="color: #2b91af">RolodexEntities1</span>(connection))
            {
                <span style="color: #2b91af">User </span>user = <span style="color: blue">new </span><span style="color: #2b91af">User</span>();
                user.UserName = <span style="color: #a31515">&quot;test&quot;</span>;
                user.Role = <span style="color: #a31515">&quot;User&quot;</span>;
                context2.AddToUsers(user);
                context2.SaveChanges();
            }
        }

        scope.Complete();
    }
    <span style="color: blue">catch </span>(<span style="color: #2b91af">Exception </span>ex)
    {
        <span style="color: #2b91af">MessageBox</span>.Show(ex.Message);
    }
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Please feel free to ask any questions on this subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/02/entity-framework-4-0-and-multiple-data-contexts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/02/entity-framework-4-0-and-multiple-data-contexts/</feedburner:origLink></item>
		<item>
		<title>Silverlight, MVVM and Animations</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/CKxmuZLJUdA/</link>
		<comments>http://dotnetspeak.com/index.php/2010/02/silverlight-mvvm-and-animations/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 02:54:57 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/02/silverlight-mvvm-and-animations/</guid>
		<description><![CDATA[Yesterday I was asked about a way to play animations in MVVM environment.
So, I gave this some thought today, and came up with a few ideas.
First, and the easiest way is to separate ViewModel from animation by attaching an animation to a behavior.&#160; Here is how we would write the behavior:
public class MVVMSimpleAnimationBehavior : TargetedTriggerAction&#60;UIElement&#62;

 [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was asked about a way to play animations in MVVM environment.</p>
<p>So, I gave this some thought today, and came up with a few ideas.</p>
<p>First, and the easiest way is to separate ViewModel from animation by attaching an animation to a behavior.&#160; Here is how we would write the behavior:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">class</span> <span style="color: #2b91af">MVVMSimpleAnimationBehavior</span> : <span style="color: #2b91af">TargetedTriggerAction</span>&lt;<span style="color: #2b91af">UIElement</span>&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">protected</span> <span style="color: blue">override</span> <span style="color: blue">void</span> Invoke(<span style="color: blue">object</span> parameter)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>RunAnimation();
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: #2b91af">Storyboard</span> AnimationStoryBoard
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">get</span> { <span style="color: blue">return</span> (<span style="color: #2b91af">Storyboard</span>)GetValue(AnimationStoryBoardProperty); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">set</span> { SetValue(AnimationStoryBoardProperty, <span style="color: blue">value</span>); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">readonly</span> <span style="color: #2b91af">DependencyProperty</span> AnimationStoryBoardProperty =
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">DependencyProperty</span>.Register(<span style="color: #a31515">&quot;AnimationStoryBoard&quot;</span>, <span style="color: blue">typeof</span>(<span style="color: #2b91af">Storyboard</span>), <span style="color: blue">typeof</span>(<span style="color: #2b91af">MVVMSimpleAnimationBehavior</span>), <span style="color: blue">new</span> <span style="color: #2b91af">PropertyMetadata</span>(<span style="color: blue">null</span>));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">private</span> <span style="color: blue">void</span> RunAnimation()
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (AnimationStoryBoard != <span style="color: blue">null</span>)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>AnimationStoryBoard.Begin();
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p>&#160;</p>
<p>Pretty simple approach.&#160; Here is how would use animation in the XAML:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Button</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Content</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Behavior Test&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;1&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Interaction.Triggers</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EventTrigger</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> EventName</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Click&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">local</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">MVVMAnimationBehavior</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> AnimationStoryBoard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">StaticResource</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TestStoryboard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EventTrigger</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Interaction.Triggers</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Button</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;</span></p>
<p>Now, I want to complicate the story a little bit.&#160; I really want to trigger an animation in the UI via an event in my model.&#160; I am going to start with a sample ViewModel.&#160; I want to have an event there that I will later use as a trigger for my animation.&#160; Here is what my ViewModel would look like:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">class</span> <span style="color: #2b91af">SampleModel</span>: <span style="color: #2b91af">INotifyPropertyChanged
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">event</span> <span style="color: #2b91af">EventHandler</span> StartAnimation;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">protected</span> <span style="color: blue">virtual</span> <span style="color: blue">void</span> OnStartAnimation()
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (StartAnimation != <span style="color: blue">null</span>)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>StartAnimation(<span style="color: blue">this</span>, <span style="color: #2b91af">EventArgs</span>.Empty);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">void</span> RaiseEvent()
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>OnStartAnimation();
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>#region</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> INotifyPropertyChanged Members
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">event</span> <span style="color: #2b91af">PropertyChangedEventHandler</span> PropertyChanged;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">protected</span> <span style="color: blue">virtual</span> <span style="color: blue">void</span> OnPropertyChanged(<span style="color: blue">string</span> propertyName)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (PropertyChanged != <span style="color: blue">null</span>)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>PropertyChanged(<span style="color: blue">this</span>, <span style="color: blue">new</span> <span style="color: #2b91af">PropertyChangedEventArgs</span>(propertyName));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>#endregion
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p>My event is called StartAnimation.&#160; Now it is time to develop a more complicate behavior to support my event driven animation from ViewModel.&#160; I am going to actually combine new functionality with the simple behavior about and have multi-functional useful object.&#160; Here is what the final product looks like:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System.Windows.Interactivity;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System.Windows;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System.Windows.Media.Animation;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System.ComponentModel;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">using</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> System.Reflection;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">namespace</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> SLMVVMAnimationBehavior
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">class</span> <span style="color: #2b91af">MVVMAnimationBehavior</span> : <span style="color: #2b91af">TargetedTriggerAction</span>&lt;<span style="color: #2b91af">UIElement</span>&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">private</span> <span style="color: #2b91af">EventInfo</span> info;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">protected</span> <span style="color: blue">override</span> <span style="color: blue">void</span> Invoke(<span style="color: blue">object</span> parameter)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>RunAnimation(<span style="color: blue">this</span>, <span style="color: #2b91af">EventArgs</span>.Empty);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: #2b91af">Storyboard</span> AnimationStoryBoard
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">get</span> { <span style="color: blue">return</span> (<span style="color: #2b91af">Storyboard</span>)GetValue(AnimationStoryBoardProperty); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">set</span> { SetValue(AnimationStoryBoardProperty, <span style="color: blue">value</span>); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">readonly</span> <span style="color: #2b91af">DependencyProperty</span> AnimationStoryBoardProperty =
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">DependencyProperty</span>.Register(<span style="color: #a31515">&quot;AnimationStoryBoard&quot;</span>, <span style="color: blue">typeof</span>(<span style="color: #2b91af">Storyboard</span>), <span style="color: blue">typeof</span>(<span style="color: #2b91af">MVVMAnimationBehavior</span>), <span style="color: blue">new</span> <span style="color: #2b91af">PropertyMetadata</span>(<span style="color: blue">null</span>));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">string</span> EventName
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">get</span> { <span style="color: blue">return</span> (<span style="color: blue">string</span>)GetValue(EventNameProperty); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">set</span> { SetValue(EventNameProperty, <span style="color: blue">value</span>); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">readonly</span> <span style="color: #2b91af">DependencyProperty</span> EventNameProperty =
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">DependencyProperty</span>.Register(<span style="color: #a31515">&quot;EventName&quot;</span>, <span style="color: blue">typeof</span>(<span style="color: blue">string</span>), <span style="color: blue">typeof</span>(<span style="color: #2b91af">MVVMAnimationBehavior</span>), <span style="color: blue">new</span> <span style="color: #2b91af">PropertyMetadata</span>(HandlModelChanged));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">object</span> Model
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">get</span> { <span style="color: blue">return</span> GetValue(ModelProperty); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">set</span> { SetValue(ModelProperty, <span style="color: blue">value</span>); }
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: blue">readonly</span> <span style="color: #2b91af">DependencyProperty</span> ModelProperty =
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">DependencyProperty</span>.Register(<span style="color: #a31515">&quot;Model&quot;</span>, <span style="color: blue">typeof</span>(<span style="color: blue">object</span>), <span style="color: blue">typeof</span>(<span style="color: #2b91af">MVVMAnimationBehavior</span>), <span style="color: blue">new</span> <span style="color: #2b91af">PropertyMetadata</span>(HandlModelChanged));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">private</span> <span style="color: blue">static</span> <span style="color: blue">void</span> HandlModelChanged(<span style="color: blue">object</span> sender, <span style="color: #2b91af">DependencyPropertyChangedEventArgs</span> e)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">MVVMAnimationBehavior</span> behavior = sender <span style="color: blue">as</span> <span style="color: #2b91af">MVVMAnimationBehavior</span>;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">object</span> model = behavior.Model;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (behavior.info != <span style="color: blue">null</span>)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>behavior.info.RemoveEventHandler(model, <span style="color: #2b91af">Delegate</span>.CreateDelegate(<span style="color: blue">typeof</span>(<span style="color: #2b91af">EventHandler</span>), behavior, <span style="color: #a31515">&quot;RunAnimation&quot;</span>));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (model != <span style="color: blue">null</span> &amp;&amp; !<span style="color: blue">string</span>.IsNullOrEmpty(behavior.EventName))
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>behavior.info = model.GetType().GetEvent(behavior.EventName);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>behavior.info.AddEventHandler(model, <span style="color: #2b91af">Delegate</span>.CreateDelegate(<span style="color: blue">typeof</span>(<span style="color: #2b91af">EventHandler</span>), behavior, <span style="color: #a31515">&quot;RunAnimation&quot;</span>));
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">private</span> <span style="color: blue">void</span> RunAnimation(<span style="color: blue">object</span> sender, <span style="color: #2b91af">EventArgs</span> e)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (AnimationStoryBoard != <span style="color: blue">null</span>)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>AnimationStoryBoard.Begin();
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}
</p>
<p>   </span></p>
<p class="MsoNormal">
<p>&#160;</p>
</p>
<p>&#160;</p>
<p>As you can see, I added two mode dependency properties – one for event name that will trigger the animation, the other one for ViewModel ( I actually called it model).&#160; Now the tricky part is to use a bit of reflection to attach an event handler to the event on my model.&#160; This is done in HandlModelChanged routine that is called when Model or Event name is set.&#160; I am getting an event, and attaching a handler to it.&#160; The actual handler is located inside the behavior itself – RunAnimation method.&#160; Here is what my fianl XAML looks like that is testing both animation approaches:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Class</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;SLMVVMAnimationBehavior.MainPage&quot;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>xmlns</span><span style="color: blue">=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span>
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>xmlns</span><span style="color: blue">:</span><span style="color: red">x</span><span style="color: blue">=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>xmlns</span><span style="color: blue">:</span><span style="color: red">d</span><span style="color: blue">=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span><span style="color: red"> xmlns</span><span style="color: blue">:</span><span style="color: red">mc</span><span style="color: blue">=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span>
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>xmlns</span><span style="color: blue">:</span><span style="color: red">local</span><span style="color: blue">=&quot;clr-namespace:SLMVVMAnimationBehavior&quot;
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>xmlns</span><span style="color: blue">:</span><span style="color: red">i</span><span style="color: blue">=&quot;clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity&quot;
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160; </span><span style="color: red"><span style="mso-spacerun: yes">&#160;</span>mc</span><span style="color: blue">:</span><span style="color: red">Ignorable</span><span style="color: blue">=&quot;d&quot;</span><span style="color: red"> d</span><span style="color: blue">:</span><span style="color: red">DesignWidth</span><span style="color: blue">=&quot;640&quot;</span><span style="color: red"> d</span><span style="color: blue">:</span><span style="color: red">DesignHeight</span><span style="color: blue">=&quot;480&quot;&gt;
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl.Resources</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Storyboard</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;TestStoryboard&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">DoubleAnimationUsingKeyFrames</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> BeginTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Storyboard.TargetName</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;textBlock&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Storyboard.TargetProperty</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;(TextBlock.FontSize)&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.1000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;24&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="mso-spacerun: yes">&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.2000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;21.333&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.3000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;18.667&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.4000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;16&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.5000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;13.333&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.6000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;16&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.7000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;18.667&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.8000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;21.333&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:00.9000000&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;24&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EasingDoubleKeyFrame</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> KeyTime</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;00:00:01&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Value</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;26.667&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">DoubleAnimationUsingKeyFrames</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Storyboard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">local</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">SampleModel</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Key</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;CurrentModel&quot; /&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">local</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">MVVMAnimationBehavior</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> AnimationStoryBoard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">StaticResource</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TestStoryboard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Model</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">StaticResource</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> CurrentModel</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Key</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Animation&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> EventName</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;StartAnimation&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl.Resources</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;LayoutRoot&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Background</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;#FFF3EEEE&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> DataContext</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Binding</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Source</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">={</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">StaticResource</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> CurrentModel</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}}&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.ColumnDefinitions</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Width</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Auto&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Width</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Auto&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.ColumnDefinitions</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Auto&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Button</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;TestButton&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Content</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Click To Start Animation&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> d</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">LayoutOverrides</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Height&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Left&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Click</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;TestButton_Click&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Button</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Content</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Behavior Test&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;1&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Interaction.Triggers</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EventTrigger</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> EventName</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Click&quot;&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">local</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">MVVMAnimationBehavior</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> AnimationStoryBoard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">StaticResource</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TestStoryboard</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">EventTrigger</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">i</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Interaction.Triggers</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="mso-spacerun: yes">&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Button</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">TextBlock</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;textBlock&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;0,0,0,6&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Text</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Sample Text&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TextWrapping</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Wrap&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> d</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">LayoutOverrides</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Width, Height&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;1&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.ColumnSpan</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;3&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Center&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Center&quot;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> FontSize</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;26.667&quot;/&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt;
</p>
<p>   </span></p>
<p class="MsoNormal">
<p>&#160;</p>
</p>
<p>To summarize, I illustrate a couple of approaches to trigger animations in MVVM environment.&#160; Of course, there is always code-behind, but many developers frown at this approach..</p>
<p>Please let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/02/silverlight-mvvm-and-animations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/02/silverlight-mvvm-and-animations/</feedburner:origLink></item>
		<item>
		<title>WCF RIA Services Validation</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/FhnpsKqRkBw/</link>
		<comments>http://dotnetspeak.com/index.php/2010/01/wcf-ria-services-validation/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 00:24:37 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/01/wcf-ria-services-validation/</guid>
		<description><![CDATA[Today I am continuing exploring WCF RIA Services.&#160; I am going to discuss validation in RIA Services.
Any business application needs to validate user input.&#160; I am going to start with a simple case.&#160; In my sample application a user can enter a company information.&#160; I would like to setup RIA Services to force the user [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am continuing exploring WCF RIA Services.&#160; I am going to discuss validation in RIA Services.</p>
<p>Any business application needs to validate user input.&#160; I am going to start with a simple case.&#160; In my sample application a user can enter a company information.&#160; I would like to setup RIA Services to force the user to enter a company name before he or she can save the company.&#160; In order to do so I am going to use Data Annotations.&#160; First of all, I need to add a reference to System.ComponentModel.DataAnnotations DLL to all my projects.&#160; RIA Services project should already have the reference.&#160; </p>
<p>Now I need to edit my metadata file that corresponds to my data model under .NET version of RIA Services.&#160; In my case it is RolodexDomainService.metadata.cs file in SilverlightRIAServicesLibrary.Web project.&#160; In that file I need to find Companies class, then location company name property, then decorate the property with required attribute.&#160; At the same time we will also put a limit on how many characters a user can enter:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"></span></p>
<p style="line-height: 8pt; margin-bottom: 0pt; mso-layout-grid-align: none; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">[<span style="color: #2b91af">Required</span>]
</p>
<p>   </span></p>
<p style="line-height: 8pt; margin-bottom: 0pt; mso-layout-grid-align: none; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">[<span style="color: #2b91af">StringLength</span>(30)]
</p>
<p>   </span></p>
<p style="line-height: 8pt; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">string</span> CompanyName;</span></p>
<p>&#160;</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">If we want to see the results of our changes, we can run the application, then clear company name for an existing comp-any, then tab out of company name field.&#160; Here we get visual feedback that our input was not valid:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><a href="http://dotnetspeak.com/wp-content/uploads/2010/01/image8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dotnetspeak.com/wp-content/uploads/2010/01/image_thumb8.png" width="387" height="53" /></a> </p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">Now, let’s create custom validation.&#160; Fir example, I am going to force the date added to be no less that 1/1/2000.&#160; To do this I will write a custom validation class like so:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">static</span> <span style="color: blue">class</span> <span style="color: #2b91af">ValidationHelper
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">public</span> <span style="color: blue">static</span> <span style="color: #2b91af">ValidationResult</span> DateAddedCheck(<span style="color: #2b91af">DateTime</span> date)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">ValidationResult</span> result;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (date &gt; <span style="color: blue">new</span> <span style="color: #2b91af">DateTime</span>(2000, 1, 1))
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>result = <span style="color: blue">new</span> <span style="color: #2b91af">ValidationResult</span>(<span style="color: #a31515">&quot;&quot;</span>);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">else
</p>
<p>     </span></span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>result = <span style="color: blue">new</span> <span style="color: #2b91af">ValidationResult</span>(<span style="color: #a31515">&quot;Date is not valid&quot;</span>);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">return</span> result;
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">Validation method that I wrote is a static member.&#160; It follows a specific signature that RIA Services requires.&#160; For example, it returns Validation Result that contains specific information that validation infrastructure of RIA Services can parse.&#160; Overall code is fairly simple.</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">In order to make this class available on the Silverlight side, I must include my validation class into Silverlight version of RIA Services library – SilverlightRIAServicesLibrary project in my case.&#160; In order not to duplicate the code, I will include the same class as a link.&#160; I right-click on the project, choose add existing item, navigate to my class, then click on down arrow on Add button, and select Add As Link.&#160; Now I have the same validation on both .NET and Silverlight side.&#160; To confirm, I just build and run the application.&#160; Here is what my DateAdded attributes look like:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">[<span style="color: #2b91af">Required</span>]
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">[<span style="color: #2b91af">CustomValidation</span>(<span style="color: blue">typeof</span>(<span style="color: #2b91af">ValidationHelper</span>), <span style="color: #a31515">&quot;DateAddedCheck&quot;</span>, ErrorMessage = <span style="color: #a31515">&quot;Date is not valid&quot;</span>)]
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: #2b91af">DateTime</span> DateAdded;</span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">On important thing to mention that in&#160; order to see validation error in UI, we need to update our Binding to look as following:</p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">TextBox</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;CompanyNameTextbox&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;1&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;0&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Stretch&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;6,6,6,6&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Text</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;{</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Binding</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Path</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=CompanyName,</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Mode</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=TwoWay,</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> NotifyOnValidationError</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=True,</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> ValidatesOnExceptions</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=True}&quot;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&quot;Center&quot;/&gt;</span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">There is one important thing to notice.&#160; If you look at Silverlight side generated code, you will notice that validation occurs before the property value is set.&#160; As a result, you cannot rely on property value being set if a validation exception is thrown.</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">Now, let’s look at saving code that we had to modify in order to validate user input.&#160; Here is what it looks like:</p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">try
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">Validator</span>.ValidateObject(<span style="color: blue">this</span>.Model, <span style="color: blue">new</span> <span style="color: #2b91af">ValidationContext</span>(<span style="color: blue">this</span>.Model, <span style="color: blue">null</span>, <span style="color: blue">null</span>), <span style="color: blue">true</span>);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: blue">if</span> (<span style="color: blue">this</span>.Model.HasChanges)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>ShowPleaseWaitMessage();
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>_context.SubmitChanges(HandleSave, <span style="color: blue">null</span>);
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">catch</span><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> (<span style="color: #2b91af">ValidationException</span> ex)
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{
</p>
<p>   </span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">MessageBox</span>.Show(ex.Message);
</p>
<p>   </span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">Not really the cleanest code because we have to rely on exceptions being thrown.&#160; </p>
<p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal">I covered all key area of validation, but there is more for you to explore.&#160; Please let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/01/wcf-ria-services-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/01/wcf-ria-services-validation/</feedburner:origLink></item>
		<item>
		<title>Windows Azure</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/_DGcY3aNcek/</link>
		<comments>http://dotnetspeak.com/index.php/2010/01/windows-azure/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 14:30:27 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/01/windows-azure/</guid>
		<description><![CDATA[I just want to relay Microsoft&#8217;s new offer to everyone.&#160; Windows Azure is now offered for free for a limited time.&#160; This is an introductory offer to get more people to use new cloud platform from Microsoft.&#160; Please see this link for details.
]]></description>
			<content:encoded><![CDATA[<p>I just want to relay Microsoft&#8217;s new offer to everyone.&#160; Windows Azure is now offered for free for a limited time.&#160; This is an introductory offer to get more people to use new cloud platform from Microsoft.&#160; Please see <a href="http://www.microsoft.com/windowsazure/offers/popup.aspx?lang=en&amp;locale=en-US&amp;offer=MS-AZR-0001P" target="_blank">this link</a> for details.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/01/windows-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/01/windows-azure/</feedburner:origLink></item>
		<item>
		<title>Speaking at Atlanta .NET Users Group</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/P9bULsNt0lk/</link>
		<comments>http://dotnetspeak.com/index.php/2010/01/speaking-at-atlanta-net-users-group/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 01:15:30 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/01/speaking-at-atlanta-net-users-group/</guid>
		<description><![CDATA[I spoke at Atlanta.NET Users Group yesterday, My topic was Azure Step-by-Step.
I talked about why someone would use Windows and SQL Azure, then I built a Silverlight application from scratch.&#160; The application was designed to run in Windows Azure and use SQL Azure as database.&#160; I demonstrated how to get maximum code re-use between traditional [...]]]></description>
			<content:encoded><![CDATA[<p>I spoke at <a href="http://www.atldotnet.org" target="_blank">Atlanta.NET Users Group</a> yesterday, My topic was Azure Step-by-Step.</p>
<p>I talked about why someone would use Windows and SQL Azure, then I built a Silverlight application from scratch.&#160; The application was designed to run in Windows Azure and use SQL Azure as database.&#160; I demonstrated how to get maximum code re-use between traditional .NET web application and the same application developed for Azure.&#160; At the end, I had an application that could run on either platform with just web.config change.</p>
<p>You can download the zip file with PowerPoint slides with useful links as well as the sample project I built <a href="/Downloads/AzureStepByStep.zip" target="_blank">here</a>.</p>
<p>Please let me know if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/01/speaking-at-atlanta-net-users-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/01/speaking-at-atlanta-net-users-group/</feedburner:origLink></item>
		<item>
		<title>RIA Services (Cont.)</title>
		<link>http://feedproxy.google.com/~r/DotNetSpeak/~3/Tp_L4vHGEtE/</link>
		<comments>http://dotnetspeak.com/index.php/2010/01/ria-services-cont-2/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 00:45:34 +0000</pubDate>
		<dc:creator>Sergey Barskiy</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[RIA Services]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://dotnetspeak.com/index.php/2010/01/ria-services-cont-2/</guid>
		<description><![CDATA[In this post I will cover the update process.
I am going to recap where I left off in the last post on RIA Services.  The last step was to retrieved based on ID from a read only company object.  Once this object is obtained in the VIewModel, we can create a screen to edit a [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I will cover the update process.</p>
<p>I am going to recap where I left off in the last post on RIA Services.  The last step was to retrieved based on ID from a read only company object.  Once this object is obtained in the VIewModel, we can create a screen to edit a company.</p>
<p>Here is how I am getting the company by ID in the ViewModel class:</p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">var</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> companyQuery = _context.GetCompanyQuery(_companyID); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">_context.Load&lt;<span style="color: #2b91af">Companies</span>&gt;(companyQuery, (o1) =&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>HidePleaseWaitMessage(); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span><span style="color: blue">if</span> (o.Error != <span style="color: blue">null</span>) </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span><span style="color: #2b91af">ErrorHandler</span>.HandleException(o.Error); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>} </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span><span style="color: blue">else </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span><span style="color: blue">this</span>.Model = o1.Entities.First() <span style="color: blue">as</span> <span style="color: #2b91af">Companies</span>; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>} </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}, <span style="color: blue">null</span>);</span></p>
<p>Now that I have my Model property set, I can create a user control to edit the company.  Here is the part of the XAML for the edit form that shows the binding:</p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Class</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Rolodex.Silverlight.Views.CompanyEditView&#8221; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;</span> </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">:</span><span style="color: red">x</span><span style="color: blue">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221; </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">:</span><span style="color: red">controls</span><span style="color: blue">=&#8221;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&#8221;</span> </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">:</span><span style="color: red">input</span><span style="color: blue">=&#8221;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls&#8221; </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">:</span><span style="color: red">cal</span><span style="color: blue">=&#8221;clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation&#8221; </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: red"><span style="mso-spacerun: yes"> </span>xmlns</span><span style="color: blue">:</span><span style="color: red">core</span><span style="color: blue">=&#8221;clr-namespace:Rolodex.Silverlight.Core&#8221; </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">   </span><span style="color: blue"><span style="mso-spacerun: yes"> </span>&gt; </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="color: blue"> </p>
<p></span></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl.Resources</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span></span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">UserControl.Resources</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;LayoutRoot&#8221;&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;*&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Auto&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;EditGrid&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> DataContext</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Binding</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Model</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">}&#8221;&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;35&#8243;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;35&#8243;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1*&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;35&#8243;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1*&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">RowDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Height</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;35&#8243;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.RowDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.ColumnDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Width</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Auto&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Width</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;200&#8243;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">                </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">ColumnDefinition</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Width</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;*&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;/</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Grid.ColumnDefinitions</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">TextBlock</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Text</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Company Name:&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TextAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Right&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Right&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;0&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;0&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;6,6,6,6&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Center&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">TextBox</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;CompanyNameTextbox&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;0&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Stretch&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;6,6,6,6&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Text</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;{</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Binding</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Path</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=CompanyName,</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Mode</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=TwoWay}&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Center&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">TextBlock</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Text</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Date Added:&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> TextAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Right&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Right&#8221;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;0&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;6,6,6,6&#8243;</span><span style="font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Center&#8221;/&gt; </span></div>
<p><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">            </span></span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">&lt;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">input</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">DatePicker</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> x</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">:</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes">Name</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;DateAddedTextbox&#8221;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> SelectedDate</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;{</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes">Binding</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> DateAdded</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">,</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Mode</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=TwoWay}&#8221;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Column</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1&#8243;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Grid.Row</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;1&#8243;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> HorizontalAlignment</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Stretch&#8221;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> Margin</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;6,6,6,6&#8243;</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: red; font-size: 10pt; mso-no-proof: yes"> VerticalAlignment</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">=&#8221;Center&#8221;/&gt;</span></p>
<p>So far, I have an instance of a Companies object that is bound to the data context of my user control.  At this point a user can edit company name and date added fields.  Logically, the next thing a user would want to do is to save his changed &#8211; the nerve of him <img src='http://dotnetspeak.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, let’s take a look at the Save command in our view model object.</p>
<p> </p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">protected</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">override</span> <span style="color: blue">void</span> BeginSave() </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>ShowPleaseWaitMessage(); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>_context.SubmitChanges(HandleSave, <span style="color: blue">null</span>); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">} </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">private</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">void</span> HandleSave(<span style="color: #2b91af">SubmitOperation</span> operation) </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>HidePleaseWaitMessage(); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span><span style="color: blue">if</span> (operation.Error != <span style="color: blue">null</span>) </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">        </span><span style="color: #2b91af">ErrorHandler</span>.HandleException(operation.Error); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span>} </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p>Save is a two step process because all communication in Silverlight is asynchronous.  We are starting the save process in BeginSave, and we are checking for errors in HandleSave methods respectively.  The key part to this process is client side context of RIA Services that keeps track of all the changes that the user is making after the object has been initially retrieved via a call to the server.  The key work is done by the domain service object – <span style="line-height: 115%; font-family: &quot;Courier New&quot;; color: #2b91af; font-size: 10pt; mso-no-proof: yes">LinqToEntitiesDomainService</span><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">&lt;<span style="color: #2b91af">RolodexEntities</span>&gt;</span> in our case.  We can look at this code generated by the RIA Services wizard by looking at RolodexDomainService.cs class in my case.  There is a bug in current CTP that causes update to parent and child objects not being flushed properly.  In my case I have Companies object that contains a list of ComanyContacts objects.  Generated code has check for EntityState in UpdateCompanyContacts method that I had to remove to get the process to work.  Here is the final version of key methods of the Domain service class:</p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">void</span> UpdateCompanies(<span style="color: #2b91af">Companies</span> currentCompanies) </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span><span style="color: blue">this</span>.ObjectContext.AttachAsModified(currentCompanies, <span style="color: blue">this</span>.ChangeSet.GetOriginal(currentCompanies)); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; color: blue; font-size: 10pt; mso-no-proof: yes">public</span></p>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> <span style="color: blue">void</span> UpdateCompanyContacts(<span style="color: #2b91af">CompanyContacts</span> currentCompanyContacts) </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">{ </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none"><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"><span style="mso-spacerun: yes">    </span><span style="color: blue">this</span>.ObjectContext.AttachAsModified(currentCompanyContacts, <span style="color: blue">this</span>.ChangeSet.GetOriginal(currentCompanyContacts)); </span></div>
<p><span style="font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes"> </p>
<p></span></p>
<p class="MsoNormal"><span style="line-height: 115%; font-family: &quot;Courier New&quot;; font-size: 10pt; mso-no-proof: yes">}</span></p>
<p>So, after this step all parts of the process are working – I can update companies and contacts.</p>
<p>Please email me any questions,</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnetspeak.com/index.php/2010/01/ria-services-cont-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://dotnetspeak.com/index.php/2010/01/ria-services-cont-2/</feedburner:origLink></item>
	</channel>
</rss>
