Cranialsurge
Cranialsurge

Reputation: 245

How can I change orientation on the Image in Windows Phone 7

I've been trying to set the orientation of an image that I capture using the camera but haven't been successful. This is my code:

<Image Name="img_PicTest" Stretch="Fill" Width="207" Source="{Binding Capture}"  Margin="0,13,0,0">                       
                    <Image.RenderTransform>
                        <RotateTransform Angle="{Binding CameraTransform}"/>
                    </Image.RenderTransform>
                </Image>

When I set CameraTransform to '0', I can see the image in the UI perfectly. But if I set it to anything else like 180 for example I just see a blank placeholder.

Upvotes: 1

Views: 859

Answers (1)

MyKuLLSKI
MyKuLLSKI

Reputation: 5325

Make sure you set RenderTransformOrigin

<Image Name="img_PicTest" Stretch="Fill" Width="207" Source="{Binding Capture}" RenderTransformOrigin=".5,.5" Margin="0,13,0,0">

Upvotes: 2

Related Questions