Mackovich
Mackovich

Reputation: 3593

Windows Store Metro APP how to adapt to screen size

I would like to know how to have my Metro Windows 8 app to adapt to the screen size. In other term : a somewhat responsive design.

Using the simulator via Visual Studio 2013, I can test multiple screen and it seems my app is not behaving correctly at all.

I also used the simulator to see how some of Windows 8/8.1 built-in apps behaved : it's splendid and clean.

How can I achieve this much ?

I already found a partial answer for my grid : Windows 8 App Screen Layout

but it is not enough.

This picture shows what I am trying to do :

http://image.noelshack.com/fichiers/2014/49/1417438224-stack.png

I need to keep that layout, in landscape mode preferably, whatever the screen solution is.

In Windows Phone, it seems to work like a charm : no need to do anything.

Thanks for the help !

Upvotes: 0

Views: 221

Answers (1)

crea7or
crea7or

Reputation: 4490

It's very basic XAML knowlege.

<Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="Auto"/>
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
    <RowDefinition Height="*"/>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="*"/>
    </Grid.RowDefinitions>


// Grid.Row="1" Grid.Column="1" - your grid with Login/Password. Use VerticalAligment="Center", HorizontalAligment="Center" 

// Grid.Row="2" Grid.Column="2" - your register button. Use VerticalAligment="Bottom", HorizontalAligment="Right"

</Grid>

Personally I'll recomment you to place "Register" button as link under "Login" button.

Upvotes: 1

Related Questions