locked
Scaling to screens?

    Question

  • Hi,

    I'm reading this article http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx

    The problem is: there's only a little code sample for HTML/ JS - NONE for C#. And I know how to develop by C# only - NONE experiences with HTML/ JS.

    Could you please provide me more details and sample codes for this situation ( in C#, of course).

    ---

    More clearly, this is my scenario:

    My app using an area which is only 480 x 800 large. If it run on other devices with larger screen, I need it to be pinned in the center of the screen, and the space must be filled by textures.

    Could you please tell me how to do that?

    Thanks so much!

    Thursday, September 27, 2012 8:42 AM

Answers

  • have a look here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465327.aspx

    its tells which strategies are available. It arent example but try to play bit with the viewbox it isnt that hard

    • Marked as answer by Jesse Jiang Monday, October 01, 2012 5:46 AM
    Thursday, September 27, 2012 9:45 AM
  • <Page
        x:Class="App1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App1"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
        <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
            <!-- Replace Rectangle with your Controls -->
            <Rectangle Fill="Yellow"/>
            <Rectangle Fill="Blue" Width="480" Height="800"/>
        </Grid>
    </Page>
    

    • Marked as answer by Jesse Jiang Monday, October 01, 2012 5:46 AM
    Friday, September 28, 2012 6:04 AM

All replies

  • Hi Phisoft,

    you can try the Visual State Manager for the needful

    Thursday, September 27, 2012 9:41 AM
  • have a look here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465327.aspx

    its tells which strategies are available. It arent example but try to play bit with the viewbox it isnt that hard

    • Marked as answer by Jesse Jiang Monday, October 01, 2012 5:46 AM
    Thursday, September 27, 2012 9:45 AM
  • <Page
        x:Class="App1.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App1"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
        <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
            <!-- Replace Rectangle with your Controls -->
            <Rectangle Fill="Yellow"/>
            <Rectangle Fill="Blue" Width="480" Height="800"/>
        </Grid>
    </Page>
    

    • Marked as answer by Jesse Jiang Monday, October 01, 2012 5:46 AM
    Friday, September 28, 2012 6:04 AM