c# - Enable Manipulation On Windows Phone 8 -


i have following code found here:

private void grid_manipulationstarted_1(object sender, manipulationstartedroutedeventargs e)     {         initialpoint = e.position;     }      private void grid_manipulationdelta_1(object sender, manipulationdeltaroutedeventargs e)     {         if (e.isinertial)         {             point currentpoint = e.position;             if (currentpoint.x - initialpoint.x >= 500)//500 threshold value, want trigger swipe right event             {                 system.diagnostics.debug.writeline("swipe right");                 e.complete();             }         }     } 

and xaml:

<page x:class="myapp.detailpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:myapp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d"> <viewbox x:name="mainviewbox" stretch="uniform" horizontalalignment="left" verticalalignment="top" margin="1, 1, 1, 1" manipulationdelta="grid_manipulationdelta_1" manipulationstarted="grid_manipulationstarted_1">     <grid manipulationdelta="grid_manipulationdelta_1" manipulationstarted="grid_manipulationstarted_1" background='transparent'>         <grid.rowdefinitions>             <rowdefinition height="auto"/>             <rowdefinition height="auto"/>             <rowdefinition height="*"/>             <rowdefinition height="auto"/>             <rowdefinition height="auto"/>         </grid.rowdefinitions>         <textblock x:name="idandtitletxt" horizontalalignment="center" verticalalignment="top" grid.row="1" textalignment="center" height="auto" width="auto" fontsize="20" foreground="white"/>         <textblock x:name="issuetype" horizontalalignment="center" verticalalignment="top" text="code defect" maxheight="10" height="auto" width="auto" foreground="white" fontsize="4"/>         <textblock x:name="userassignedto" horizontalalignment="center" verticalalignment="top" height="auto" width="auto" grid.row="3" foreground="white" fontsize="8"/>         <textblock x:name="statesubstate" horizontalalignment="center" verticalalignment="top" text="active / in progress" height="auto" width="auto" grid.row="4" foreground="white" fontsize="8"/>         <button x:name="backbtn" content="back" horizontalalignment="left" verticalalignment="top" height="40" width="40" grid.rowspan="2" grid.row="0"/>         <scrollviewer height="260" width="200" horizontalscrollbarvisibility="disabled" grid.row="2" canvas.top="60" canvas.left="340">             <textblock width="195" textwrapping="wrap" fontsize="5" x:name="descriptiontxt"/>         </scrollviewer>    </grid> </viewbox> 

my problem both manipulation events never fire no matter how swipe screen in directions. i've put breakpoints on event handlers confirm this. else has asked same question here there no answers. seeing question more 2 years ago, i'm rewriting it.

also, grid inside viewbox, in page (not window).

any appreciated :).

i guess meant windows phone 8.1 runtime application? because in silverlight works fine. should set manipulationmode all grid. in test worked fine without background color (which necessary in silverlight applications).

if need subset of manipulations, should use best mode needs.