Discussion Board

Results 1 to 3 of 3
  1. #1
    Nokia Developer Champion
    Join Date
    Mar 2013

    Layout problem with fullscreen ViewFinder Canvas

    I am using a Full Screen View Finder in my App. The problem does not actually occur with Lumia devices as they all have a 15:9 screen (WVGA or WXGA). I could simply set the size to 800x450 (16:9 resolution mapping most closely) to get a correct view. If I set the Canvas to that size I will have black bars at the top and bottom on 15:9 devices. The same XAML markup creates a black border on 720p devices like Samsung and HTC (so there are black bars to the left and right as well).

    Another approach would be to let the Canvas grow together with the encapsulating Grid Cell but that stretches the Image on 15:9 devices. It would lead to a fitting ViewFinder on 16:9 devices though. I tried setting the Canvas Height to 9* and Width to 16* to fix the aspect ratio but that isn't supported.

    Basically the only way to fix this to look properly on both aspect ratios would be to detect the resolution upon launch of the ViewFinder and to change the Canvas size programmatically.

    Has anyone encountered such a situation yet and found a XAML only solution?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2011

    Re: Layout problem with fullscreen ViewFinder Canvas

    Take a look at this article on MSDN and see if it helps: http://msdn.microsoft.com/en-us/libr...vs.105%29.aspx

    I've been using this article as a guideline. To test the different scenarios I use the emulator, because I only have 1 WP8 device (a Lumia 920)

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013

    Re: Layout problem with fullscreen ViewFinder Canvas

    I've already seen that document but unfortunately there is nothing in there about preserving the aspect Ratio of a control while displaying it on Screens with a different aspect Ratio. Basically the only Thing I can do is to do something similar to the ResolutionHelper and bind my Canvas control to it's properties (which Kind of is a programmatic solution but a better one than what I had originally in mind so thanks a lot for the pointer). On the other Hand this regularly is not what you would want to do given that you should use the space you gain on the bottom to Display additional info, etc. a ViewFinder Kind of is a specialized Topic.

    As for testing: yes, the Emulator most likely is the only way to test it for most People - I also "only" have a 920 available but a colleague at work has an 8X so I can sometimes test those things on that Hardware as well.

Similar Threads

  1. Rescale direct viewfinder to fullscreen
    By pixsta in forum Symbian
    Replies: 1
    Last Post: 2011-02-07, 14:10
  2. How to make fullscreen viewfinder
    By Ockonal in forum Symbian
    Replies: 2
    Last Post: 2009-02-09, 12:35
  3. Fullscreen mode - softbutton layout
    By Yagiza in forum Mobile Java Tools & SDKs
    Replies: 9
    Last Post: 2008-11-12, 18:14
  4. fullscreen camera viewfinder pyS60
    By amerkhan in forum Symbian
    Replies: 2
    Last Post: 2007-08-09, 14:06
  5. Fullscreen without using canvas class
    By NikolaVeber in forum Mobile Java General
    Replies: 0
    Last Post: 2005-03-11, 12:33

Posting Permissions

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