Light Up the Web

Blog about programming in Silverlight

  Home  |   Contact  |   Syndication    |   Login
  24 Posts | 0 Stories | 45 Comments | 0 Trackbacks

News

My post about Deep Zoom Composer was recommended by Scott Guthrie! :) (see here)

Archives

About Me

News

Who was here

If you are interested in my last post about "How to center and scale Silverlight applications using ViewBox control", I just published behavior that you can use instead of making changes in code.

How it works?

1. Download behavior (http://gallery.expression.microsoft.com/en-us/CenterAndScale )

2. Add dll to your application

<UserControl .....
    xmlns:interaction="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"       
    xmlns:behavior="clr-namespace:CenterAncScaleBehavior;assembly=CenterAncScaleBehavior"  .... >

    <interaction:Interaction.Behaviors>
        <behavior:CenterAncScaleBehavior />
    </interaction:Interaction.Behaviors>


    <Grid > ... </Grid>

</UserControl>

3. DONE! Your application is ready!

 

Watch movie to see how it works (66 seconds):

See examples

Application without "Center And Scale Behavior":  http://bit.ly/cVinEC

Application with "Center And Scale Behavior":  http://bit.ly/ba8UsI

 

Source code and dlls

http://gallery.expression.microsoft.com/en-us/CenterAndScale

 

Cheers!

Jacek Ciereszko

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Sunday, May 02, 2010 9:42 PM