scrollviewer not working - windows-phone-7

y my scrollviewer not scrolling till the end.it gets struck to a limited position.
i hav attached my xaml code.i placed a canvas inside the code.and the scrollviewer is inside 2 grids.
<ScrollViewer>
<Canvas Margin="0,0,0,0">
<toolkit:ListPicker x:Name="listPicker" ItemTemplate="{StaticResource PickerItemTemplate}"
FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" CacheMode="BitmapCache"
Header="" Margin="12,246,210,298" FontFamily="Yu Gothic" FontSize="22" FontWeight="SemiBold" Width="240" />
<toolkit:ListPicker x:Name="listPicker2" ItemTemplate="{StaticResource PickerItemTemplate}" ItemCountThreshold="3"
FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" CacheMode="BitmapCache"
Header="" Margin="9,343,210,206" Width="240" />
<toolkit:ListPicker CacheMode="BitmapCache" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" Header="" ItemCountThreshold="3" ItemTemplate="{StaticResource PickerItemTemplate}" Margin="12,440,210,108" Name="listPicker1" Width="240" />
<toolkit:ListPicker CacheMode="BitmapCache" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" Header="" ItemCountThreshold="3" ItemTemplate="{StaticResource PickerItemTemplate}" Margin="11,546,210,2" Name="listPicker3" Width="240" />
<TextBlock Height="40" HorizontalAlignment="Left" Margin="30,212,0,0" Name="textBlock1" Text="MONTHLY DEBTS" VerticalAlignment="Top" Width="185" FontSize="24" />
<TextBlock Height="40" HorizontalAlignment="Left" Margin="290,212,0,0" Name="textBlock2" Text="AMOUNTS" VerticalAlignment="Top" Width="147" FontSize="24" />
<clrtb:ClearableTextBox Canvas.Left="246" Canvas.Top="242" Height="75" Name="qualifytb" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="242" Canvas.Top="338" Height="75" Name="clearableTextBox1" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="246" Canvas.Top="436" Height="75" Name="clearableTextBox2" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="244" Canvas.Top="542" Height="75" Name="clearableTextBox3" Width="208" />
<TextBlock Text="DEBT RATIO" Canvas.Left="148" Canvas.Top="642" FontSize="26" FontWeight="Medium" />
<TextBlock Text="Conv Debt Ratio:" Canvas.Left="30" Canvas.Top="700" FontSize="26" FontWeight="Medium" />
<TextBlock Text="FHA Debt Ratio:" Canvas.Left="30" Canvas.Top="800" FontSize="26" FontWeight="Medium" />
<TextBlock Text="VA Debt Ratio:" Canvas.Left="30" Canvas.Top="900" FontSize="26" FontWeight="Medium" />
<clrtb:ClearableTextBox Canvas.Left="250" Canvas.Top="700" Height="75" Name="rt1" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="320" Canvas.Top="700" Height="75" Name="rt2" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="250" Canvas.Top="800" Height="75" Name="rt3" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="320" Canvas.Top="800" Height="75" Name="rt4" Width="208" />
<clrtb:ClearableTextBox Canvas.Left="250" Canvas.Top="900" Height="75" Name="rt5" Width="208" />
</Canvas>
</ScrollViewer>

I found this SO question: ScrollBars are not visible after changing positions of controls inside a Canvas, which is basically a similar problem. The question is WPF-specific but can be applied to WP/Silverlight just as well.
The problem is Canvas will always return a DesiredSize of (0, 0), so the ScrollViewer will never think it needs to scroll.
The solution is simple: just use a StackPanel or Grid instead of the Canvas. If you really need the Canvas, you have to override MeasureOverride.

Canvas is not the right layout panel to be using, it's going to produce weird behavior the way you're using it. It's meant to be used when you need finite control over positioning and you are willing to write significant logic to support edge cases that pop up. Try using Grid, and configure it with columns and rows.

Related

Telerik BarIndicator cuts off edges

