This question is locked. New answers and comments are not allowed.
Hi!
I'm implementing a WP7.1 app that has a image preview screen that needs to be zoomable and pannable.
The PanAndZoomImage + busy indicator is the sole content of a portrait PhoneApplicationPage. The page title and app bar need to remain visible while zooming.
Now, the xaml pasted below is otherwise good for the purpose, but double tapping the image (after loading it, when zoom=1,1) does nothing. If I zoom in via pinch, double tap will return to normal zoom though. If I create a handler for Tap event, I can get the image to zoom, but double tap will return the image to default zoom. Also, if I add a handler for DoubleTap event (like in http://www.telerik.com/community/forums/windows-phone/slideview/selected-index.aspx ), anything I do related to zoom (e.g. set zoom to 2,2) seems to be overridden (by the default DoubleTap handling, perhaps).
Any hints on how to
a) enable the default double tap zoom in this case, or
b) override the default doubletap handler completely and implement custom zoom logic?
I'm using the WP7 Q3/2012 release.
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid x:Name="ContentPanel" Grid.Row="1" Grid.Column="0"
Margin="-12,-12,-12,0">
<slideView:PanAndZoomImage x:Name="PreviewPhoto"
ZoomMode="Free"
MaximumZoom="4,4"
VerticalAlignment="Top"
HorizontalAlignment="Center"/>
<ProgressBar x:Name="BusyIndicator"
Height="71"
Width="360"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Visibility="Collapsed"/>
</Grid>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0"
Margin="0,0,0,0"
Background="Black">
<TextBlock x:Name="ApplicationTitle" Text="APP"
Style="{StaticResource PhoneTextNormalStyle}"
Margin="21,17,0,0"/>
<TextBlock x:Name="PageTitle" Text="preview"
Margin="21,-7,0,8" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
</Grid>
I'm implementing a WP7.1 app that has a image preview screen that needs to be zoomable and pannable.
The PanAndZoomImage + busy indicator is the sole content of a portrait PhoneApplicationPage. The page title and app bar need to remain visible while zooming.
Now, the xaml pasted below is otherwise good for the purpose, but double tapping the image (after loading it, when zoom=1,1) does nothing. If I zoom in via pinch, double tap will return to normal zoom though. If I create a handler for Tap event, I can get the image to zoom, but double tap will return the image to default zoom. Also, if I add a handler for DoubleTap event (like in http://www.telerik.com/community/forums/windows-phone/slideview/selected-index.aspx ), anything I do related to zoom (e.g. set zoom to 2,2) seems to be overridden (by the default DoubleTap handling, perhaps).
Any hints on how to
a) enable the default double tap zoom in this case, or
b) override the default doubletap handler completely and implement custom zoom logic?
I'm using the WP7 Q3/2012 release.
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid x:Name="ContentPanel" Grid.Row="1" Grid.Column="0"
Margin="-12,-12,-12,0">
<slideView:PanAndZoomImage x:Name="PreviewPhoto"
ZoomMode="Free"
MaximumZoom="4,4"
VerticalAlignment="Top"
HorizontalAlignment="Center"/>
<ProgressBar x:Name="BusyIndicator"
Height="71"
Width="360"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Visibility="Collapsed"/>
</Grid>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0"
Margin="0,0,0,0"
Background="Black">
<TextBlock x:Name="ApplicationTitle" Text="APP"
Style="{StaticResource PhoneTextNormalStyle}"
Margin="21,17,0,0"/>
<TextBlock x:Name="PageTitle" Text="preview"
Margin="21,-7,0,8" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
</Grid>