I'm trying to develop universal Windows 8.1/Windows Phone 8.1 app. I started with Hub app template and I added DebugPage.xaml. The page is defined as follows:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Button Content="Click" HorizontalAlignment="Center" VerticalAlignment="Bottom" Tapped="OnDebugMethod"/>
<ScrollViewer>
<TextBlock x:Name="outputTxt" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</ScrollViewer>
</Grid>
In the code behind there is OnDebugMethod event handler.
private void OnDebugMethod(object sender, TappedRoutedEventArgs e)
{
for (int i = 0; i < 10; i++)
{
outputTxt.Text += "Hello\n";
}
}
When I try to run this page tapping the button does nothing. There is no visual feedback. On Windows there is no mouse over effect and on the Windows Phone the button doesn't squeeze.
It doesn't matter if I put this page in the Shared project or if I define the same page for Windows and Windows Phone separately.
What could be wrong? It is just a button click.
The scroll viewer is on top of your button (because it is in the same grid row) and suppresses all events. Add
ScrollViewer Grid.Row="1"..
So that the scroll viewer is below the button...