(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Articles

Page  
Items View

  • 0 comments  /  aggregated from  Tales from the Smart Client  on  Mar 21, 2006 (more than a year ago)   /   original article
    I was going to post something about the various levels you can use in WPF for graphics, but Pablo Fernicola beat me to it:  http://www.fernicola.org/loquitor/index.php?/archives/17-WPF-Pick-Your-API-Abstraction.html


  • 3 comments  /  aggregated from  Tales from the Smart Client  on  Mar 07, 2006 (more than a year ago)   /   original article

    CollectionView is a very interesting construct.  After including it in my ViewModel I meant to quickly blog about the usage...but when I started thinking about it and reading a bit more about it, it becomes even more interesting.  Lots of good blogging.  However, while I think about it, let me quickly make my original point.

    The Model has a simple List.  CollectionView wraps a Collection and adds concepts like selection, sorting and filtering to it and supports the INotify... goodness that data binding wants in order to do a really good job.

  • 0 comments  /  aggregated from  house of mirrors  on  Feb 10, 2006 (more than a year ago)   /   original article
    Rob Relyea from the Avalon team has a cool intro to 'attached properties', but sadly he doesn't go into the real fun you can have with attached properties. Basically they let you store data on arbitrary DependencyObjects, but the key is that they provide a callback whenever that data changes. Suddenly, this sealed to the hilt behemoth of an API can be extended.

    My current side project is to create my own set of extensible events and actions, but since EventTrigger and TriggerAction are sealed and give us non-Avalon folks no love, enter attached properties:


    <Rectangle Name='RedRect' Width='100' Height='66.6' Fill='Red'>
    <evt:Triggers.Triggers>
    <evt:PropertyTrigger Trigger='{Binding ElementName=RedRect, Path=IsMouseOver}' Value='True'>
    <evt:SetterAction Property='IsActive' Value='True' Target='{Binding}'/>
    <evt:MethodAction Method='Play' Target='{Binding ElementName=VideoFrame}'/>
    evt:PropertyTrigger>
    evt:Triggers.Triggers>
    Rectangle>


    So Triggers.Triggers is an attached property of a collection of Trigger objects.

Page