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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T12:59:31+00:00 2026-05-28T12:59:31+00:00

OK, so I have this image that’s 1000×500. So I’m displaying it in WP7

  • 0

OK, so I have this image that’s 1000×500. So I’m displaying it in WP7 like this:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0" Background="{StaticResource PhoneAccentBrush}">
    <Image Name="image1" />
</Grid>

And after I set the image’s contents in code, it renders like this:

enter image description here

Not bad, but my business requirement is to display it vertically, so I need to rotate it. Easy enough:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0" Background="{StaticResource PhoneAccentBrush}">
    <Image Name="image1" RenderTransformOrigin="0.5 0.5">
        <Image.RenderTransform>
            <RotateTransform Angle="90"></RotateTransform>
        </Image.RenderTransform>
    </Image>
</Grid>

And the result is:

enter image description here

OK that’s the idea, but I want the image to stretch as much as possible. The image is larger than the screen’s dimensions so it should be easy.

Instead, it looks like what’s happening is that the image takes on the dimensions of what it would be when it fills the screen horizontally, then that is what gets rotated.

OK, so they’ve got this “Stretch” parameter. Let’s see what that does.

Well, setting it to “Uniform” does nothing

Setting it to “Fill” does this:

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0" Background="{StaticResource PhoneAccentBrush}">
    <Image Name="image1" RenderTransformOrigin="0.5 0.5" Stretch="Fill">
        <Image.RenderTransform>
            <RotateTransform Angle="90"></RotateTransform>
        </Image.RenderTransform>
    </Image>
</Grid>

enter image description here

Looks like it’s just stretching the rotated image horizontally, which isn’t what I want.

And “UniformToFill” does this:

enter image description here

I don’t even know what happened there.

I must say, after having programmed this App for iOS and Android and now doing the WP7 version on a lark since my speciality for a decade now has been in C#, Microsoft really nailed a whole lot of stuff with WP7. It’s simple to work with and it’s clear they’ve put a ton of work in it and have successfully leveraged their existing technology into it (.NET CE, Silverlight, etc.)

So it’s baffling why after blowing through everything else in this App, I can’t get a simple image to rotate and scale.

Anyone have any idea what I’m missing or doing wrong here? All I need is it to rotate 90 degrees and then fill the screen, so the more elaborate rotation solutions I’ve seen for WP7 don’t really apply here.

  • 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-28T12:59:32+00:00Added an answer on May 28, 2026 at 12:59 pm

    The problem with RenderTransform is that it does NOT propagate the change in size/orientation to the parent controls. In WPF there is LayoutTransform which accomplishes this.

    Luckily you are not alone and the Silverlight toolkit provides a solution called: LayoutTransformer

    For the windows Phone you can find a port by David Anson here

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

Sidebar

Related Questions

I have this code: <ScrollViewer x:Name=textScroller Grid.Row=2> <Grid x:Name=ContentPanel Margin=12,0,12,0 DataContext={Binding}> <Image x:Name=ImageUrl Source={Binding
I have a CSS entry that looks like this: .header { background-image: url(./images/embouchure.jpg); background-repeat:
I have a php script that randomly generates an image. Something like this: <?php
I would like to have an AppWidget that designed like this one . Image:
I have this background image that is 175x175 but I am trying to make
I have this JPEG image , that opens fine in Picasa, Photoshop, web browser,
I have seen this effect where when mouse is over an image, that image
I have this method that changes an larger image source on click. I need
I have image map that can I move, but this map will be so
I have an app that uploads an image to Facebook. this is the part

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.