Dax Pandhi's nAESTHETIC Dax Pandhi's nAESTHETIC Dax Pandhi's nAESTHETIC Subscribe to this Blog's RSS feed Subscribe to my DeviantArt RSS feed

Popular art from my DeviantArt account:


  Tuesday, February 14, 2006


XAML/WPF Experiment: Zoom Functionality 2

In my previous post I showed some XAML code. I would like to point out that some of the code there looked a bit overcomplicated, but that was on purpose - since the code was taken from my app which require it to be that way for several reasons. Here's some alternate code:

<ScaleTransform CenterX="0" CenterY="0" ScaleX="{Binding Value, Mode=Default, ElementName=Slider}" ScaleY="{Binding Value, Mode=Default, ElementName=Slider}" />

Which replaces:

    <ScaleTransform CenterX="0" CenterY="0">
        <ScaleTransform.ScaleX>
            <Binding Mode="Default" Path="Value" ElementName="Slider"/>
        </ScaleTransform.ScaleX>
        <ScaleTransform.ScaleY>
            <Binding Mode="Default" Path="Value" ElementName="Slider"/>
        </ScaleTransform.ScaleY>
    </ScaleTransform>

This is nice. Creating UI in a markup language makes it SO much flexible for modifying existing stuff. It would give you hives in WinForms!









Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Copyright � 2005-2007 Dax Pandhi. All rights reserved.
designed by nukeation
Sign In