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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:04:33+00:00 2026-05-25T10:04:33+00:00

In my WP7 app, I have a user control, with a grid, and an

  • 0

In my WP7 app, I have a user control, with a grid, and an ellipse in the layout root:

<Grid x:Name="LayoutRoot">
    <Grid x:Name="grdCircle">
        <Ellipse x:Name="elCircle" Stroke="#FFB91515" Margin="5"/>
    </Grid>
</Grid>

I drop this on my main page in the WP7 app, and it looks fine in landscape mode, but when I switch to portrait the width expands and the height contracts, so it is no longer a circle. What I want is for the circle to be the max size it can be regardless of the orientation and still stay a circle.

I’ve tried putting SizeChanged event on LayoutRoot, and setting the grdCircle width/height to whatever was smaller – the LayoutRoot actual width or the LayoutRoot actual height, but as soon as I do that, changing the orientation doesn’t fire the SizeChanged event of LayoutRoot anymore because LayoutRoot also becomes smaller. How can I ensure that my ellipse is always a circle and grows/shrinks based on the orientation?

Edit:
By default, the LayoutRoot grid should have horizontal and vertical alignment set to stretch with margins of 0, so shouldn’t the LayoutRoot grid always grow to the size of its container?

  • 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-25T10:04:34+00:00Added an answer on May 25, 2026 at 10:04 am

    Maybe you should take adventage of OrientationChanged event of a Page?

    Updated

    I think that your control is filling all space that is available. If you change orientation then the amount of space is changing – as a result your control is not a square any more. That fact implicates that the ellipse changes its shape from circle to ellipse, because your ellipse is also trying to fill in all available space. To avoid this you can set Stretch property of an ellipse to Uniform. This should resolve your problem.

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

Sidebar

Related Questions

i have a problem with a WP7 app. I want that a user can
I have very strange issue. In my WP7 app I have a pivot control
I have WP7 app that uses the MVVM pattern. When the user goes from
I have a Pivot Control in my WP7 app that by nature responds to
The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and
i have a problem with my WP7 app. i'm creating a screen where the
I have just started trying to build my first wp7 app, and I am
If you open up the WP7 settings app there is a pivot control, and
I am trying to make a WP7 app that would Tweet short messages user
For my WP7 app, I have an associated facebook page. How should I go

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.