<?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:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Andrej Tozon's blog</title>
    <description>In the Attic</description>
    <link>http://www.tozon.info/blog/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://www.tozon.info/blog/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Andrej Tozon</dc:creator>
    <dc:title>Andrej Tozon's blog</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <geo:lat>46.106922</geo:lat><geo:long>14.526415</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/TheAttic" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FTheAttic" 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%2FTheAttic" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/TheAttic" 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%2FTheAttic" 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%2FTheAttic" 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%2FTheAttic" 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.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FTheAttic" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Silverlight LOB: Validation (#2 – Annotations and shared classes)</title>
      <description>&lt;p&gt;In my &lt;a href="http://tozon.info/blog/post/2009/10/06/Silverlight-LOB-Validation-(1).aspx"&gt;previous post&lt;/a&gt;, I wrote about “the first line of defense” against inputting invalid data in Silverlight applications (or any kind of application, for that matter) – preventing the user from entering invalid data through some an input form. Input form fields are commonly directly bound to the underlying object’s properties – either directly or through a of value converter – in both cases the entered value gets assigned to the bound object’s property; and this is exactly the place where we would want to put our second line of defense.&lt;/p&gt;  &lt;p&gt;Silverlight 3 supports data validation. The majority of controls now feature new visual states for presenting themselves whenever they are associated with invalid data. Putting a control into the invalid state is as easy as throwing an exception in its bound property’s setter code:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public DateTime BirthDate
{
    get { return birthDate; }
    set
    {
        if (birthDate == value)
        {
            return;
        }

        if (birthDate &amp;gt; DateTime.Today)
        {
            throw new ArgumentException(&amp;quot;The birth date is invalid.&amp;quot;);
        }

        birthDate = value;
        OnPropertyChanged(&amp;quot;BirthDate&amp;quot;);
    }
}&lt;/pre&gt;

&lt;p&gt;When the property is set to an invalid date, the exception gets thrown. This exception is then caught by the data binding engine, which in turn triggers the BindingValidationError event, prompting the control to go to invalid state:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;a href="http://tozon.info/images/blog/SilverlightLOBValidation2Annotationsands_987F/image.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://tozon.info/images/blog/SilverlightLOBValidation2Annotationsands_987F/image_thumb.png" width="355" height="30" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This kind of notification can be enabled by setting binding’s ValidatesOnExceptions and NotifyOnValidationError properties to true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System.ComponentModel.DataAnnotation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is another way to perform validation over entity’s properties:&amp;#160; by using validators from the System.ComponentModel.DataAnnotation assembly. What you do is put an appropriate attribute above the property definition, describing the kind of validation to performed over property value.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;[Required(ErrorMessage = &amp;quot;The date of birth is required.&amp;quot;)]
public DateTime BirthDate
{
    get { return birthDate; }
    set
    {
        if (birthDate == value)
        {
            return;
        }

        birthDate = value;
        OnPropertyChanged(&amp;quot;BirthDate&amp;quot;);
    }
}&lt;/pre&gt;

&lt;p&gt;You can even write your own validation attributes by deriving from the ValidationAttribute class and overriding the validation method. Here’s an example to match my first method of validation (throwing an exception in property setter):&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class BirthDateValidationAttribute : ValidationAttribute
{
    protected override ValidationResult IsValid(object value, &lt;br /&gt;        ValidationContext validationContext)
    {
        if (value == null)
        {
            return ValidationResult.Success;
        }

        DateTime date = (DateTime)value;
        if (date &amp;gt; DateTime.Today)
        {
            return new ValidationResult(&amp;quot;The birth date is invalid.&amp;quot;);
        }

        return ValidationResult.Success;
    }
}&lt;/pre&gt;

&lt;p&gt;Let’s put this to work. Say we’re using shared entity classes in our project; a kind of a real world scenario. When projects are set up as described in my previous blog entry, we immediately bump into a problem – decorating the Person’s BirthDate property with the new BirthDateValidationAttribute results with the compilation error: it’s just that full .NET framework’s ValidationAttribute implementation differs form how Silverlight’s version is implemented and therefore above BirthDateValidationAttribute can’t be shared between both entity projects:&lt;/p&gt;
&lt;em&gt;Client side&lt;/em&gt;: protected abstract ValidationResult IsValid(object value, ValidationContext validationContext) 

&lt;br /&gt;&lt;em&gt;Server side&lt;/em&gt;: public abstract bool IsValid(object value) 

&lt;br /&gt;