I am using a RadRadicalGuage from Telerik with an outside bar indicator. When I set the indicator to go full scale it cuts off the top and side of the bar indicator. Not sure how to fix this.
<telerik:RadRadialGauge x:Name="DrillPressureGauge" telerik:StyleManager.Theme="Windows8" Height="225" VerticalAlignment="Top" HorizontalAlignment="Left" Width="225" Margin="198,44,0,0" >
<telerik:RadialScale Min ="0" Max="10000" Foreground="Transparent">
<telerik:RadialScale.Ranges>
<telerik:GaugeRange Min="0"
Max="6000"
StartWidth="0.20"
EndWidth="0.20"
Background="Green"
IndicatorBackground="Green" />
<telerik:GaugeRange Min="6000"
Max="7750"
StartWidth="0.20"
EndWidth="0.20"
Background="Orange"
IndicatorBackground="Orange" />
<telerik:GaugeRange Min="7750"
Max="10000"
StartWidth="0.20"
EndWidth="0.20"
Background="Red"
IndicatorBackground="Red" />
</telerik:RadialScale.Ranges>
<telerik:RadialScale.Indicators>
<telerik:BarIndicator
Value="10000"
StartWidth="0.1"
EndWidth="0.1"
EmptyFill="Transparent"
Background="LightGray"
BorderBrush="Transparent"
StrokeThickness="0"
telerik:ScaleObject.Location="Outside"/>
<telerik:Needle />
<telerik:Pinpoint/>
</telerik:RadialScale.Indicators>
<telerik:RadialScale.CustomItems>
<TextBlock Text="12345"
telerik:ScaleObject.RelativeX="0.35"
telerik:ScaleObject.RelativeY="0.85" Background="White" Foreground="Black" FontFamily="Calibri" FontSize="32" VerticalAlignment="Bottom" Height="36.063" HorizontalAlignment="Center" FontWeight="Bold" />
</telerik:RadialScale.CustomItems>
</telerik:RadialScale>
</telerik:RadRadialGauge>
I was able to fix the problem by adding a radius value of 0.9 to the RadialScale.

Windows Phone pushpin overlapping

I'm coding a simple windows phone 7.5 localization application.
I've changed the default pushpin template as :
<ControlTemplate TargetType="maps:Pushpin" x:Key="allPushpinsTemplate">
<Grid Height="26" Width="26" Margin="-13,-13,0,0" RenderTransformOrigin="0.5,0.5" >
<Grid.RenderTransform>
<CompositeTransform Rotation="-45"/>
</Grid.RenderTransform>
<Rectangle Fill="Black" HorizontalAlignment="Center" Margin="0" Stroke="White" VerticalAlignment="Center" Height="26" Width="26"/>
<Ellipse HorizontalAlignment="Center" Height="16" Margin="0" VerticalAlignment="Center" Fill="Red" Width="16"/>
</Grid>
</ControlTemplate>
When I click on a pushpin, I handle the event and change the template of the selected pin as :
<ControlTemplate TargetType="maps:Pushpin" x:Key="detailedPushpinTemplate">
<Grid x:Name="ContentGrid" Background="Transparent" Margin="-4,0,0,0">
<StackPanel >
<Grid Background="Black">
<StackPanel Margin="5,5,0,0">
<TextBlock Text="{Binding Adress}" Foreground="White" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ZipCode}" Foreground="White" />
<TextBlock Text="-" Foreground="White" Padding="3,0"/>
<TextBlock Text="{Binding City}" Foreground="White" />
</StackPanel>
<TextBlock Text="{Binding TelStd}" Foreground="White" />
<TextBlock Text="{Binding Email}" Foreground="White" />
<StackPanel Orientation="Horizontal">
<Button BorderBrush="Transparent" Click="Button_Click" CommandParameter="email" ClickMode="Press">
<Button.Content>
<Image Source="/Images/Icons/icon-mail.png" Width="40" Height="40" />
</Button.Content>
</Button>
<Button BorderBrush="Transparent" Click="Button_Click" CommandParameter="phone" ClickMode="Press">
<Button.Content>
<Image Source="/Images/Icons/icon-phone.png" Width="40" Height="40" />
</Button.Content>
</Button>
</StackPanel>
</StackPanel>
</Grid>
<Polygon Fill="Black" Points="0,0 29,0 0,29" Width="29" Height="29" HorizontalAlignment="Left" />
<Grid Height="26" Width="26" Margin="-13,-13,0,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left">
<Grid.RenderTransform>
<CompositeTransform Rotation="-45"/>
</Grid.RenderTransform>
<Rectangle Fill="Black" HorizontalAlignment="Center" Margin="0" Stroke="White" VerticalAlignment="Center" Height="26" Width="26" />
<Ellipse HorizontalAlignment="Center" Height="16" Margin="0" VerticalAlignment="Center" Fill="Green" Width="16" />
</Grid>
</StackPanel>
</Grid>
</ControlTemplate>
So that I can display some info and some commands. The result works perfectly and display a black rectangle with all my custom data.
But, the other pins (default template) overlap the rectangle and appears on the top of my selected pin and hide information.
Has anyone an idea to force the selected pin template to be always on top of the other pins ?
for information the XAML of my map :
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Canvas >
<maps:Map ZoomBarVisibility="Visible" ZoomLevel="4" Center="46.8821,2.2697" Name="map1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Canvas.Top="0" Height="600" Width="460">
<maps:MapItemsControl x:Name="mapControl"/>
<maps:MapItemsControl ItemsSource="{Binding Locations}" >
<maps:MapItemsControl.ItemTemplate>
<DataTemplate>
<maps:Pushpin Location="{Binding Location}" Template="{StaticResource allPushpinsTemplate}" MouseLeftButtonDown="Pushpin_MouseLeftButtonDown"/>
</DataTemplate>
</maps:MapItemsControl.ItemTemplate>
</maps:MapItemsControl>
<maps:MapLayer Name="imageLayer"/>
</maps:Map>
<Button Content="some action" Height="70" HorizontalAlignment="Left" Margin="0" Name="button1" VerticalAlignment="Top" Width="170" Canvas.Left="140" />
</Canvas>
</Grid>
The only way I've been able to work around this default behaviour is to remove the original pin and then add a new one in the same position with the different template.
The newly added pin appears at the top in the Z-Order but I haven't been able to alter the Z-Order of existing pins once created.
Also remember to "reset" any pins in the selected state when the user clicks on another.
I guess this should help you: http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/c4055dba-3efd-4bf7-98b3-cd8e24d175ea

