<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Corrado's BLogs</title>
        <link>http://blogs.ugidotnet.org/ccavalli/Default.aspx</link>
        <description>Online thoughts of a .NET Funatic</description>
        <language>en-US</language>
        <copyright>Corrado Cavalli</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <image>
            <title>Corrado's BLogs</title>
            <url>http://blogs.ugidotnet.org/images/RSS2Image.gif</url>
            <link>http://blogs.ugidotnet.org/ccavalli/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Model-View-ViewModel: Slides and Demos</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx</link>
            <description>&lt;p&gt;I’ve had talk at recent &lt;a href="http://www.ugidotnet.org/News/Detail/34625b4b-6861-443a-b9c0-7bde72eeb960" target="_blank"&gt;Technical After Hours 2008&lt;/a&gt; named &lt;strong&gt;WPF in Action&lt;/strong&gt; dedicated &lt;strong&gt;Model-View-ViewModel&lt;/strong&gt; pattern in WPF, so, as promised, here you can find associated slides and demos.     &lt;br /&gt;Slides are in Italian so they probably won’t help you much but demos are all in English (comments included) so you may find it more interesting.     &lt;br /&gt;Demos follow a specific order to describe the evolution from a classical winform style application to a final solution totally based on M-V-VM.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Trivial application that use Databinding to visualize a list of bikes. &lt;/li&gt;    &lt;li&gt;Evolution of previous app that uses a control template that firstly introduces some of classical approach limitations. &lt;/li&gt;    &lt;li&gt;First approach to M-V-VM pattern, incomplete under some aspects. &lt;/li&gt;    &lt;li&gt;Migration of remaining part that uses WPF commanding model. &lt;/li&gt;    &lt;li&gt;Test project for point 4. &lt;/li&gt;    &lt;li&gt;Full application that includes navigation and necessary tricks to use M-V-VM in real world applications. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Have fun!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeworks.it/public/tah08/Slides.zip" target="_blank"&gt;Slides&lt;/a&gt; – &lt;a href="http://www.codeworks.it/public/tah08/Demos.zip" target="_blank"&gt;Demo&lt;/a&gt;&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:359857c4-497c-4912-b51e-12b39a4b1451" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Model-View-ViewModel" rel="tag"&gt;Model-View-ViewModel&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/94720.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx</guid>
            <pubDate>Fri, 21 Nov 2008 11:52:44 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx#feedback</comments>
            <slash:comments>276</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/94720.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/94720.aspx</trackback:ping>
        </item>
        <item>
            <title>Find databinding mistakes using PresentationTracesources.TraceLevel in Fx 3.5</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2008/04/03/92032.aspx</link>
            <description>&lt;p&gt;Debugging WPF databinding problems can be sometimes a painful experience: consider this simple XAML fragment and its codebehind that doesn’t work due to mistakenly typed &lt;i&gt;CustomerName&lt;/i&gt; inside binding expression.&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;lt;Window x:Class=&lt;span style="color: #006080"&gt;"WPF_Databind.Window1"&lt;/span&gt;
    xmlns=&lt;span style="color: #006080"&gt;"http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
    xmlns:x=&lt;span style="color: #006080"&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/a&gt;&lt;/span&gt;             
    Title=&lt;span style="color: #006080"&gt;"Window1"&lt;/span&gt; Height=&lt;span style="color: #006080"&gt;"300"&lt;/span&gt; Width=&lt;span style="color: #006080"&gt;"00"&lt;/span&gt;&amp;gt;
    &amp;lt;Grid&amp;gt;
        &amp;lt;TextBox 
            Text=&lt;span style="color: #006080"&gt;"{Binding Path=CustomerName}"&lt;/span&gt;
            Height=&lt;span style="color: #006080"&gt;"23"&lt;/span&gt; Margin=&lt;span style="color: #006080"&gt;"87,65,71,0"&lt;/span&gt; Name=&lt;span style="color: #006080"&gt;"textBox1"&lt;/span&gt; VerticalAlignment=&lt;span style="color: #006080"&gt;"Top"&lt;/span&gt; /&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/Window&amp;gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; WPF_Databind
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Window1 : Window
    {
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Window1 ()
        {
            InitializeComponent();
            &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.DataContext = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Customer() { Name = &lt;span style="color: #006080"&gt;"Foo"&lt;/span&gt;, Id = 42 };
        }
    }

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Customer
    {
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name { get; set; }
        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; Id { get; set; }    
    }
}&lt;/p&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Running this sample results in an empty Textbox: how do we get hints about what’s wrong with it? , the only place where we can look for a possible reason is Visual Studio output window (see below) and among various output messages search for some useful information like:&lt;/p&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="2"&gt;System.Windows.Data Error: 35 : BindingExpression path error: 'CustomerName' property not found on 'object' ''Customer' (HashCode=22613453)'. BindingExpression:Path=CustomerName; DataItem='Customer' (HashCode=22613453); target element is 'TextBox' (Name='textBox1'); target property is 'Text' (type 'String')&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;In some cases this wouldn’t help you much and you’d like to have more details about what’s wrong with your databinding, well starting from .NET Framework 3.5 you can thanks to &lt;strong&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.diagnostics.presentationtracesources.aspx" target="_blank"&gt;PresentationTraceSources&lt;/a&gt;&lt;/strong&gt; class. 

  &lt;br /&gt;Let’s modify our previous sample importing System.Diagnostics namespace (that’s where PresentationTraceSources lives even if hosted inside WindowsBase assembly) and applying it to our failing binding.&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Window&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="WPF_Databind.Window1"&lt;/span&gt;
    &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;
    &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;
        &lt;span style="color: #ff0000"&gt;xmlns:diag&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="clr-namespace:System.Diagnostics;assembly=WindowsBase"&lt;/span&gt;                
    &lt;span style="color: #ff0000"&gt;Title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Window1"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="300"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="300"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; 
            &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{Binding Path=CustomerName,diag:PresentationTraceSources.TraceLevel=High}"&lt;/span&gt;
            &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="23"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="87,65,71,0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="textBox1"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Top"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Window&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Running sample again we can see a more verbose description of what really happens behind our binding:&lt;/p&gt;

