Reputation: 181
I'd the UI design for Windows Phone using Panorama Control, but the "Tap" is not functioning in my code. Wondering why? My XAML code as follow:
<Grid x:Name="LayoutRoot">
<StackPanel Margin="0,0,0,0">
<HyperlinkButton Tap="detailmap_Tap" HorizontalAlignment="Stretch" Style="{StaticResource EmptyButtonStyle}">
<Image Name="titleImg" Width="480" Height="150" />
</HyperlinkButton>
<toolkit:PerformanceProgressBar Name="prgBar01" Margin="0,0,0,0" Visibility="Visible" Height="40" VerticalAlignment="Top" IsEnabled="True" IsIndeterminate="True" />
<TextBlock Name="locationNote" TextWrapping="Wrap" Margin="12,0,0,0" />
</StackPanel>
<controls:Panorama Title=" ">
<!--Panorama item one-->
<controls:PanoramaItem Header="test1">
<Grid/>
</controls:PanoramaItem>
<!--Panorama item two-->
<controls:PanoramaItem Header="test2">
<Grid/>
</controls:PanoramaItem>
</controls:Panorama>
</Grid>
This UI design work perfectly, except the "Tap" in the hyperlinkButton doesn't respond. Any ideas?
Upvotes: 0
Views: 314
Reputation: 12465
If you want a button to be visible no matter which Panorama item the user is on, place the Panorama below the button
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto">
<RowDefinition Height="*">
</Grid.RowDefinitions>
<HyperlinkButton Grid.Row="0"/>
<controls:Panorama>
<controls:PanoramaItem />
</controls:Panorama>
</Grid>
Upvotes: 1