i'm creating an Windows Phone8 Javascript application.
But I have one problem that i can't solve.
I'm working with a canvas, but the canvas is in portrait mode only 1/4 of my screen... (Developping on my Nokia Lumia 520)
Width and height of my canvas are:
canvas.width = window.innerWidth; //480
canvas.height = window.innerHeight; //800
My CSS:
* { margin:0; padding:0; } /* to remove the top and left whitespace */
html, body { width:100%; height:100%; } /* just to be sure these are full screen*/
@media screen and (-ms-view-state: fullscreen-landscape) {
}
@media screen and (-ms-view-state: filled) {
}
@media screen and (-ms-view-state: snapped) {
}
@media screen and (-ms-view-state: fullscreen-portrait) {
}
My XAML:
<Grid x:Name="LayoutRoot" Background="Transparent">
<phone:WebBrowser x:Name="Browser"
Loaded="Browser_Loaded"
NavigationFailed="Browser_NavigationFailed"
IsScriptEnabled="True"
/>
</Grid>
The Loaded event:
private void Browser_Loaded(object sender, RoutedEventArgs e)
{
// Add your URL here
Browser.Navigate(new Uri(MainUri, UriKind.Relative));
}
Anyone any idea what i'm missing to use my canvas on the whole page?