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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:39:02+00:00 2026-05-20T01:39:02+00:00

I’m working on my first WP7 app and now I’m exploring the world of

  • 0

I’m working on my first WP7 app and now I’m exploring the world of the panorama control.
I’ve loaded an object from a REST service and I’ve set the background of the panorama to the image url in that object.

var brush = new ImageBrush() { ImageSource = new BitmapImage(new Uri(_group.photo_url, UriKind.Absolute)) };
groupPanorama.Background = brush;

The problem I have is that the image is an arbitrary size on the server and this case ends up being squished (horizontally) and tiled without even filling the width of the screen horizontally.

I’m assuming I need to re-size this to dimensions that the control supports, but I am not sure how to go about this. I assume this is a pretty common task.

many thanks!

EDIT:

Including a snip-it of the xaml. Pretty generic:

<!--LayoutRoot contains the root grid where all other page content is placed-->
<Grid x:Name="LayoutRoot">
    <controls:Panorama Name="groupPanorama" Title="" SelectionChanged="groupPanorama_SelectionChanged">

        <!--Panorama item one-->
        <controls:PanoramaItem Header="Main">
            <Grid/>
        </controls:PanoramaItem>

I guess I should note that I have tried the various Stretch properties for the ImageBrush already with no luck.

UPDATE:
This appears to work with normal size images. The image I was originally attempting to do this with is pretty small and doesn’t appear to stretch. Perhaps it’s a bug, but I’ll work around this for now.

  • 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-20T01:39:03+00:00Added an answer on May 20, 2026 at 1:39 am

    As the previous answer suggests, you can use the Stretch property of the ImageBrush to get the framework to do the resizing for you. To elaborate:

    • Stretch.Fill: This option will resize the image horizontally and vertically to fit the required space, which could result in the image being squashed or stretched in either or both directions.
    • Stretch.Uniform: This option will resize the image horizontally or vertically depending on the source image, while maintaining the aspect ratio of the image. It is still possible to have empty space if you use this option.
    • Stretch.UniformToFill: As with the previous option, this option maintains the aspect ratio of the image, but ensures that all available space is filled. This will prevent any empty space, but part of the image may be cropped.

    You need to make your choice based on your requirements (personally I think UniformToFill is the best suited in this situation) and the typical dimensions of your source images.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.