0
votes

I want to navigate the user to a locations management page when the user clicks/taps the top area of the screen where the location name is displayed.

top part of view area

I've tried a ton of different options and none have worked for me

  1. Button with opacity of .01... doesn't work well
  2. Grid tapped event on the location grid... only records click with solid background or when letters are tapped
  3. Grid tapped event on page root... Records tap, but I cannot figure out how to determine if it was a tap on the top area of screen.
  4. Manipulation of page root Grid to detect X,Y... This gives me the location of the manipulation but the user has to drag their finger. Not tap it.
1

1 Answers

0
votes

You can add a transparent layer (set its Opacity as 0.0) on top of location name, and set a solid background to make it visible to tap.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
    </Grid.ColumnDefinitions>
    <TextBlock FontSize="40">Redmond, WA</TextBlock>
    <Grid Tapped="Grid_Tapped" Background="White" Opacity="0" />

    <!--The rest omitted-->
    <TextBlock Grid.Row="1" FontSize="40">Current</TextBlock>
</Grid>