×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    1

    Portrait Mode Realtime Filter

    Hi,

    I would Need a hint how to enhance the Realtime Filter Demo of the Nokia Imaging SDK so that you can use the App either in Landscape or in Portrait mode.

    Any hint (or code...) highly appreciated

    Thx, Peter

  2. #2
    Registered User
    Join Date
    Jan 2012
    Posts
    10

    Re: Portrait Mode Realtime Filter

    I'm pretty sure there is a better way to do it, but if you're not afraid of hardcoding values, changing the existing mainpage XAML with this code will convert the example app to portrait mode.

    Code:
     <phone:PhoneApplicationPage
        x:Class="RealtimeFilterDemo.MainPage"
        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"
        mc:Ignorable="d"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait" Orientation="PortraitUp"
        shell:SystemTray.IsVisible="False" OrientationChanged="OnOrientationChanged">
    
    
        <Canvas>
    
            <MediaElement 
                    x:Name="MyCameraMediaElement"
                    BufferingTime="0"
                    Tap="OnMyCameraMediaElementTapped"
                 Stretch="None"
                    RenderTransformOrigin="0,0" 
                    Canvas.Left="480" Canvas.Top="0" 
                    UseLayoutRounding="False" 
                    d:LayoutRounding="Auto"
                    >
                <MediaElement.RenderTransform>
                    <CompositeTransform Rotation="90"/>
                </MediaElement.RenderTransform>
    
            </MediaElement>
    ...

Similar Threads

  1. Help: how to use WRT only in Portrait mode?
    By gomcoite in forum Symbian
    Replies: 3
    Last Post: 2011-02-18, 22:55
  2. Fix portrait mode in N97 fw v.20
    By diegoves in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2009-11-16, 12:00
  3. Forceing Portrait Mode on n97
    By Corbella in forum Symbian
    Replies: 1
    Last Post: 2009-08-07, 10:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×