[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Windows Mobile 7.1 Rotating a page

Posted on 2011-10-24
3
Medium Priority
?
235 Views
Last Modified: 2013-12-27
I have a very simple page which is being used to take photos.  It is based on the Microsoft sample and has a button which when clicked operates the shutter.  All I need to do is to handle the moving of this button to the top right of the screen when the screen is rotated.  I can't seem to find any information on how this is done.  I have attached my xaml - any help please
<phone:PhoneApplicationPage 
    x:Class="Blu3.CameraPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="LandscapeLeft"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="800"
    shell:SystemTray.IsVisible="False">

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Transparent">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="640" />
			<ColumnDefinition Width="160" />
		</Grid.ColumnDefinitions>

		<Canvas x:Name="viewfinderCanvas" Width="640" Height="480" HorizontalAlignment="Left" >

			<!--Camera viewfinder -->
			<Canvas.Background>
				<VideoBrush x:Name="viewfinderBrush" />
			</Canvas.Background>

			<!-- Brackets for Touch Focus -->
			<TextBlock 
                x:Name="focusBrackets" 
                Text="[   ]" 
                FontSize="40"
                Visibility="Collapsed"/>

		</Canvas>

		<!--Button StackPanel to the right of viewfinder>-->
		<StackPanel Grid.Column="1" >
			<Button x:Name="ShutterButton" Content="SH" Click="ShutterButton_Click" FontSize="26" FontWeight="ExtraBold" Height="75" />
		</StackPanel>

		<!--Used for debugging >-->
		<TextBlock Height="40" HorizontalAlignment="Left" Margin="8,428,0,0" Name="txtDebug" VerticalAlignment="Top" Width="626" FontSize="24" FontWeight="ExtraBold" />
	</Grid>

</phone:PhoneApplicationPage>

Open in new window

0
Comment
Question by:ChrisMDrew
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 2000 total points
ID: 37019169
0
 

Author Comment

by:ChrisMDrew
ID: 37020446
Looks as though as I am using a grid it whould sort of work out of the biox but doesn't.  I think it is probably down to the canvas used for the camera but not sure.
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 37020454
you have defined widths setup in the xaml. That would take preference.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month19 days, 12 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question