ScrollViewer scrolls back on WP7

I have created a page where there's alot of input from the user. So the User should be able to scroll down to be able to press a Upload button. To scroll down on the page I have used a ScrollViewer outside a grid. I am able to scroll but the page keeps scrolling back after scrolling down.
Here is my code:
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanelButtom" Grid.Row="1" >
<ScrollViewer >
<Grid x:Name="ContentPanel" Background="black">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="154" />
<ColumnDefinition Width="326" />
</Grid.ColumnDefinitions>
<Image Height="109" HorizontalAlignment="Left" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="167" Margin="23,19,0,0" Source="{Binding Path=ImageSoruce, Mode=TwoWay}" Grid.ColumnSpan="2" />
<TextBox Height="71" HorizontalAlignment="Left" Margin="12,161,0,0" Name="nameInput" Text="{Binding Path=Name, Mode=TwoWay}" VerticalAlignment="Top" Width="430" Grid.ColumnSpan="2" />
<TextBlock Height="56" HorizontalAlignment="Left" Margin="23,134,0,0" Name="nameLabel" Text="Name" VerticalAlignment="Top" Width="130" FontSize="25" />
<TextBlock FontSize="25" Height="60" HorizontalAlignment="Left" Margin="23,238,0,0" Name="descriptionLabel" Text="Description" VerticalAlignment="Top" Width="130" />
<TextBox Height="72" HorizontalAlignment="Left" Margin="12,265,0,0" Name="descriptionInput" Text="{Binding Path=Description, Mode=TwoWay}" VerticalAlignment="Top" Width="430" IsEnabled="True" Grid.ColumnSpan="2" />
<TextBlock FontSize="25" Height="60" HorizontalAlignment="Left" Margin="23,343,0,0" Name="locationLabel" Text="Location" VerticalAlignment="Top" Width="130" />
<TextBlock Height="46" HorizontalAlignment="Left" Margin="24,384,0,0" Name="locationInput" Text="{Binding Path=Location, Mode=TwoWay}" VerticalAlignment="Top" Width="401" Loaded="locationInput_Loaded" Grid.ColumnSpan="2" />
<toolkit:ListPicker SelectionMode="Multiple" FullModeHeader="CATEFORIES" x:Name="ListPickerCategories" CacheMode="BitmapCache" HorizontalAlignment="Left" Margin="25,492,0,0" VerticalAlignment="Top" Width="401" Grid.ColumnSpan="2" ItemsSource="{Binding Categories}" Height="78"></toolkit:ListPicker>
<TextBlock FontSize="25" Height="60" HorizontalAlignment="Left" Margin="24,436,0,0" Name="textBlock1" Text="Categories" VerticalAlignment="Top" Width="130" />
<Button Content="Upload" Height="86" HorizontalAlignment="Left" Margin="26,604,0,0" Name="UploadButton" VerticalAlignment="Top" Width="411" Click="UploadButton_Click" Grid.ColumnSpan="2" />
</Grid>
</ScrollViewer>
</Grid>
What can be the cause of this problem and how do I solve it?
Use StackPanels to put elements one below the other. Remove all your margins, height, width and other absolute positioning stuff
<Grid x:Name="ContentPanelButtom" Grid.Row="1" >
<ScrollViewer>
<StackPanel>
<!-- elements here -->
</StackPanel>
</ScrollViewer>
</Grid>
I had the same issue. but at last i solved it, i just used the Height property to do this. Please do the following steps
First create a ScrollViewer
Indide the ScrollViewer create a container(eg: Grid/StackPanel/Border etc...) and put every controlls inside it.
Set fixed Height for ScrollViewer and the Container (Note: Height of container should be greater than ScrollViewer's Height)
See the below Code
<ScrollViewer Height="500">
<Grid Name="Container" Height="700">
<TextBox/>
<TextBox/>
<TextBox/>
</Grid>
</ScrollViewer>
Now you can scroll the container Grid Even the KeyBoard shown or even focus on a TextBox.

Why can't I scroll all the way to the bottom when onscreen keyboard is active

I have a bunch of controls in a collection of stackpanels that is contained in a grid. The grid is pretty long and runs off the page so I have put it in to a scrollviewer. Everything works perfectly and I can scroll up and down my page until the keyboard is active. Once that happens, I am not able to scroll the content all the way to the bottom when a textbox is highlighted. I can scroll to a certain extent but not all the way down. Am I doing something wrong? My code is as follows:
<ScrollViewer Margin="12,0,12,0" Grid.Row="1">
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Height="837" Width="456">
<StackPanel HorizontalAlignment="Left" Width="450" Margin="0,63,0,405">
<TextBlock Height="30" Name="tBlk_Username" Text="Display Name" />
<TextBox Height="71" Name="tb_UserNameVal" Text="{Binding UserNameValue, Mode=TwoWay}" Width="452" />
<TextBlock Height="30" Name="tBlk_Email" Text="Email" />
<TextBox Height="71" Name="tb_EmailVal" Text="{Binding EmailValue, Mode=TwoWay}" Width="452" />
<TextBlock Height="30" Name="tBlk_Message" Text="Message" />
<TextBox Height="130" Name="tb_MessageVal" Text="{Binding MessageValue, Mode=TwoWay}" Width="452" />
</StackPanel>
<StackPanel Height="37" HorizontalAlignment="Left" Margin="0,519,0,0" Name="stackPanel2"
VerticalAlignment="Top" Width="450">
<TextBlock Height="30" Name="tBlk_PicInfo" Text="Include a Photo" />
</StackPanel>
<StackPanel Orientation="Horizontal" Height="90" HorizontalAlignment="Left" Margin="12,432,0,0"
Name="stackPanel1" VerticalAlignment="Top" Width="450" d:LayoutOverrides="GridBox">
<TextBox Height="71" Name="tb_Location" Text="{Binding Location}" Width="367" IsReadOnly="True" />
<Button Height="60" Name="btn_Clear" Width="60" BorderThickness="0" Background="{Binding LocationImage}" Style="{StaticResource LocationButtonStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<GalaSoft_MvvmLight_Command:EventToCommand x:Name="ClearCommand" Command="{Binding ClearCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="205" HorizontalAlignment="Left" Margin="12,556,0,0"
Name="stackPanel3" VerticalAlignment="Top" Width="452" d:LayoutOverrides="GridBox">
<Image Name="img_FlickrPic" Stretch="Fill" Width="260" Source="{Binding Capture}" Margin="0,13,0,0" />
<Button Name="btn_Capture" Width="90" Height="90" Margin="0,67,0,55" BorderThickness="0">
<Button.Background>
<ImageBrush ImageSource="/Images/camera.png" />
</Button.Background>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<GalaSoft_MvvmLight_Command:EventToCommand x:Name="CaptureClick" Command="{Binding CaptureCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="100" HorizontalAlignment="Left"
Margin="4,763,0,0" Name="stackPanel4" VerticalAlignment="Top" Width="450" d:LayoutOverrides="GridBox">
<Button Content="Submit" Height="71" Name="btn_Submit" Width="130" IsEnabled="{Binding SubmitEnabled}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<GalaSoft_MvvmLight_Command:EventToCommand x:Name="SubmitCommand" Command="{Binding SubmitCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
<StackPanel Height="59" HorizontalAlignment="Left" Name="stackPanel5" VerticalAlignment="Top" Width="456" Orientation="Horizontal">
<TextBlock FontFamily="{StaticResource HelveticaNeue}" Name="tBlk_StepConf" Text="Please share my " Width="150" TextAlignment="Center" Height="33" />
<TextBlock FontFamily="{StaticResource HelveticaNeue}" Foreground="#FF00BCE4" Name="tBlk_StepConfCount" Text="{Binding StepVal}" Width="56" FontSize="34" TextAlignment="Center" VerticalAlignment="Top" />
<TextBlock FontFamily="{StaticResource HelveticaNeue}" Name="tBlk_StepConfTrail" Text=" steps for water" Width="134" TextAlignment="Center" Height="40" />
</StackPanel>
</Grid>
</ScrollViewer>
The problem is that the ScrollViewer doesn't pay attention to the Soft Input Panel (or keyboard), so it only scrolls as long as it can behind the keyboard so to speak.
A simple solution is to add a margin to the bottom of the content control of the ScrollViewer.
The longer and more complicated solution is to add the margin when the SIP is displayed. Unfortunately there's no event for it, but I guess one could listen to when a textbox gains or loses focus, and set a margin or perhaps show a control at the bottom of the page when a textbox has focus (and hence the SIP is displayed) and hide it when it doesn't.

Why i can't see the button in my windows phone 7 App?

like in title:)
I wrote from tutorial: http://msdn.microsoft.com/en-us/wp7trainingcourse_yourfirstwp7applab_topic3
does everything like there.
my code:
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="120"/> <!-- Problem resolved -->
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- this i can not see any ideas what is wrong? -->
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
<Button x:Name = "SolveButton" Content="Solve" Margin="10"
HorizontalAlignment="Center" Click="SolveButton_Click" />
<StackPanel x:Name="StatusPanel" Orientation="Horizontal"
HorizontalAlignment="Center" Visibility="Collapsed">
<TextBlock HorizontalAlignment="Center" Text="Your Moves: " TextWrapping="Wrap"
Foreground="#FFD0D0D0" FontSize="17.333"/>
<TextBlock x:Name="TotalMovesTextBlock" HorizontalAlignment="Center" Text="N"
TextWrapping="Wrap" Foreground="#FFFFB000" FontSize="17.333"/>
</StackPanel>
</StackPanel>
<!-- Here i can see anything under this comment -->
<StackPanel Orientation="Vertical" VerticalAlignment="Top" Grid.Row="1">
<Border x:Name="CongratsBorder" Height="30" Background="#FFF10DA2"
HorizontalAlignment="Center"
Width="443" RenderTransformOrigin="0.5,0.5"
UseLayoutRounding="False" Opacity="0">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform />
<TranslateTransform />
</TransformGroup>
</Border.RenderTransform>
<TextBlock HorizontalAlignment="Center" Text="CONGRATULATIONS!" TextWrapping="Wrap"
Foreground="White" FontSize="17.333" VerticalAlignment="Center"
FontWeight="Bold"/>
</Border>
<Border x:Name="border" BorderThickness="3" Background="#FF262626"
HorizontalAlignment="Center" VerticalAlignment="Center" Padding="1"
RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform />
<TranslateTransform />
</TransformGroup>
</Border.RenderTransform>
<Border.BorderBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" >
<GradientStop Color="#FFF10DA2" Offset="0" />
<GradientStop Color="#FFEE7923" Offset="1" />
</LinearGradientBrush>
</Border.BorderBrush>
<Canvas Height="435" Width="435">
<Image x:Name="PreviewImage" Height="435" Width="435" Opacity="0.2" />
<Canvas x:Name="GameContainer" Height="435" Width="435" />
</Canvas>
</Border>
<TextBlock x:Name="TapToContinueTextBlock" HorizontalAlignment="Center"
Text="Tap the picture to start the puzzle"
TextWrapping="Wrap" Foreground="#FFD0D0D0" FontSize="17.333" />
</StackPanel>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION"
Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0"
Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"></Grid>
</Grid>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>-->
You've got a Grid
And you've got multiple things in the first row of that Grid - so they are being drawn on top of each other.
Try putting things into different Grid Rows
Or Try replacing your outermost Grid by a StackPanel instead?
Also <RowDefinition Height="0.2"/> seems quite small for a height - try using Height="Auto"
Your first stackpanel doesn't have a Grid.Row setting. It's probably behind the TitlePanel in Row 0.

Resources