Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 516755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:45:51+00:00 2026-05-13T07:45:51+00:00

I just started learning SL. I have tried to resize all the elements inside

  • 0

I just started learning SL. I have tried to resize all the elements inside the canvas on its resize. But i cant find the right way.

this is what i did

  1. Iterate throgh the all child elements in canvas
  2. calaculate the scale X & Y based on the new size
  3. And multiply the scale values with each elements size properties

But in SL3.0 i dont find any size properties in UIelement to set the new size. below the sample code

    private void testCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
    {
        var scaleX = e.NewSize.Width / e.PreviousSize.Width;
        var scaleY = e.NewSize.Height / e.PreviousSize.Height;

        for (int i = 0; i < testCanvas.Children.Count; i++)
        {
            UIElement ui = testCanvas.Children[i];
            // but no ui.width or ui.height
        }
    }

Also i cant able to find an option to move each element to the new position relative to the size changed canvas…

can someone point me the right direction..

Update:

I wanted to achieve something like this in MSCUI .. For more clarity i have added some screenshots

This is how initial screen looks.
alt text http://img690.imageshack.us/img690/4611/initial.jpg

And on expanding widget, it gets zoomed and other widgets shrink

alt text http://img26.imageshack.us/img26/8725/afterexpand.jpg

I only need to do the zooing part. any ideas??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:45:51+00:00Added an answer on May 13, 2026 at 7:45 am

    The MSCUI demo is built by Martin grayson and he has published his Drag Dock control here: http://mightymeaty.members.winisp.net/blacklight.silverlight/ (there are also now some other TileView controls available now from Telerik and Infragistics that also perform the same cool layout functions). However by default this does not support automatic content resizing.

    Luckily there is a new control in the November 2009 Toolkit: ViewBox that will do what you need with minimal code.

    There is a demo of this at http://silverlight.net/content/samples/sl3/toolkitcontrolsamples/run/default.html. The ViewBox demo is at the bottom of the menu on the left.

    Toolkit can be downloaded from http://silverlight.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=36060

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started learning Ruby and just tried out my first hello world program
Just started learning Haskell. I have an empty source file with this inside: pe
I just started using/learning Python and have some questions. I have a text file
Hi I have just started learning WCF and I have encountered an error I
I have just started learning python version 3 and trying to create a file
I have just started learning Rails, is it required for me to learn CoffeeScript
I have just started learning Jquery and am new to writing javascript (I am
I have just started learning MVVM and having a dilemna. If I have a
I have just started learning NHibernate. Over the past few months I have been
I have just started learning Linux and Emacs. It was pleasant to have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.