Issues when the app is deployed on device or emulator

Advertisement
Hi,
I am working on a windows phone 8 app.
During design mode, I see that margin between the content and the phone border is fine but when I run it in emulator or device, I see that margin is reduced .
Basically I do not see the same margins as it appears when we are designing.
What wrong here?
Advertisement

Replay

Hi,PFB the xaml content. I do see a change wrt the position of some elements when I run on emulator. In Design-> Device window, I see that I have choosen "4 inch, 480*800 120%scale" and I am running on emulator 8.1 WVGA 4 inch 512 MB.<UserControl
x:Class="EmployeeExperienceMobile8._1.UserControls.DiningControlView.DiningUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:EmployeeExperienceMobile8._1.UserControls.DiningControlView"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Loaded="DiningUserControl_Loaded"
>
<Grid x:Name="DiningGrid" Tapped="DiningTapped" Background="White" Margin="0,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Dining" Style="{StaticResource CardHeaderStyle}"/>
<Button x:Name="RestBtn" Background="Purple" Click="Restaurants_clicked" Foreground="White" FontWeight="Light" Content="Restaurants nearby" BorderBrush="Gray" Margin="89,8,0,0" BorderThickness="0" FontSize="14" Height="0" Width="Auto"></Button>
</StackPanel>
</Grid>
</Grid>
<Grid x:Name="ProgressVisibile" Margin="0,20,0,20" Visibility="Collapsed">
<StackPanel>
<TextBlock Text="Loading" FontFamily="Segoe UI" FontWeight="Light" FontSize="25" Foreground="Gray" HorizontalAlignment="Center"></TextBlock>
<ProgressBar IsIndeterminate="True" Height="10" Margin="0,10,0,10"/>
</StackPanel>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="33*"/>
<ColumnDefinition Width="367*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid Grid.Row="1" Grid.ColumnSpan="2">
<Image Source="/Assets/dining_img.png" Margin="20,20,20,0"/>
</Grid>
<!--<Image Grid.Row="0" Source="/Assets/Project_Assets/close_icon_e.png" Width="20" Margin="402,20,0,0"></Image>-->
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,0,32.333" Grid.RowSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="20,40,0,0" >
<TextBlock Text="{Binding MealCardBalance}" Style="{StaticResource DashboardCountStyle}"/>
<TextBlock Text="USD" Style="{StaticResource DashboardSmallHeaderStyle}" Foreground="Gray" Margin="0,19,0,0"/>
</StackPanel>
<TextBox Grid.Column="1" Text="RTC 5" Background="White" FontSize="20" BorderBrush="#A3A3A3" Width="150" Height="50" Margin="-9,21,0,0" BorderThickness="2.5,2.5,3,2.5"/>
<Image x:Name="PurpleSearchImg" Grid.Column="2" Source="/Assets/Project_Assets/3dining_icon.png" Margin="-15,18,0,0" Width="39" Height="49" />
<Image x:Name="BlueSearchImg" Grid.Column="2" Source="/Assets/Project_Assets/3dining_icon_blue.png" Margin="-15,18,0,0" Width="39" Height="49"/>
<Image x:Name="GreenSearchImg" Grid.Column="2" Source="/Assets/Project_Assets/3dining_icon_green.png" Margin="-15,18,0,0" Width="39" Height="49"/>
</Grid>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,82,0,19.333" Grid.ColumnSpan="2" Grid.RowSpan="2">
<TextBlock Text="MEAL CARD BALANCE" Style="{StaticResource DashboardSmallHeaderStyle}" Margin="23,0,0,0"/>
<TextBlock Text="VIEW MENU AND HOURS" Style="{StaticResource DashboardSmallHeaderStyle}" Margin="25,0,0,0"/>
</StackPanel>
</Grid>
<!--<Grid x:Name="ErrorMessage" Visibility="Collapsed">
<TextBlock Text="Sorry!! No Data found. Please contact support" TextWrapping="Wrap" Margin="20,20,0,20" FontSize="20" Style="{StaticResource commonText6}"></TextBlock>
</Grid>-->
</StackPanel>
</Grid>
</UserControl>