3

I tried to make a wp7 app with expression blend. But is there a problem that make me crazy!

I created a Panorama Controller, a Panorama Item and a Grid. In this grid i create an Image.
enter image description here

Why my image won't enlarge on width?

Here the screenshots:
enter image description here
The gray image is rounded also at dx, like sx side.

Here the config:
enter image description here

Is there a solution to enlarge my image on width like max size of grid?

How can I do this?

This is my snippet of code:

<controls:PanoramaItem Foreground="Black" >
  <Grid Margin="1,26,160,46" Width="418">
    [...]
    <Grid Margin="0,190,8,0" VerticalAlignment="Top" Height="207" >
      <Image Source="JobRow.png" Margin="8,34,27,50" Stretch="None" />
    </Grid>
  </Grid>
</controls:PanoramaItem>

Any idea please?

EDIT 1: if I change Stretch this is the result, my image enlarge only in height!
It's like that is blocked at certain position... but i don't know why!!!

enter image description here

EDIT 2: Changing default orientation will not enlarge my grid!

<controls:PanoramaItem Foreground="Black" Width="438" Orientation="Horizontal">
elp
  • 8,021
  • 7
  • 61
  • 120

4 Answers4

1

You need to set the Stretch property on the image if you want it to grow to fill all the available space. Depending on how you want it to distort or get trimmed to fill the available space you want it to be one of Fill, Uniform or UniformToFill.

Edit:
If the stretched Image woudl now go beyond the default width of the PanoramaItem, be sure to set the Orientation of the PanoramaItem to be Horizontal so it can support the necessary growth needed in that direction

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
0

Look at the properties that define the XAML file your are editing (Page, UserControl, etc.). Does it have a setting like this?

 d:DesignWidth="300"

If so, change it to a larger value like this:

 d:DesignWidth="800"
Rick Sladkey
  • 33,988
  • 6
  • 71
  • 95
0

Just remove the margin attribute from your image tag

<Image Source="JobRow.png" Stretch="None" />

Hope this helps

Waleed
  • 3,105
  • 2
  • 24
  • 31
0

Ok, solved removing all Width="xxx" from XAML file and after, from Expression Blend, manually resizing all the components.

I don't know why, but it works!

thanks all

elp
  • 8,021
  • 7
  • 61
  • 120