&lt;p&gt;To work around this, we need to create a dummy validator attribute class in the server side entity project, having the same name as its client counterpart, except always returning true as the validation result:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class BirthDateValidationAttribute : ValidationAttribute
{
    public override bool IsValid(object value)
    {
        return true;
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Validation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of throwing an exception from the property trigger as in the previous example, we can now simply call the validation method, which would validate against every ValidationAttribute defined for the property.&lt;/p&gt;

&lt;p&gt;Modified Property definition (Validate() method is called instead of throwing an exception):&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;[DataMember]
[BirthDateValidation]
public DateTime BirthDate
{
    get { return birthDate; }
    set
    {
        if (birthDate == value)
        {
            return;
        }

        &lt;strong&gt;Validate(&amp;quot;BirthDate&amp;quot;, value);
&lt;/strong&gt;        birthDate = value;
        OnPropertyChanged(&amp;quot;BirthDate&amp;quot;);
    }
}&lt;/pre&gt;

&lt;p&gt;Because we only want to validate properties on the client, we need to implement the Validate() method just on the client side. But since the Person class is shared, we really have to include this method on both sides, except we would implement it differently.&lt;/p&gt;

&lt;p&gt;In the end, Validate() method on the client is defined as:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void Validate(string propertyName, object value)
{
    Validator.ValidateProperty(value, new ValidationContext(this, null, null)
    {
        MemberName = propertyName,
    });
}&lt;/pre&gt;

&lt;p&gt;… while the server side method can be left empty:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void Validate(string propertyName, object value)
{
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Single base class for entities?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To avoid having duplicate validation methods for all entities, it’s best to put it in a single base page, where you would put all the common entity code (like INotifyPropertyChanged etc.). In this case, partial methods are going to prove themselves very useful:&lt;/p&gt;

&lt;p&gt;Main base class part:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;partial void ValidateProperty(string propertyName, object value);
protected void Validate(string propertyName, object value)
{
    ValidateProperty(propertyName, value);
}&lt;/pre&gt;

&lt;p&gt;Client side base class part:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public partial class EntityBase
{
    partial void ValidateProperty(string propertyName, object value)
    {
        Validator.ValidateProperty(value, new ValidationContext(this, null, null)
        {
            MemberName = propertyName,
        });
    }
}&lt;/pre&gt;

&lt;p&gt;We can just leave the server side base class part out and forget about it. The best thing with with partial methods is that you don’t have to provide any implementation if you don’t want to – in which case the method simply won’t be called. &lt;/p&gt;

&lt;p&gt;Source code for this project is available:&lt;/p&gt;

  &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/LOBDemo1.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
tweetmeme_url = 'http://tozon.info/blog/post/2009/11/07/Silverlight-LOB-Validation-(2-e28093-Annotations-and-shared-classes).aspx';
tweetmeme_source = 'andrejt';
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=87vE4uUgfl0:mQAJWrQbN1k:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=87vE4uUgfl0:mQAJWrQbN1k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=87vE4uUgfl0:mQAJWrQbN1k:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=87vE4uUgfl0:mQAJWrQbN1k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=87vE4uUgfl0:mQAJWrQbN1k:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/87vE4uUgfl0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/87vE4uUgfl0/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/11/07/Silverlight-LOB-Validation-(2-e28093-Annotations-and-shared-classes).aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=1364c18a-f169-47fc-98ef-e9e340c7b4c8</guid>
      <pubDate>Sat, 07 Nov 2009 17:26:09 -0700</pubDate>
      <category>Development</category>
      <category>MVVM</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=1364c18a-f169-47fc-98ef-e9e340c7b4c8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=1364c18a-f169-47fc-98ef-e9e340c7b4c8</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/11/07/Silverlight-LOB-Validation-(2-e28093-Annotations-and-shared-classes).aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=1364c18a-f169-47fc-98ef-e9e340c7b4c8</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=1364c18a-f169-47fc-98ef-e9e340c7b4c8</feedburner:origLink></item>
    <item>
      <title>Detecting duplicate instances of a running Silverlight application</title>
      <description>&lt;p&gt;This is a short tip for constraining your Silverlight applications to a single instance, something that’s quite popular in the desktop applications world. What you want to do is allow only the first instance of your application while rejecting all subsequent instances.&lt;/p&gt;  &lt;p&gt;Silverlight 3 introduced a way for applications to communicate between each other, either on the same page or instantiated on a different browser instances (works even with Installed/OOB apps). The communication is performed by sender and receiver classes, which exchange messages through named channels. Each receiver must register a unique name for the channel or an exception will be thrown.&lt;/p&gt;  &lt;p&gt;And that’s the trick. Listening on a specific named channel will act like a mutex. By catching the ListenFailed exception you get an option to display appropriate message or launch a different version of the application. All the work is done in App.Xaml.cs file:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;private void Application_Startup(object sender, StartupEventArgs e)
{
    try
    {
        receiver = new LocalMessageReceiver(&amp;quot;singleinstance&amp;quot;);
        receiver.Listen();
        this.RootVisual = new MainPage();
    }
    catch (ListenFailedException)
    {
        this.RootVisual = new DuplicateInstancePage();
    }
}&lt;/pre&gt;

&lt;p&gt;The test project is available &lt;a href="http://tozon.info/sl/singleinstance" target="_blank"&gt;through here&lt;/a&gt;.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
tweetmeme_url = 'http://tozon.info/blog/post/2009/10/31/Detecting-duplicate-instances-of-a-running-Silverlight-application.aspx';
tweetmeme_source = 'andrejt';
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=irEQW6Fm0RU:-1MW6fwhgb8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=irEQW6Fm0RU:-1MW6fwhgb8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=irEQW6Fm0RU:-1MW6fwhgb8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=irEQW6Fm0RU:-1MW6fwhgb8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=irEQW6Fm0RU:-1MW6fwhgb8:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/irEQW6Fm0RU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/irEQW6Fm0RU/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/10/31/Detecting-duplicate-instances-of-a-running-Silverlight-application.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=ada239b1-d6e9-47a0-b360-410514fb1381</guid>
      <pubDate>Sat, 31 Oct 2009 16:49:40 -0700</pubDate>
      <category>Development</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=ada239b1-d6e9-47a0-b360-410514fb1381</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=ada239b1-d6e9-47a0-b360-410514fb1381</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/10/31/Detecting-duplicate-instances-of-a-running-Silverlight-application.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=ada239b1-d6e9-47a0-b360-410514fb1381</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=ada239b1-d6e9-47a0-b360-410514fb1381</feedburner:origLink></item>
    <item>
      <title>Halloween Live Gallery</title>
      <description>&lt;p&gt;With Halloween around the corner, it’s time for some scary photos… In this post I’ll explain how I built my demo application I showed at &lt;a href="http://tozon.info/blog/post/2009/10/23/Windows-7-Launch-talk-Building-cool-applications-with-MS-Expression-tools.aspx" target="_blank"&gt;my Windows 7 Launch talk&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://expression.microsoft.com/en-us/cc136530.aspx" target="_blank"&gt;Expression Blend 3&lt;/a&gt; shipped with a few interesting samples, available for immediate use. One of them is called Wall3D (Silverlight 3) and is a great example of one of the new Silverlight 3D features, called perspective transform. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_thumb.png" width="554" height="423" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This sample (perhaps a starter kit is a better description for it) features a 3D photo gallery, which sort of puts the viewer in the center of an oval “room”, full of photos, with an option to rotate the view to the left or right (flick / mouse click and pan), zoom in or out (mouse wheel), etc.. The kind of what people used to do in Flash; now it’s possible in Silverlight too. The sample serves also as a demonstration of yet another new Blend 3 feature, called Sample data – the photos on the above image were generated through this feature. Let’s explore the sample and see how we can push it further, shall we?&lt;/p&gt;  &lt;p&gt;After opening Blend 3, switch to the &lt;em&gt;Samples&lt;/em&gt; page and choose &lt;strong&gt;Wall3D (Silverlight 3)&lt;/strong&gt; and the default project will be generated for you. &lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_thumb_3.png" width="244" height="193" /&gt;&lt;/p&gt;  &lt;p&gt;You can test the application by hitting &lt;strong&gt;F5&lt;/strong&gt;. You navigate through the gallery by flicking the view left or right and zoom in or out with your middle mouse button.&lt;/p&gt;  &lt;p&gt;Examining the code that’s been created in the project will reveal the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;the photos come from the sample data source (XML + photos, which are also included in the project – look into the SampleData folder) &lt;/li&gt;    &lt;li&gt;“The wall” is driven by the CircularPanel3D control (a custom panel) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Knowing this, we’re ready to create our own 3D gallery. We’ll only need a single thing from this sample project, and that’s the CircularPanel3D.cs file, found in the root of the project. Copy and save that in some other folder for later reference, then start a new Silverlight 3 Application project in Blend.&lt;/p&gt;  &lt;p&gt;I used an &lt;em&gt;ItemsControl&lt;/em&gt; instead of &lt;em&gt;ListBox&lt;/em&gt; to arrange and display the photos. Of course both will accept CircularPanel3D as their &lt;em&gt;ItemsPanel&lt;/em&gt;, I just didn’t need item selection in this case. Here’s how it all looked in Blend designer:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="" border="0" alt="" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_3.png" width="504" height="385" /&gt; &lt;/p&gt;  &lt;p&gt;Now what’s wrong with this picture? It’s hard to design something when you’ve got no visual feedback to help you with the layout and arrangements. I have already modified the &lt;em&gt;ItemTemplate&lt;/em&gt;, but without the actual photos, it’s hard to do proper design work.&amp;#160; And that’s where the sample data comes in. To create a sample data source, open the &lt;em&gt;Data&lt;/em&gt; panel and click on the second icon from the right &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_4.png" width="33" height="21" /&gt; (Add sample data source). Choose &lt;em&gt;Define New Sample Data&lt;/em&gt;, name the data source and click OK. You can shape the sample data source however you like – flat, hierarchical, with entities having simple or complex type properties, etc. For this gallery, I created the following source: &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_5.png" width="279" height="200" /&gt; &lt;/p&gt;  &lt;p&gt;Bind this data source to the ItemsControl as its items source – voila!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="" border="0" alt="" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_6.png" width="504" height="387" /&gt; &lt;/p&gt;  &lt;p&gt;Cool, much better. Modifying the ItemTemplate has just become a lot easier. Let’s add another element for displaying a bit more details about the photo (like the title and location where it was taken).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_7.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Photo view" border="0" alt="Photo view" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_thumb_4.png" width="304" height="139" /&gt;&lt;/a&gt; &lt;a href="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Details view" border="0" alt="Details view" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_thumb_5.png" width="304" height="140" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So we’ve got two views for the &lt;em&gt;ItemTemplate&lt;/em&gt;, each view being represented with a separate element – one’s with the photo and the second one with details. We have to provide a way for user to switch between the two; how would we do this? Write code? Call the developer? Not necessarily. If we’re in luck, the appropriate piece of code may have already been written, waiting to be taken it used in Blend for declaratively specifying whatever we wanted to do to those elements and how. That piece of code is called a &lt;em&gt;behavior&lt;/em&gt;. There are several places on the web to look for behaviors (as well as more info on what they are and how to produce them), but my first bets would be the &lt;a href="http://gallery.expression.microsoft.com/en-us/site/search?f[0].Type=RootCategory&amp;amp;f[0].Value=behaviors&amp;amp;f[0].Text=Behaviors" target="_blank"&gt;Expression Gallery&lt;/a&gt; and &lt;a href="http://expressionblend.codeplex.com/" target="_blank"&gt;Expression Blend Samples library on Codeplex&lt;/a&gt;; the letter containing some very handy behaviors.&lt;/p&gt;  &lt;p&gt;I added a couple of behaviors to add interaction to gallery elements - FlipAction would switch the photo and details part through flip motion, triggered by DoubleClick trigger; and ScaleBehavior would enlarge the photo on mouse over. A couple of clicks for very cool-looking effect.&lt;/p&gt;  &lt;p&gt;Let’s take a look at the data source... I decided to use &lt;strong&gt;Flickr&lt;/strong&gt; to retrieve the photos, because it’s API is easy to use and can (amongst other things) return geo-location of the place where photo was taken (when available). This &lt;strong&gt;geo-location&lt;/strong&gt; is then passed to the &lt;a href="http://msdn.microsoft.com/en-us/library/cc879136.aspx" target="_blank"&gt;Bing Maps geocoding web service&lt;/a&gt;as an input parameter to retrieve the &lt;strong&gt;real-world address&lt;/strong&gt;; these addresses can be seen on the bottom of the flipped photo.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_9.png" width="189" height="165" /&gt; &lt;/p&gt;  &lt;p&gt;Playing with geo-location was fun so I decided to take it a step further. I put together a special &lt;strong&gt;ShowMapAction&lt;/strong&gt;, which is currently triggered by a mouse wheel over the photo (or details). The action simply shows the location on the interactive &lt;strong&gt;Bing Map&lt;/strong&gt; (I used &lt;a href="https://connect.microsoft.com/silverlightmapcontrolctp" target="_blank"&gt;Bing Maps Silverlight Map Control&lt;/a&gt; for this).&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://tozon.info/images/blog/a368ff81e3a1_14BC7/image_10.png" width="584" height="316" /&gt; &lt;/p&gt;  &lt;p&gt;Just a word of caution: Geo-encoded photos are cool, but be careful what you’re publishing on the net. The information may not always be used for good purposes.&lt;/p&gt;  &lt;p&gt;The final result can be seen &lt;a href="http://tozon.info/gallery/" target="_blank"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; (live). Right in time for keeping track with what’s going on on Halloween.&lt;/p&gt;  &lt;p&gt;Finally I have to say I’m spending a lot more time in Blend since version 3 got out. It’s evolving into a great tool and behaviors are going to take a significant part in designer’s/integrator’s role in the future.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a title="http://tozon.info/gallery/" href="http://tozon.info/gallery/"&gt;&lt;strong&gt;http://tozon.info/gallery/&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
tweetmeme_url = 'http://tozon.info/blog/post/2009/10/26/Halloween-Live-Gallery.aspx';
tweetmeme_source = 'andrejt';
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MG5-NO31xhU:9D9eMow95IA:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MG5-NO31xhU:9D9eMow95IA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MG5-NO31xhU:9D9eMow95IA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MG5-NO31xhU:9D9eMow95IA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MG5-NO31xhU:9D9eMow95IA:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/MG5-NO31xhU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/MG5-NO31xhU/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/10/26/Halloween-Live-Gallery.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=6f741090-5d2f-4b8a-bc75-39a81fc68691</guid>
      <pubDate>Mon, 26 Oct 2009 14:39:35 -0700</pubDate>
      <category>Design</category>
      <category>Development</category>
      <category>Expression</category>
      <category>Layout</category>
      <category>Silverlight</category>
      <category>Behaviors</category>
      <category>Photo / Travel</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=6f741090-5d2f-4b8a-bc75-39a81fc68691</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=6f741090-5d2f-4b8a-bc75-39a81fc68691</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/10/26/Halloween-Live-Gallery.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=6f741090-5d2f-4b8a-bc75-39a81fc68691</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=6f741090-5d2f-4b8a-bc75-39a81fc68691</feedburner:origLink></item>
    <item>
      <title>Windows 7 Launch talk: Building cool applications with MS Expression tools</title>
      <description>&lt;p&gt;Windows 7 launch day was fun. I gave a talk on Expression tools (and related) – here’s the PowerPoint slide deck for those who asked for it:&lt;/p&gt;  &lt;div style="text-align: left; width: 425px" id="__ss_2322687"&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=win7launch-ljubljana-andrejtozon-091022141601-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=win7-launch-building-cool-applications-with-ms-expression-tools" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=win7launch-ljubljana-andrejtozon-091022141601-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=win7-launch-building-cool-applications-with-ms-expression-tools" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;  &lt;p&gt;I used Expression Blend 3 to build a photo viewer application, which I’ll blog about later; key points here were designer-developer workflow + using sample data and behaviors.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://tozon.info/blog/post/2008/12/28/ICEing-the-Nativity-Scene.aspx"&gt;blogged&lt;/a&gt; about the &lt;a href="http://research.microsoft.com/ice/" target="_blank"&gt;Microsoft ICE&lt;/a&gt; last year and I used that exact sample I’ve used in that blog post, but with one difference: did you know that by installing ICE on your desktop will, you can stitch panoramic (or large composite) photos right from your &lt;a href="http://photogallery.live.com/" target="_blank"&gt;Windows Live Photo Gallery&lt;/a&gt;? It’s as easy as selecting the photos and click on the Extras menu item:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/images/blog/Windows7LaunchtalkBuildingcoolapplicatio_135CE/image.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Create Image Composite..." border="0" alt="Create Image Composite..." src="http://tozon.info/images/blog/Windows7LaunchtalkBuildingcoolapplicatio_135CE/image_thumb.png" width="293" height="128" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Yet another option for stitching a bunch of photos together will give you the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409068.aspx" target="_blank"&gt;Deep Zoom Composer&lt;/a&gt;(free and not listed as an Expression tool, but sure looks and feels like it), which has similar features and much more compositing power (different zoom levels, layers, etc.)&lt;/p&gt;  &lt;p&gt;And for closing I briefly showcased &lt;a href="http://expression.microsoft.com/en-us/cc136533.aspx" target="_blank"&gt;Expression Encoder 3&lt;/a&gt; and &lt;a href="http://www.iis.net/media/experiencesmoothstreaming" target="_blank"&gt;IIS Smooth Streaming&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Yup, fun.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
tweetmeme_url = 'http://tozon.info/blog/post/2009/10/23/Windows-7-Launch-talk-Building-cool-applications-with-MS-Expression-tools.aspx';
tweetmeme_source = 'andrejt';
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dO6aqwiEuo8:m5ZfPwYxfLM:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dO6aqwiEuo8:m5ZfPwYxfLM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dO6aqwiEuo8:m5ZfPwYxfLM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=dO6aqwiEuo8:m5ZfPwYxfLM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=dO6aqwiEuo8:m5ZfPwYxfLM:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/dO6aqwiEuo8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/dO6aqwiEuo8/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/10/23/Windows-7-Launch-talk-Building-cool-applications-with-MS-Expression-tools.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=aae2c853-b196-4306-aeb2-f8405e8a5b47</guid>
      <pubDate>Fri, 23 Oct 2009 13:02:04 -0700</pubDate>
      <category>Expression</category>
      <category>Silverlight</category>
      <category>Software</category>
      <category>Tech</category>
      <category>User Experience</category>
      <category>WPF</category>
      <category>Design</category>
      <category>Layout</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=aae2c853-b196-4306-aeb2-f8405e8a5b47</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=aae2c853-b196-4306-aeb2-f8405e8a5b47</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/10/23/Windows-7-Launch-talk-Building-cool-applications-with-MS-Expression-tools.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=aae2c853-b196-4306-aeb2-f8405e8a5b47</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=aae2c853-b196-4306-aeb2-f8405e8a5b47</feedburner:origLink></item>
    <item>
      <title>Slides and demo from Bleeding Edge’2009</title>
      <description>&lt;p&gt;On this year’s &lt;a href="http://www.bleedingedge.si/" target="_blank"&gt;Bleeding Edge&lt;/a&gt; conference I had a talk on debugging with my fellow &lt;a href="http://milambda.blogspot.com" target="_blank"&gt;SQL Server MVP&lt;/a&gt;. While he covered some common pitfalls, awaiting developers on the SQL Server side, I focused on the Silverlight side of development and debugging:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;possible issues with application deployment &lt;/li&gt;    &lt;li&gt;options and strategies for returning WCF faults with Silverlight 3 &lt;/li&gt;    &lt;li&gt;using &lt;em&gt;windbg&lt;/em&gt; with Silverlight application to track its execution &lt;/li&gt;    &lt;li&gt;finding data binding failures and memory leaks &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This was our sample application: &lt;a href="http://www.tozon.si/be09/" target="_blank"&gt;Bleeding Edge Shoppe&lt;/a&gt;[opens in new window]&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.tozon.si/be09" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Bleeding Edge Shoppe" border="0" alt="Bleeding Edge Shoppe" src="http://tozon.info/images/blog/SlidesanddemofromBleedingEdge2009_C97/image.png" width="560" height="303" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;[The full source code will be available shortly.]&lt;/p&gt;  &lt;p&gt;And the slide deck:&lt;/p&gt;  &lt;div style="text-align: left; width: 425px" id="__ss_2126423"&gt;   &lt;p align="center"&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=bleedingedge2009-publish-091005023234-phpapp02&amp;amp;stripped_title=debugging-silverlight-sql-server" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=bleedingedge2009-publish-091005023234-phpapp02&amp;amp;stripped_title=debugging-silverlight-sql-server" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt; &lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;
tweetmeme_url = 'http://tozon.info/blog/post/2009/10/18/Slides-and-demo-from-Bleeding-Edgee280992009.aspx';
tweetmeme_source = 'andrejt';
&lt;/script&gt;
&lt;script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=NLmMtG7MoCA:qhxhnvunVSA:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=NLmMtG7MoCA:qhxhnvunVSA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=NLmMtG7MoCA:qhxhnvunVSA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=NLmMtG7MoCA:qhxhnvunVSA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=NLmMtG7MoCA:qhxhnvunVSA:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/NLmMtG7MoCA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/NLmMtG7MoCA/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/10/18/Slides-and-demo-from-Bleeding-Edgee280992009.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=919f8fe8-3587-492a-bf4f-2a406e2da312</guid>
      <pubDate>Sun, 18 Oct 2009 15:56:46 -0700</pubDate>
      <category>Silverlight</category>
      <category>Development</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=919f8fe8-3587-492a-bf4f-2a406e2da312</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=919f8fe8-3587-492a-bf4f-2a406e2da312</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/10/18/Slides-and-demo-from-Bleeding-Edgee280992009.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=919f8fe8-3587-492a-bf4f-2a406e2da312</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=919f8fe8-3587-492a-bf4f-2a406e2da312</feedburner:origLink></item>
    <item>
      <title>Silverlight LOB: Validation (#1)</title>
      <description>&lt;p&gt;When taking about data validation in applications, I usually describe the validation as the five-stage process or, put differently, five lines of defense against invalid data. In this post, I’ll write about the first line of defense – preventing the user entering the wrong data.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Preventing invalid input&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This one’s logical, really. A user enters the data through input fields on some kind of input form, so naturally this would be the best place to put our first line of defense.&lt;/p&gt;  &lt;p&gt;The first line of defense is about preventing user to enter invalid data into input fields. This doesn’t mean that if done proper and thorough, we wouldn’t need other places to check the data; it’s just the best place to filter out majority of faulty input that can happen during manual data entry. The goal here is to catch as many invalid data as possible, as soon as possible. This wouldn’t result only in better application responsiveness (no unnecessary trips to the server), the immediate feedback of invalid entry will provide a better user experience, possibly even educate the user to learn from her mistakes. &lt;/p&gt;  &lt;p&gt;So, what are we talking about here?&lt;/p&gt;  &lt;p&gt;A simple TextBox might not be the best solution for entering only numeric data. Seeing the TextBox on the input form, the user might expect she can enter anything she likes into the box, even if the label, put close by the input box, is saying to her: “Enter your age”. A kind of a NumericUpDown control visually gives user a much better idea of what should go into that box, plus she gets an option of manipulating that value; in this case, it’s adjusting the value with the Up and Down keys. In Windows Forms, for example, I liked to use a TextBox with a calculator dropdown for entering decimal data. Masked input boxes also work well, when you want the user to enter the data in a specific format.&lt;/p&gt;  &lt;p&gt;If you don’t want to provide any visual clues that only numeric data should be entered in the input field and go for the standard TextBox, it’s very much recommended to handle the input for yourself and only allow numeric keys through. This is usually done by hooking into KeyDown event – either in codebehind class, or even better – with a custom TextBox behavior.&lt;/p&gt;  &lt;p&gt;Yet another good example of filtering the data input to the underlying data type, is the DatePicker control. You can usually set the range of valid dates that can be selected and control whether or not date entry is required. With Silverlight DatePicker, it appears that date entry is always optional, even if bound to a non-nullable DateTime data type. Tabbing out of the DatePicker will leave the input box empty, but the bound property will still contain the old value. Hooking into DateValidationError or BindingValidationError event wouldn’t help so I tried to handle this case by manipulating the Selected date in the SelectedDateChanged event. Instead of doing it in the codebehind class, I created the following behavior:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public class RequiredDatePickerBehavior : Behavior&amp;lt;DatePicker&amp;gt;
{
    protected override void OnAttached()
    {
        base.OnAttached();
        AssociatedObject.SelectedDateChanged += OnSelectedDateChanged;
    }

    protected override void OnDetaching()
    {
        base.OnDetaching();
        AssociatedObject.SelectedDateChanged -= OnSelectedDateChanged;
    }

    private void OnSelectedDateChanged(object sender, SelectionChangedEventArgs e)
    {
        if (e.AddedItems.Count == 0 &amp;amp;&amp;amp; e.RemovedItems.Count &amp;gt; 0)
        {
            AssociatedObject.SelectedDate = (DateTime)e.RemovedItems[0];
        }
    }
}&lt;/pre&gt;

&lt;p&gt;… which can be used as:&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;controls:DatePicker SelectedDate=&amp;quot;{Binding BirthDate, Mode=TwoWay}&amp;quot;
                     Grid.Row=&amp;quot;1&amp;quot; Grid.Column=&amp;quot;1&amp;quot;&amp;gt;
    &amp;lt;i:Interaction.Behaviors&amp;gt;
        &amp;lt;local:RequiredDatePickerBehavior /&amp;gt;
    &amp;lt;/i:Interaction.Behaviors&amp;gt;
&amp;lt;/controls:DatePicker&amp;gt;&lt;/pre&gt;

&lt;p&gt;Attaching this behavior to the DatePicker will revert the date to the last valid value in case of deleting the text from the input box and thus making the DatePicker non-nullable.&lt;/p&gt;

&lt;p&gt;Behaviors in general are a great way to extend an existing type (or types) of control and can be used for a variety of things. In this post I’ve shown a way to enhance the Silverlight DatePicker control to prevent entering empty values in cases when date is required. Remember next time you’ll find yourself coding KeyDown or similar control event handler in page’s codebehind class: consider writing a behavior!&lt;/p&gt;

&lt;p&gt;To be continued…&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f10%2f06%2fSilverlight-LOB-Validation-(1).aspx&amp;amp;title=Silverlight+LOB%3a+Validation+(%231)"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/10/06/Silverlight-LOB-Validation-(1).aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=sv6-n6rrSiE:H9xbiHYRXF0:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=sv6-n6rrSiE:H9xbiHYRXF0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=sv6-n6rrSiE:H9xbiHYRXF0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=sv6-n6rrSiE:H9xbiHYRXF0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=sv6-n6rrSiE:H9xbiHYRXF0:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/sv6-n6rrSiE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/sv6-n6rrSiE/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/10/06/Silverlight-LOB-Validation-(1).aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=5bf52123-dae0-4230-ae1a-281d5bcf74b3</guid>
      <pubDate>Tue, 06 Oct 2009 03:20:12 -0700</pubDate>
      <category>Behaviors</category>
      <category>MVVM</category>
      <category>Silverlight</category>
      <category>WPF</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=5bf52123-dae0-4230-ae1a-281d5bcf74b3</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=5bf52123-dae0-4230-ae1a-281d5bcf74b3</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/10/06/Silverlight-LOB-Validation-(1).aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=5bf52123-dae0-4230-ae1a-281d5bcf74b3</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=5bf52123-dae0-4230-ae1a-281d5bcf74b3</feedburner:origLink></item>
    <item>
      <title>Enable GPU Acceleration with Expression Blend 3</title>
      <description>&lt;p&gt;Last night, while working on a sample Silverlight application with Blend, I asked myself – where’s the &lt;em&gt;Use GPU Acceleration&lt;/em&gt; option? Sure you can set the parameter on a Silverlight object directly in HTML or enable it through Out-Of-Browser Settings in Visual Studio 2008, but how about Blend?&lt;/p&gt;  &lt;p&gt;The answer is that Blend enables GPU Acceleration automatically when one ticks the &lt;em&gt;Enable&lt;/em&gt; &lt;em&gt;Application Outside Browser&lt;/em&gt; option.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Enable Out-Of-Browser" border="0" alt="Enable Out-Of-Browser" src="http://tozon.info/images/blog/EnableGPUAccelerationwithExpressionBlend_14C8C/image.png" width="468" height="112" /&gt; &lt;/p&gt;  &lt;p&gt;And what’s with the &lt;em&gt;Preview Application Outside Browser option&lt;/em&gt;? Let’s see what happens when we run the application from Blend.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Blend 3 prompt" border="0" alt="Blend 3 prompt" src="http://tozon.info/images/blog/EnableGPUAccelerationwithExpressionBlend_14C8C/image_3.png" width="578" height="163" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Uhum… Blend asks that we should install the application first. OK, we’ll click Yes and run once again, still in the browser. Once started, right click, install the application and close it. Now the application is installed and the project is configured to run it out of the browser. From now on, every time the application is started from Blend, it will run out of the browser with GPU Acceleration enabled.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f09%2f23%2fEnable-GPU-Acceleration-with-Expression-Blend-3.aspx&amp;amp;title=Enable+GPU+Acceleration+with+Expression+Blend+3"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/09/23/Enable-GPU-Acceleration-with-Expression-Blend-3.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=VO_gi9MCnf8:hhKrRbUVE1M:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=VO_gi9MCnf8:hhKrRbUVE1M:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=VO_gi9MCnf8:hhKrRbUVE1M:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=VO_gi9MCnf8:hhKrRbUVE1M:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=VO_gi9MCnf8:hhKrRbUVE1M:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/VO_gi9MCnf8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/VO_gi9MCnf8/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/09/23/Enable-GPU-Acceleration-with-Expression-Blend-3.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=43473770-605a-4bb8-90e3-a36d626f5e6b</guid>
      <pubDate>Wed, 23 Sep 2009 14:41:44 -0700</pubDate>
      <category>Software</category>
      <category>Silverlight</category>
      <category>Expression</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=43473770-605a-4bb8-90e3-a36d626f5e6b</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=43473770-605a-4bb8-90e3-a36d626f5e6b</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/09/23/Enable-GPU-Acceleration-with-Expression-Blend-3.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=43473770-605a-4bb8-90e3-a36d626f5e6b</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=43473770-605a-4bb8-90e3-a36d626f5e6b</feedburner:origLink></item>
    <item>
      <title>Slides from Microsoft Partner Meeting Event</title>
      <description>&lt;p align="left"&gt;Last week I attended a local Microsoft Partner Meeting to talk about using Silverlight (3) to build LOB applications. About half of the talk was slides, and the rest was app demos. Source code for some of my demos are available through some of my previous blog posts, and here’s the slide deck [in Slovenian language]:&lt;/p&gt;  &lt;div align="center"&gt;   &lt;div style="text-align: center; width: 425px" align="center"&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vap09sl3lob-090916152500-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=silverlight-v-poslovnem-svetu" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vap09sl3lob-090916152500-phpapp02&amp;amp;rel=0&amp;amp;stripped_title=silverlight-v-poslovnem-svetu" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p align="left"&gt;Next week I’m presenting Silverlight 3 in &lt;a href="http://www.kiberpipa.org/en/" target="_blank"&gt;Kiberpipa&lt;/a&gt;. It’s free entry and you’re kindly invited.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f09%2f16%2fSlides-from-Microsoft-Partner-Meeting-Event.aspx&amp;amp;title=Slides+from+Microsoft+Partner+Meeting+Event"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/09/16/Slides-from-Microsoft-Partner-Meeting-Event.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=823BB85eqwE:9wiT8LlavLE:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=823BB85eqwE:9wiT8LlavLE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=823BB85eqwE:9wiT8LlavLE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=823BB85eqwE:9wiT8LlavLE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=823BB85eqwE:9wiT8LlavLE:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/823BB85eqwE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/823BB85eqwE/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/09/16/Slides-from-Microsoft-Partner-Meeting-Event.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=e53705f8-603c-450d-9a78-dd36f0cba9a2</guid>
      <pubDate>Wed, 16 Sep 2009 13:40:36 -0700</pubDate>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=e53705f8-603c-450d-9a78-dd36f0cba9a2</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=e53705f8-603c-450d-9a78-dd36f0cba9a2</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/09/16/Slides-from-Microsoft-Partner-Meeting-Event.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=e53705f8-603c-450d-9a78-dd36f0cba9a2</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=e53705f8-603c-450d-9a78-dd36f0cba9a2</feedburner:origLink></item>
    <item>
      <title>Adventures in Silverlight LOB: The beginning</title>
      <description>&lt;p&gt;This is the beginning of what’s going to be yet another series focusing on developing LOB applications with Silverlight. I’ve been wanting to write more on this topic since NTK, but there was always something else… In the series, I’ll build a sample application, similar to what I’ve been presenting on NTK. Each post will focus on a specific area, technique or a trick, and show the actual implementation in the sample LOB app, following different patterns I’ve been using in application development in past couple of years. Any comments are welcome.&lt;/p&gt;  &lt;p&gt;In this first post, we’ll set up the initial environment for the sample app and write a few words about sharing entities between client and server. This has already been discussed a lot, so I won’t get into greater detail, I’ll just focus on the main points.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Creating a new project&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When creating a new Silverlight project, Visual Studio will ask you about creating the accompanying web project as well. The web project will host our data services so it’s kind of important to leave it be.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Adding the entities projects&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Create two projects that will host the shared entities. One project will be referenced from the web project (server side), while the other one will be referenced from the Silverlight project (client side). Entity sharing is done in two steps. First is the physical sharing of the files – the “main” entity project would contain the original entity files, while the “supporting” entity project would only host copies of the entity files. Choosing “Add as Link” option in Visual Studio’s Add Item dialog will create a “copy” of the original file, meaning that you’re going to have to change the contents of the file in one place only, while it will be compiled in two different projects.&lt;/p&gt;  &lt;p&gt;A couple of notes: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I usually choose the server side entity project to include the original files, and the client side would include the linked files. &lt;/li&gt;    &lt;li&gt;When adding new entities to the main entity project, add the linked files to the other project &lt;em&gt;before&lt;/em&gt; regenerating the service proxy; creating the proxy before that will make a proxy copy of the entity class which may result in some confusion when working with that entity. &lt;/li&gt;    &lt;li&gt;It’s a good thing to declare your entity classes as partial, because you can later extend them with specific functionality on either server or client side. &lt;/li&gt;    &lt;li&gt;When I started on my LOB apps several months ago, I had the following rule regarding marking entities with WCF serialization attributes: when all properties are going to be serialized, don’t mark any; when at least one shouldn’t be serialized, mark those, which should be. Later in the project I found out that it’s much more future-proof and consistent to &lt;em&gt;always&lt;/em&gt; mark properties with proper serialization attributes. &lt;/li&gt;    &lt;li&gt;As I’m seeing this is not a general practice with Silverlight developers, I still always separate the WCF contract (interface) from the service implementation. We’ll se how/if we can benefit from such approach later in the series. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So far, the solution looks like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="solution" border="0" alt="solution" src="http://tozon.info/images/blog/AdventuresinSilverlightLOBThebeginning_BAE3/image.png" width="204" height="381" /&gt; &lt;/p&gt;  &lt;p&gt;We started with a single entity called Person and the DemoService will be used to access the “database”. To keep it simple, the Database class will pose as an in-memory database.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Creating the client&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The sample app uses a typical MVVM approach – a ViewModel, instantiating a service proxy and handling the communication with the service, with a View, responsible for displaying the data. The user can browse through the list of persons by clicking their name in the ListBox, while full details are being displayed next to it. I’m not using any real commanding yet, ListBox’s SelectedItem is bound two-way to appropriate VM property, which is also the source for the detail UI. All-in-all, very basic and common setup, which will be the starting ground for all next articles in the series. In the next part, we’ll add a support for editing a Person entity.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/lobdemo/1/" target="_blank"&gt;Run the application&lt;/a&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f08%2f26%2fAdventures-in-Silverlight-LOB-The-beginning.aspx&amp;amp;title=Adventures+in+Silverlight+LOB%3a+The+beginning"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/08/26/Adventures-in-Silverlight-LOB-The-beginning.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=SM3tjVeDzvE:Iyp9eoy9GBg:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=SM3tjVeDzvE:Iyp9eoy9GBg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=SM3tjVeDzvE:Iyp9eoy9GBg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=SM3tjVeDzvE:Iyp9eoy9GBg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=SM3tjVeDzvE:Iyp9eoy9GBg:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/SM3tjVeDzvE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/SM3tjVeDzvE/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/08/26/Adventures-in-Silverlight-LOB-The-beginning.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=a5ff6d60-2f10-44f6-80ec-76e8cba71584</guid>
      <pubDate>Wed, 26 Aug 2009 05:04:02 -0700</pubDate>
      <category>Silverlight</category>
      <category>Development</category>
      <category>MVVM</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=a5ff6d60-2f10-44f6-80ec-76e8cba71584</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=a5ff6d60-2f10-44f6-80ec-76e8cba71584</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/08/26/Adventures-in-Silverlight-LOB-The-beginning.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=a5ff6d60-2f10-44f6-80ec-76e8cba71584</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=a5ff6d60-2f10-44f6-80ec-76e8cba71584</feedburner:origLink></item>
    <item>
      <title>Silverlight, Prism EventAggregator and “lost events”</title>
      <description>&lt;p&gt;I’ve just started discovering &lt;a href="http://compositewpf.codeplex.com/" target="_blank"&gt;Prism&lt;/a&gt;, mainly as a tool to help me use the MVVM with my apps. That said, by now, Prism proved itself with:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Support for Commanding &lt;/li&gt;    &lt;li&gt;EventAggregator &lt;/li&gt;    &lt;li&gt;&lt;a href="http://unity.codeplex.com/" target="_blank"&gt;Unity&lt;/a&gt; integration &lt;/li&gt;    &lt;li&gt;Targeting both WPF and Silverlight &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;EventAggregator is great for inter-VM communication, but only when subscribing VM(s) is/are alive (instantiated) when publishing VM publishes the event. I may be wrong here (please somebody correct me), but I haven’t found a way for a newly instantiated subscriber VM get to already broadcasted event, which was published before the instantiation. The example here would be a new dialog window, with its VM wanting the last value that parent’s VM published before dialog was created (a selected ListBox value, for example). Sure, the publisher could publish the same event again after the dialog is created, but this would confuse things up because there may be other listeners subscribed to it and perhaps wouldn’t know how to handle the exact same event.&lt;/p&gt;  &lt;p&gt;To solve this issue, I created a new class, deriving from the &lt;em&gt;CompositePresentationEvent&amp;lt;T&amp;gt;&lt;/em&gt; and called it &lt;em&gt;CachingCompositePresentationEvent&amp;lt;T&amp;gt;.&lt;/em&gt; The implementation is simple:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;public class CachingCompositePresentationEvent&amp;lt;T&amp;gt; : CompositePresentationEvent&amp;lt;T&amp;gt;
{
    public bool HasValue { get; private set; }

    private T lastPayload;
    public T LastPayload
    {
        get
        {
            if (!HasValue)
            {
                throw new InvalidOperationException();
            }
            return lastPayload; 
        }
        private set
        {
            lastPayload = value;
            HasValue = true;
        }   
    }

    public override void Publish(T payload)
    {
        LastPayload = payload;
        base.Publish(payload);
    }
}&lt;/pre&gt;

&lt;p&gt;The HasValue will return true when at least one event was published at the time, and LastPayload will return the payload, included in the last published event.&lt;/p&gt;

&lt;p&gt;If the event is declared as:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class MyCachingEvent : CachingCompositePresentationEvent&amp;lt;int&amp;gt; { }&lt;/pre&gt;

&lt;p&gt;… then getting to its value would be:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;MyCachingEvent ev = aggregator.GetEvent&amp;lt;MyCachingEvent&amp;gt;();
if (ev.HasValue)
{
    int value = ev.LastPayload;
}&lt;/pre&gt;

&lt;p&gt;This is the basics, there's plenty of room for improvement - like adding a Clear() method to clear the last payload value or clear it automatically on the first LastPayload read - just to clear the memory, when payload types aren’t simple/small.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f07%2f27%2fSilverlight-Prism-EventAggregator-and-e2809clost-eventse2809d.aspx&amp;amp;title=Silverlight%2c+Prism+EventAggregator+and+%e2%80%9clost+events%e2%80%9d"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/07/27/Silverlight-Prism-EventAggregator-and-e2809clost-eventse2809d.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MBJmbMH2wUI:gAlehbJ8xNM:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MBJmbMH2wUI:gAlehbJ8xNM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MBJmbMH2wUI:gAlehbJ8xNM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=MBJmbMH2wUI:gAlehbJ8xNM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=MBJmbMH2wUI:gAlehbJ8xNM:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/MBJmbMH2wUI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/MBJmbMH2wUI/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/27/Silverlight-Prism-EventAggregator-and-e2809clost-eventse2809d.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=7175b133-7d9f-4487-8aea-b64c1718a8be</guid>
      <pubDate>Mon, 27 Jul 2009 18:04:45 -0700</pubDate>
      <category>Silverlight</category>
      <category>Development</category>
      <category>MVVM</category>
      <category>WPF</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=7175b133-7d9f-4487-8aea-b64c1718a8be</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=7175b133-7d9f-4487-8aea-b64c1718a8be</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/27/Silverlight-Prism-EventAggregator-and-e2809clost-eventse2809d.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=7175b133-7d9f-4487-8aea-b64c1718a8be</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=7175b133-7d9f-4487-8aea-b64c1718a8be</feedburner:origLink></item>
    <item>
      <title>Countdown to Silverlight 3 #15: UI Virtualization</title>
      <description>&lt;p&gt;Silverlight 3 includes a new type of a &lt;em&gt;StackPanel&lt;/em&gt;, called &lt;em&gt;VirtualizingStackPanel&lt;/em&gt;. &lt;em&gt;VirtualizingStackPanel&lt;/em&gt; enables &lt;a href="http://www.wpfwiki.com/WPF%20Q4.3.ashx" target="_blank"&gt;UI virtualization&lt;/a&gt; and is now the default items panel for the &lt;em&gt;ListBox&lt;/em&gt;, with virtualization option enabled. &lt;/p&gt;  &lt;p&gt;If you want to turn UI virtualization in &lt;em&gt;ListBox&lt;/em&gt; to off, set its &lt;em&gt;&lt;em&gt;VirtualizingStackPanel&lt;/em&gt;.VirtualizationMode&lt;/em&gt; to &lt;em&gt;Standard&lt;/em&gt; (the default is &lt;em&gt;Recycling&lt;/em&gt;). The embedded &lt;em&gt;VirtualizingStackPanel&lt;/em&gt; will in this case behave as a plain old StackPanel.&lt;/p&gt;  &lt;p&gt;Other controls that &lt;em&gt;VirtualizingStackPanel&lt;/em&gt; can be used with are &lt;em&gt;ItemsControl&lt;/em&gt; and &lt;em&gt;ListView&lt;/em&gt;. It can’t be used on its own (like you would put in on a page and manually cram it with a couple thousand of items as you would with ordinary &lt;em&gt;StackPanel&lt;/em&gt;), but the interesting thing is it is derived from an abstract class called &lt;em&gt;VirtualizingPanel&lt;/em&gt;, which means the ability to create new kinds of virtualizing panels (!)&lt;/p&gt;  &lt;p&gt;The following example shows the difference between Virtualization modes. I intentionally created a heavier item template for the UI, so difference would be more obvious. Try scrolling both ListBoxes to see how UI virtualization impacts the scrolling performance.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="UI Virtualization" border="0" alt="UI Virtualization" src="http://tozon.info/images/blog/CountdowntoSilverlight315UIVirtualizatio_150F3/image.png" width="550" height="286" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/" target="_blank"&gt;Run the application online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2ftozon.info%2fblog%2fpost%2f2009%2f07%2f15%2fCountdown-to-Silverlight-3-15-UI-Virtualization.aspx&amp;amp;title=Countdown+to+Silverlight+3+%2315%3a+UI+Virtualization"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://tozon.info/blog/post/2009/07/15/Countdown-to-Silverlight-3-15-UI-Virtualization.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=81TSFeQX5P8:T0h_pwzjDTY:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=81TSFeQX5P8:T0h_pwzjDTY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=81TSFeQX5P8:T0h_pwzjDTY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=81TSFeQX5P8:T0h_pwzjDTY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=81TSFeQX5P8:T0h_pwzjDTY:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/81TSFeQX5P8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/81TSFeQX5P8/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/15/Countdown-to-Silverlight-3-15-UI-Virtualization.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=842660f0-6cbb-43bc-9bca-e456da491308</guid>
      <pubDate>Wed, 15 Jul 2009 15:36:31 -0700</pubDate>
      <category>Development</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=842660f0-6cbb-43bc-9bca-e456da491308</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=842660f0-6cbb-43bc-9bca-e456da491308</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/15/Countdown-to-Silverlight-3-15-UI-Virtualization.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=842660f0-6cbb-43bc-9bca-e456da491308</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=842660f0-6cbb-43bc-9bca-e456da491308</feedburner:origLink></item>
    <item>
      <title>Countdown to Silverlight 3 #14: Selector.IsSynchronizedWithCurrentItem</title>
      <description>&lt;p&gt;Silverlight 3 puts the ICollectionView interface to some serious use and brings us the CollectionViewSource class, which provides a &lt;em&gt;view&lt;/em&gt; on top of the data collection, meaning you can sort, filter or group your items within your view, without actually changing the underlying data. One artifact, coming with the class, is the IsSynchronizedWithCurrentItem property, which enhances the collection with a notion of a currently selected item. When Selector’s IsSynchronizedWithCurrentItem property is set to true, all other controls, bound to the same collection, are kept in sync with the selected item. Silverlight’s implementation is a bit different than WPF’s. You can’t set IsSynchronizedWithCurrentItem property to true by yourself, the value is determined from your Items source. If it implements the ICollectionView interface, then it’s going to be synchronized, unless explicitly turned off (with setting the property to false).&lt;/p&gt;  &lt;p&gt;For this example, I created three ListBoxes, all bound to the CollectionViewSource. Two of them are kept in sync, the third one is not because it’s IsSynchronizedWithCurrentItem property is set to false. I put up a few additional TextBlocks, bound to other item properties, to show the synchro-magic going on behind all this.&lt;/p&gt;  &lt;p&gt;There’s more to ICollectionView interface, but that’s also another post…&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="" border="0" alt="" src="http://tozon.info/images/blog/Countdow.IsSySynchronizedWithCurrentItem_233D/image.png" width="600" height="300" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/" target="_blank"&gt;Run the application online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-14-SelectorIsSynchronizedWithCurrentItem.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-14-SelectorIsSynchronizedWithCurrentItem.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Azde9OG8jyA:Q-1H6DL2Osw:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Azde9OG8jyA:Q-1H6DL2Osw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Azde9OG8jyA:Q-1H6DL2Osw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=Azde9OG8jyA:Q-1H6DL2Osw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=Azde9OG8jyA:Q-1H6DL2Osw:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/Azde9OG8jyA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/Azde9OG8jyA/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-14-SelectorIsSynchronizedWithCurrentItem.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=e1a3c3e9-0483-4137-9e6c-8b3412a33277</guid>
      <pubDate>Sun, 12 Jul 2009 18:09:26 -0700</pubDate>
      <category>Silverlight</category>
      <category>Development</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=e1a3c3e9-0483-4137-9e6c-8b3412a33277</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=e1a3c3e9-0483-4137-9e6c-8b3412a33277</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-14-SelectorIsSynchronizedWithCurrentItem.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=e1a3c3e9-0483-4137-9e6c-8b3412a33277</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=e1a3c3e9-0483-4137-9e6c-8b3412a33277</feedburner:origLink></item>
    <item>
      <title>Countdown to Silverlight 3 #13: Bitmap effects</title>
      <description>&lt;p&gt;Silverlight 3 shipped with 2 built-in bitmap effects that can be applied to any UIElement – those are DropShadow and Blur. But not to worry, we can create and use a lot more effects, because these are pixel shaders, compatible with the ones built for WPF. There are quite a few WPF (now even including SL support) effects libraries out there and I will be looking at those in one of the future posts. This time, it’s only this simple and very straightforward example, showing off the two built-in effects.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SL3 Bitmap effects" border="0" alt="SL3 Bitmap effects" src="http://tozon.info/images/blog/CountdowntoSilverlight313Bitmapeffects_146C1/image.png" width="188" height="150" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/" target="_blank"&gt;Run the application online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-13-Bitmap-effects.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-13-Bitmap-effects.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=xY9oGl3JNGA:JrXqRc0I0fE:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=xY9oGl3JNGA:JrXqRc0I0fE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=xY9oGl3JNGA:JrXqRc0I0fE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=xY9oGl3JNGA:JrXqRc0I0fE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=xY9oGl3JNGA:JrXqRc0I0fE:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/xY9oGl3JNGA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/xY9oGl3JNGA/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-13-Bitmap-effects.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=ff519716-ff53-4151-82f0-fe5d54eb9a06</guid>
      <pubDate>Sun, 12 Jul 2009 14:36:42 -0700</pubDate>
      <category>Development</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=ff519716-ff53-4151-82f0-fe5d54eb9a06</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=ff519716-ff53-4151-82f0-fe5d54eb9a06</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-13-Bitmap-effects.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=ff519716-ff53-4151-82f0-fe5d54eb9a06</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=ff519716-ff53-4151-82f0-fe5d54eb9a06</feedburner:origLink></item>
    <item>
      <title>Countdown to Silverlight 3 #12: ClearType font rendering</title>
      <description>&lt;p&gt;Text readability is very important for any LOB application and since Silverlight 3 is aimed towards creating LOB apps, Microsoft decided to address the readability issue by supporting &lt;a href="http://en.wikipedia.org/wiki/ClearType" target="_blank"&gt;ClearType&lt;/a&gt; in the final SL3 release. The best thing is – it’s on by default, but you can turn it off when you’re about to perform some kind of animation with it. Turning the ClearType off will improve the text rendering performance when animating it, since antialiasing requires some additional calculations and performing that for several times per second might result in a jerky animation. To turn the rendering optimization off, set the &lt;em&gt;TextOptions.TextHintingMode&lt;/em&gt; property to &lt;em&gt;Animated.&lt;/em&gt; To turn it back on after you’re done with the animation, you can either clear the property or set it to &lt;em&gt;Fixed&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/images/blog/CountdowntoSilverlight312ClearTypefontre_14222/image.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="SL3 ClearType" border="0" alt="SL3 ClearType" src="http://tozon.info/images/blog/CountdowntoSilverlight312ClearTypefontre_14222/image_thumb.png" width="550" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/" target="_blank"&gt;Run the application online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-12-ClearType-font-rendering.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-12-ClearType-font-rendering.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=ZlESLwVLR2I:yogywrndeac:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=ZlESLwVLR2I:yogywrndeac:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=ZlESLwVLR2I:yogywrndeac:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=ZlESLwVLR2I:yogywrndeac:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=ZlESLwVLR2I:yogywrndeac:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/ZlESLwVLR2I" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/ZlESLwVLR2I/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-12-ClearType-font-rendering.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=268909fa-c8e5-42fd-b91e-6117afd1332e</guid>
      <pubDate>Sun, 12 Jul 2009 14:35:56 -0700</pubDate>
      <category>Development</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=268909fa-c8e5-42fd-b91e-6117afd1332e</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=268909fa-c8e5-42fd-b91e-6117afd1332e</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-12-ClearType-font-rendering.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=268909fa-c8e5-42fd-b91e-6117afd1332e</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=268909fa-c8e5-42fd-b91e-6117afd1332e</feedburner:origLink></item>
    <item>
      <title>Countdown to Silverlight 3 #11: Writeable Bitmap</title>
      <description>&lt;p&gt;Want to create a new bitmap image in Silverlight? Want to capture a part of your application and use it as a brush? Silverlight has an answer for you – WriteableBitmap is a BitmapSource-derived class that you can manipulate in the runtime, either by rendering UI elements on it or by manipulating pixels manually. The example (below) will show how to capture a movie frame or an entry form, along with altering some pixels on the captured image – try moving your mouse over either of the captured images.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tozon.info/sl3/" target="_blank"&gt;Run the application online&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Source code below:    &lt;br /&gt;&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 66px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-d34608bce9688fba.skydrive.live.com/embedrowdetail.aspx/Public/Development/Samples/Silverlight3.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 4px 4px 4px;"&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-11-Writeable-Bitmap.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-11-Writeable-Bitmap.aspx&amp;amp;bgcolor=0080C0&amp;amp;fgcolor=FFFFFF&amp;amp;border=000000&amp;amp;cbgcolor=D4E1ED&amp;amp;cfgcolor=000000" border="0/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=X5fxYdoOEXE:_P0YQXI-t4s:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=X5fxYdoOEXE:_P0YQXI-t4s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=X5fxYdoOEXE:_P0YQXI-t4s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?i=X5fxYdoOEXE:_P0YQXI-t4s:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:V-t1I-SPZMU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=V-t1I-SPZMU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheAttic?a=X5fxYdoOEXE:_P0YQXI-t4s:Jwdi1b3fU3Q"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheAttic?d=Jwdi1b3fU3Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheAttic/~4/X5fxYdoOEXE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/TheAttic/~3/X5fxYdoOEXE/post.aspx</link>
      <author>andrej</author>
      <comments>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-11-Writeable-Bitmap.aspx#comment</comments>
      <guid isPermaLink="false">http://www.tozon.info/blog/post.aspx?id=fa06889c-abaa-4414-8a93-c36e9eb152ac</guid>
      <pubDate>Sun, 12 Jul 2009 14:34:40 -0700</pubDate>
      <category>Development</category>
      <category>Silverlight</category>
      <dc:publisher>andrej</dc:publisher>
      <pingback:server>http://www.tozon.info/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.tozon.info/blog/post.aspx?id=fa06889c-abaa-4414-8a93-c36e9eb152ac</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.tozon.info/blog/trackback.axd?id=fa06889c-abaa-4414-8a93-c36e9eb152ac</trackback:ping>
      <wfw:comment>http://www.tozon.info/blog/post/2009/07/12/Countdown-to-Silverlight-3-11-Writeable-Bitmap.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.tozon.info/blog/syndication.axd?post=fa06889c-abaa-4414-8a93-c36e9eb152ac</wfw:commentRss>
    <feedburner:origLink>http://www.tozon.info/blog/post.aspx?id=fa06889c-abaa-4414-8a93-c36e9eb152ac</feedburner:origLink></item>
  </channel>
</rss>