&lt;p&gt;&lt;font face="Times New Roman" size="2"&gt;System.Windows.Data Warning: 47 : Created BindingExpression (hash=14421545) for Binding (hash=33163964) 
    &lt;br /&gt;System.Windows.Data Warning: 49 : Path: 'CustomerName' 

    &lt;br /&gt;System.Windows.Data Warning: 51 : BindingExpression (hash=14421545): Default mode resolved to TwoWay 

    &lt;br /&gt;System.Windows.Data Warning: 52 : BindingExpression (hash=14421545): Default update trigger resolved to LostFocus 

    &lt;br /&gt;System.Windows.Data Warning: 53 : BindingExpression (hash=14421545): Attach to System.Windows.Controls.TextBox.Text (hash=35567111)System.Windows.Data Warning: 58 : BindingExpression (hash=14421545): Resolving source 

    &lt;br /&gt;System.Windows.Data Warning: 61 : BindingExpression (hash=14421545): Found data context element: TextBox (hash=35567111) (OK) 

    &lt;br /&gt;System.Windows.Data Warning: 62 : BindingExpression (hash=14421545): DataContext is null 

    &lt;br /&gt;System.Windows.Data Warning: 56 : BindingExpression (hash=14421545): Resolve source deferred 

    &lt;br /&gt;'WPF_Databind.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\PresentationFramework.Aero\3.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll' 

    &lt;br /&gt;System.Windows.Data Warning: 58 : BindingExpression (hash=14421545): Resolving source 

    &lt;br /&gt;System.Windows.Data Warning: 61 : BindingExpression (hash=14421545): Found data context element: TextBox (hash=35567111) (OK) 

    &lt;br /&gt;System.Windows.Data Warning: 69 : BindingExpression (hash=14421545): Activate with root item Customer (hash=1669504) 

    &lt;br /&gt;System.Windows.Data Warning: 98 : BindingExpression (hash=14421545): At level 0 - for Customer.CustomerName found accessor &amp;lt;null&amp;gt; 

    &lt;br /&gt;System.Windows.Data Error: 35 : BindingExpression path error: 'CustomerName' property not found on 'object' ''Customer' (HashCode=1669504)'. BindingExpression:Path=CustomerName; DataItem='Customer' (HashCode=1669504); target element is 'TextBox' (Name='textBox1'); target property is 'Text' (type 'String') 

    &lt;br /&gt;System.Windows.Data Warning: 71 : BindingExpression (hash=14421545): TransferValue - got raw value {DependencyProperty.UnsetValue} 

    &lt;br /&gt;System.Windows.Data Warning: 77 : BindingExpression (hash=14421545): TransferValue - using fallback/default value '' 

    &lt;br /&gt;System.Windows.Data Warning: 78 : BindingExpression (hash=14421545): TransferValue - using final value ''&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Available values for TraceLevel property are &lt;em&gt;None&lt;/em&gt;,&lt;em&gt;Low&lt;/em&gt;, &lt;em&gt;Medium&lt;/em&gt; and &lt;em&gt;High&lt;/em&gt; which result in different tracing details, and of course, don’t forget to remove it before releasing the application.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Note for Expression Blend users&lt;/b&gt; 

  &lt;br /&gt;It looks like that both Expression Blend 2.0 and 2.5 don’t recognize TraceLevel property so you won’t be able to see the artboard in presence of this attibute, but this will certainly be fixed in future releases.&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/92032.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2008/04/03/92032.aspx</guid>
            <pubDate>Thu, 03 Apr 2008 09:58:03 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2008/04/03/92032.aspx#feedback</comments>
            <slash:comments>1035</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/92032.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/92032.aspx</trackback:ping>
        </item>
        <item>
            <title>Wanna fix this? :-)</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/08/28/46815.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;A href="http://shortcircuited.wordpress.com/2006/08/07/sandcastle-builder/"&gt;Here&lt;/A&gt; I've found an interesting GUI for Sandcastle built by an&amp;nbsp;MVP&amp;nbsp;named &lt;STRONG&gt;Conrad&lt;/STRONG&gt; (sounds familiar uh?) did a quick test and looks very promising, unfortunately it has some compiler issues and final chm is not generated.&lt;BR&gt;Author lacks time for investigating problem further so he was kind enough to &lt;A href="http://www.thinkersroom.com/Builder.zip"&gt;publish&lt;/A&gt; source code (C#)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Is anyone willing to catch the challenge?&amp;nbsp;&lt;IMG src="http://messenger.msn.com/Resource/emoticons/wink_smile.gif"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/46815.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/08/28/46815.aspx</guid>
            <pubDate>Mon, 28 Aug 2006 16:15:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/08/28/46815.aspx#feedback</comments>
            <slash:comments>670</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/46815.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/46815.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Vista Desktop Window Manager</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/03/06/36234.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;An interesting &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/greg_schechter/archive/2006/03/05/544314.aspx"&gt;&lt;FONT face=Verdana size=2&gt;post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; from Greg Schechter about Windows Vista's Desktop Window Manager and how it will change the way application deal with WM_PAINT.&lt;/FONT&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/36234.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/03/06/36234.aspx</guid>
            <pubDate>Mon, 06 Mar 2006 20:15:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/03/06/36234.aspx#feedback</comments>
            <slash:comments>55</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/36234.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/36234.aspx</trackback:ping>
        </item>
        <item>
            <title>XamlMigrate</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/26/35639.aspx</link>
            <description>&lt;FONT face=Verdana size=2&gt;Rob Reylea has posted a &lt;STRONG&gt;XamlMigrate&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://robrelyea.com/tools/XamlMigrate/Default.htm"&gt;&lt;FONT face=Verdana size=2&gt;tool&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; that helps migration of Xaml files to Feb CTP, really nice job!&lt;/FONT&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/35639.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/26/35639.aspx</guid>
            <pubDate>Sun, 26 Feb 2006 18:33:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/26/35639.aspx#feedback</comments>
            <slash:comments>144</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/35639.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/35639.aspx</trackback:ping>
        </item>
        <item>
            <title>WinFX Feb CTP Available</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/22/35417.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;WinFX Feb CTP has just been &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F51C4D96-9AEA-474F-86D3-172BFA3B828B&amp;amp;displaylang=en"&gt;&lt;FONT face=Verdana size=2&gt;released&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;No EID (Sparkle) available yet for this CTP but it will be soon :-)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;A href="http://blogs.msdn.com/karstenj/archive/2006/02/22/537049.aspx"&gt;Karsten&lt;/A&gt; has an interesting list of breaking changes.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/35417.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/22/35417.aspx</guid>
            <pubDate>Wed, 22 Feb 2006 22:07:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/22/35417.aspx#feedback</comments>
            <slash:comments>78</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/35417.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/35417.aspx</trackback:ping>
        </item>
        <item>
            <title>Upcoming XAML changes</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/18/35079.aspx</link>
            <description>&lt;P&gt;&lt;A href="http://www.longhornblogs.com/rrelyea/default.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Rob Reylea&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;&lt;FONT face=Verdana size=2&gt;announces some &lt;A href="http://www.longhornblogs.com/rrelyea/archive/2006/02/14/XamlMigrator.aspx"&gt;changes&lt;/A&gt; that we're gonna find on next WPF&amp;nbsp;CTP.&lt;BR&gt;Apart renaming renaming of xml urins it looks like that we won't need PI instructions anymore for CLR mapping, really hope Cider will handle this better as it does now...&lt;BR&gt;Happy to read that an upgrade tool will be available...&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/35079.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/18/35079.aspx</guid>
            <pubDate>Sat, 18 Feb 2006 15:02:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/18/35079.aspx#feedback</comments>
            <slash:comments>1004</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/35079.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/35079.aspx</trackback:ping>
        </item>
        <item>
            <title>EID: Applying style using triggers</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/15/34942.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;#8220;In XAML you can define a style and have it applied based on an Event,Property or DataBinding property change.&lt;BR&gt;To give you an idea, here's a XAML fragment that sets some properties of a button when mouse is over it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;EM&gt;&amp;lt;Style TargetType="{x:Type Button}"&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Style.Triggers&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Trigger Property="IsMouseOver" Value="True"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property="FontSize" Value="20" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property="Foreground" Value="Red" /&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Trigger&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/Style.Triggers&amp;gt;&lt;BR&gt;&amp;lt;/Style&amp;gt;&lt;BR&gt;&lt;/EM&gt;&lt;BR&gt;To have the same result using EID (a.k.a &amp;#8220;Sparkle&amp;#8221;) you have to follow some steps.&lt;BR&gt;Let's try, as demo, to have the background of a button changing when IsMouseOver property is true.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Start by drawing a button on scene's document root.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Right click and select to E&lt;STRONG&gt;dit&amp;nbsp;a copy of the style&lt;/STRONG&gt; (BTW: You can see the structure of original style on EID timeline)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Click on Timeline's &lt;STRONG&gt;Create new state&lt;/STRONG&gt; button, you should now have a new &lt;EM&gt;[No Triggers]&lt;/EM&gt; tab&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;On Timeline Properties Palette, press Add button and type &lt;STRONG&gt;IsMouseOver&lt;/STRONG&gt; on left textbox and &lt;STRONG&gt;true&lt;/STRONG&gt; on right one.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Now change the backcolor of the button, when finished press &lt;STRONG&gt;Return to scope root&lt;/STRONG&gt; button.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Test the scene&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You'll see backcolor change on MouseOver.&lt;BR&gt;Editing is far than complete, I'm still not able to edit some properties (e.g. Opacity) and looks like that Event/DataBiding triggers are still work in progress, but you should have an idea of how thing should work.&amp;#8221;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/34942.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/15/34942.aspx</guid>
            <pubDate>Wed, 15 Feb 2006 23:50:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/15/34942.aspx#feedback</comments>
            <slash:comments>130</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/34942.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/34942.aspx</trackback:ping>
        </item>
        <item>
            <title>Using BitmapEffects</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34655.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;#8220;You can easily apply effects like Blur or DropShadows to a UI element using BitmapEffects property.&lt;BR&gt;&lt;BR&gt;This xaml sample:&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;&amp;lt;Image HorizontalAlignment="Left" VerticalAlignment="Top" Source="cor.jpg"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;Image.BitmapEffect&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;BitmapEffectGroup&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;BitmapEffectGroup.Children&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BitmapEffectCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BlurBitmapEffect Radius="2"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DropShadowBitmapEffect/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/BitmapEffectCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/BitmapEffectGroup.Children&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/BitmapEffectGroup&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/Image.BitmapEffect&amp;gt;&lt;BR&gt;&amp;lt;/Image&amp;gt;&amp;nbsp;&lt;BR&gt;&amp;lt;TextBox Text="Hello WPF"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;TextBox.BitmapEffect&amp;gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &amp;lt;BitmapEffectGroup&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BitmapEffectGroup.Children&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;BitmapEffectCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;OuterGlowBitmapEffect GlowColor="Green" GlowSize="5" Noise="3"&amp;nbsp; /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DropShadowBitmapEffect/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/BitmapEffectCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/BitmapEffectGroup.Children&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/BitmapEffectGroup&amp;gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;/TextBox.BitmapEffect&amp;gt;&lt;BR&gt;&amp;lt;/TextBox&amp;gt;&lt;BR&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Produces this effect:&lt;BR&gt;&lt;IMG src="http://www.codeworks.it/public/wpf/bitmapfx.jpg"&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;As you can see various effects can be applied to the same element, just keep in mind that effects are processed in sequence so the order of appearance inside &lt;BITMAPEFFECTCOLLECTION&gt;counts.&amp;#8221;&lt;BR&gt;Unfortunately Sparkle does not support direct editing of this property yet.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/34655.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34655.aspx</guid>
            <pubDate>Fri, 10 Feb 2006 18:52:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34655.aspx#feedback</comments>
            <slash:comments>1126</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/34655.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/34655.aspx</trackback:ping>
        </item>
        <item>
            <title>Databinding using "Sparkle"</title>
            <link>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34625.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;How to create a user interface that displays data from an external DataSource using Expression Interactive Designer (&amp;#8220;Sparkle&amp;#8220;)&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Create a new Visual C# Library project named PersonsDataSource&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Remove Class1 and add both Person and Persons class (described in my previous blog)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Compile project, you should now&amp;nbsp;have a PersonsDataSource dll.&lt;BR&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Open Sparkle and create a new Project (File -&amp;gt;New Project) name it as you like.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Now let's add a reference to our PersonsDataSource.dll using Project-&amp;gt;Add Item to browse to the previously created assembly.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;You'll now see the dll listed under Project references.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Open the Data Palette (View-&amp;gt;Data) and select &lt;EM&gt;Add new CLR DataSource&lt;/EM&gt;, browse to PersonsDataSource and select Persons item, you should now see Persons listed inside Data palette.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Select Persons item from Data palette and drag it to Document root surface&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;You'll be asked to select how the Persons datasource will be displayed, select ListBox&amp;nbsp;and click Ok.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;The &lt;EM&gt;Create Data Template&lt;/EM&gt; appears: This dialog allows you to 'shape' the DataTemplate associated to Person object, you can select what items and what controls to map to various Person fields (in this case dialog defaults to TextBlocks) leave defaults and click Ok.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;You'll should see the listbox filled with Persons items.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;We now want to add 2 texboxes that will be populated with Listbox selected item.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Select Library palette and drag&amp;nbsp;two textboxes on DocumentRoot surface.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Select first texbox and, on Properties palette, click on Text field and select DataBind...&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;You'll now see the &lt;EM&gt;Create Data Binding dialog&lt;/EM&gt;, we need to bind to Listbox selected item so click on &lt;EM&gt;Element Property&lt;/EM&gt; and select ListBox.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Select SelectedItem among ListBox properties.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Listbox contains instances of Person classes so, select &lt;EM&gt;Use custom path expression&lt;/EM&gt; and type &amp;#8220;SelectedItem.Name&amp;#8221;&lt;EM&gt; &lt;/EM&gt;(without quotes)&amp;nbsp;on related textbox, then click Ok.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Do the same with other textbox using &amp;#8220;SelectedItem.Age&amp;#8221; as custom path expression.&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Press F5 and you'll see that selecting a listbox item selection will be reflected on both textboxes and that changes on textbox contents will be moved to underlying DataSource.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/34625.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Corrado Cavalli</dc:creator>
            <guid>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34625.aspx</guid>
            <pubDate>Fri, 10 Feb 2006 14:59:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/ccavalli/archive/2006/02/10/34625.aspx#feedback</comments>
            <slash:comments>3605</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/34625.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/34625.aspx</trackback:ping>
        </item>
    </channel>
</rss>