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 8280917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:51:14+00:00 2026-06-08T09:51:14+00:00

I am new to WP7 / Silverlight / C# programming and I’m currently putting

  • 0

I am new to WP7 / Silverlight / C# programming and I’m currently putting together a simple magnifying app to get to grips with a few things. In order to provide ‘zoom in’ and ‘zoom out’ functionality I successfully managed to use a ScaleTransform on the UIElement which contains the video feed.

As I have developed the app further I realised that I want to accomodate the orientation changing during the use of the app and ensure that the video feed responds accordingly (The app is fixed in landscape mode but a user may want to ‘turn the phone over’ for some reason). To address this I created and applied a RotateTransform and linked into the OrientationChanged event.

All of this works fine but when I try to zoom (using the ScaleTransform) after I have changed the orientation then the video feed zooms but flips the feed back to the ‘default’ orientation and therefore show upside down.

Given this I figured I needed to apply both transforms when zooming in, so I created a TransformGroup and added the ScaleTransform and RotateTransform to it. However the zoom function will not work with this and none of the transform’s appear to be applied.

Has anybody else encountered problems when trying to apply a TransformGroup?

I’ve included a snippet of the zoom in and orientation code below for reference – apologies in advance if I am doing things the long way round but bear in mind I’m still learning.

Any help would be appreciated.
Thanks in advance,
Craig.

UIElement videocontainer;
RotateTransform rotatetransform = new RotateTransform();

void MainPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
        {
            switch (Orientation)
            {
                case PageOrientation.LandscapeLeft:
                    rotatetransform.Angle = 0;
                    break;
                default:
                    rotatetransform.Angle = 180;
                    break;
            }
            rotatetransform.CenterX = 320;
            rotatetransform.CenterY = 240;
            videocontainer.RenderTransform = rotatetransform;

private void ZoomIn_Click(object sender, EventArgs e)
        {
            if (zoom < 7)
            {
                switch (Orientation)
                {
                    case PageOrientation.LandscapeLeft:
                        ScaleTransform myscaletransform1 = new ScaleTransform();
                        myscaletransform1.ScaleX = myscaletransform1.ScaleX * 1.25;
                        myscaletransform1.ScaleY = myscaletransform1.ScaleY * 1.25;
                        myscaletransform1.CenterX = 320;
                        myscaletransform1.CenterY = 240;
                        TransformGroup zoomintranformgroup1 = new TransformGroup();
                        zoomintranformgroup1.Children.Add(myscaletransform1);
                        zoomintranformgroup1.Children.Add(rotatetransform);
                        videocontainer.RenderTransform = zoomintransformgroup1;
                        zoom++;
                        break;
                    default:
                        ScaleTransform myscaletransform2 = new ScaleTransform();
                        myscaletransform2.ScaleX = myscaletransform2.ScaleX * 1.25;
                        myscaletransform2.ScaleY = myscaletransform2.ScaleY * 1.25;
                        myscaletransform2.CenterX = 320;
                        myscaletransform2.CenterY = 240;
                        TransformGroup zoomintranformgroup2 = new TransformGroup();
                        zoomintranformgroup2.Children.Add(myscaletransform2);
                        zoomintranformgroup2.Children.Add(rotatetransform);
                        videocontainer.RenderTransform = zoomintransformgroup2;
                        zoom++;
                        break;
                }


            }
            else
            {
                return;
            }
        }
  • 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-06-08T09:51:15+00:00Added an answer on June 8, 2026 at 9:51 am

    You can use the CompositeTransform class. This class combines all your used transformations and makes things easier.

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

Sidebar

Related Questions

In WP7 silverlight app, i wanted to use a storyboard animation on a particular
I'm building a wp7 Silverlight app. I need a list that is able to
hi i have a question about the silverlight/xna template for wp7 programming. i start
I am new to WP7 programming and I have been following this tutorial http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx
Im very new to WP7 Development and i have a few questions. Firstly i
I am new to both Silverlight and WP7. I have been attempting to hotlink
I am new to Silverlight and I believe my question is very simple, but
I'm new to the Silverlight development stack in WP7 and have a need to
I'm building this WP7 app that uses a video game API to get the
I have a several MenuItem's inside a ContextMenu in my wp7 app using silverlight.

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.