Double tap zoom does not work

4 posts, 0 answers
  1. Jaakko
    Jaakko avatar
    1 posts
    Member since:
    Jan 2013

    Posted 06 Mar 2013 Link to this post


    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 ), 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">
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>

                <ColumnDefinition Width="*"/>

            <Grid x:Name="ContentPanel" Grid.Row="1" Grid.Column="0"

                <slideView:PanAndZoomImage x:Name="PreviewPhoto" 

                <ProgressBar x:Name="BusyIndicator" 

            <!--TitlePanel contains the name of the application and page title-->
            <StackPanel x:Name="TitlePanel" Grid.Row="0" 
                <TextBlock x:Name="ApplicationTitle" Text="APP" 
                           Style="{StaticResource PhoneTextNormalStyle}"
                <TextBlock x:Name="PageTitle" Text="preview" 
                           Margin="21,-7,0,8" Style="{StaticResource PhoneTextTitle1Style}"/>

  2. Victor
    Victor avatar
    1349 posts

    Posted 07 Mar 2013 Link to this post

    Hi Jaako,

    Thanks for writing.
    The behavior you are experiencing is related to the fact that your PanAndZoomImage control is allowed determine its own size. You need to stretch the control over your allowed space in order to be able to double tap to zoom.

    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    May 2013

    Posted 04 Feb 2014 in reply to Victor Link to this post


    Could you let me know what you mean by stretching the control over the allowed space?  I am having the same problem and do not know what to do.  Could you update the code listed above to show how to stretch the control over the entire screen?
  5. Todor
    Todor avatar
    772 posts

    Posted 10 Feb 2014 Link to this post

    Hi Jonathan,

    I have attached a sample with slight modifications of the code from the previous post.

    Let us know if you need further assistance.

    If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
Back to Top