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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:29:47+00:00 2026-06-02T18:29:47+00:00

I added camera to an my App which is all in Portrait mode so

  • 0

I added camera to an my App which is all in Portrait mode so would like the to keep it this way.

Here is the relevant code snippets I use in my .XAML

SupportedOrientations="Portrait" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"

    <Canvas x:Name="viewfinderCanvas" Width="480" Height="800" >
        <!--Camera viewfinder -->
        <Canvas.Background>
            <VideoBrush x:Name="viewfinderBrush">
            </VideoBrush>
        </Canvas.Background>
    </Canvas>    

Here is my setup code from the .XAML.CS

    protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    {
         if (PhotoCamera.IsCameraTypeSupported(CameraType.FrontFacing))
         {
            cam = new Microsoft.Devices.PhotoCamera(CameraType.FrontFacing);
         }
         else
         {
            cam = new Microsoft.Devices.PhotoCamera(CameraType.Primary);
         }

         cam.Initialized += new EventHandler<Microsoft.Devices.CameraOperationCompletedEventArgs>(cam_Initialized);
         cam.CaptureCompleted += new EventHandler<CameraOperationCompletedEventArgs>(cam_CaptureCompleted);
         cam.CaptureImageAvailable += new EventHandler<Microsoft.Devices.ContentReadyEventArgs>(cam_CaptureImageAvailable);
         cam.CaptureThumbnailAvailable += new EventHandler<ContentReadyEventArgs>(cam_CaptureThumbnailAvailable);
         viewfinderBrush.SetSource(cam);
    }

The problem is that I hold the phone in Portrait and point the phone at a person. The screen shows the persons head on the right side of the screen and the persons feet at the left of the screen.
While as they stand in front of me there head should be at the top of the screen and there feet at the bottm, cause these people aint superman.

So it seems the image from the camera is getting rotated -90 before it appears on the screen.

Can anybody explain whats going wrong and what sample code I need to implement to fix this problem.

Thanks,
-Code

  • 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-06-02T18:29:48+00:00Added an answer on June 2, 2026 at 6:29 pm

    You need to implement a VideoBrush.RelativeTransform, as detailed in the following article :-

    http://msdn.microsoft.com/en-us/magazine/hh708750.aspx

    Also covered in the following :-

    ViewFinder Orientation With Windows Phone 7 Mango PhotoCamera

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

Sidebar

Related Questions

I have the below code in my app which displays a UIImagePicker minus the
My app uses the camera, and I added the zoom function thanks to 3.1
I'd like to create an app that is the same as the default camera
I have a C# app for which I've written GDI+ code that uses Bitmap/TextureBrush
I am developing an app which takes a preview of the device's camera and
I am writing an iPhone app which takes video from the camera, runs it
I want to make an app which takes a video from the camera, adds
my api is 2.2,so i used camera.setDisplayOrientation(90) to make the preview is Portrait,this work
I am working on an android app which interfaces with a bluetooth camera. For
I added Orthographic Camera to my project. I want to show my chart on

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.