none
MultiTouchBehavior IsMockActive问题 RRS feed

  • 问题

  • MultiTouchBehavior IsMockActive设置为FALSE后,  可以实现多点操作,但是再次进入这个页面后,程序就挂了

    MultiTouchBehavior IsMockActive设置为TRUE 程序就不会挂,但是多点触模就很难捕获



    请问这是什么问题??
    2011年5月31日 3:04

答案

  • 如果您是在模拟器中Debug调试,请参考以下内容。

    IsMockActive (optional, default=false): If true, enables the mock mode (see the corresponding section below).This is not a dependency property. It must be set before the application starts, in XAML. Also, it is only active when the application runs in the DEBUG configuration.

    Using the Mock mode

    Nowadays one of the obstacles to multitouch programming is the cost and availability of touch screens on computers. In order to palliate this and make multitouch programming available to everyone, the MultiTouch Behavior for Windows Phone 7 has a Mock mode which can be enabled by setting the IsMockActive property to true. In Mock mode, the behavior stops reacting to the fingers manipulations, but instead reacts to the mouse only.

     

    code  at http://multitouch.codeplex.com.


    Cedar
    2011年5月31日 7:27
    版主

全部回复

  • 如果您是在模拟器中Debug调试,请参考以下内容。

    IsMockActive (optional, default=false): If true, enables the mock mode (see the corresponding section below).This is not a dependency property. It must be set before the application starts, in XAML. Also, it is only active when the application runs in the DEBUG configuration.

    Using the Mock mode

    Nowadays one of the obstacles to multitouch programming is the cost and availability of touch screens on computers. In order to palliate this and make multitouch programming available to everyone, the MultiTouch Behavior for Windows Phone 7 has a Mock mode which can be enabled by setting the IsMockActive property to true. In Mock mode, the behavior stops reacting to the fingers manipulations, but instead reacts to the mouse only.

     

    code  at http://multitouch.codeplex.com.


    Cedar
    2011年5月31日 7:27
    版主
  • 恩 这个我也看过,但是不是很明白... It must be set before the application starts, in XAML.这个不怎么明白 我代码是这样子的 <Image Name="imgBack" Grid.Row="1" Grid.Column="0"> <Image.Projection> <PlaneProjection x:Name="planeProjection" /> </Image.Projection> <tb:MultiTouchBehavior AreFingersVisible="False" IsDebugModeActive="False" IsMockActive="True" IsRotateEnabled="False" IsScaleEnabled="True" IsTranslateXEnabled="True" IsTranslateYEnabled="True" MaximumScale="3" MinimumScale="1" ManipulationCompleted="onManipulationCompleted" ManipulationStarted="onManipulationStarted" /> <toolkit:GestureService.GestureListener> <toolkit:GestureListener DoubleTap="onDoubleTap" GestureCompleted="onGestureCompleted" /> </toolkit:GestureService.GestureListener> </Image> IsMockActive="True" 系统就很难实现缩放的手势了,这个设置不会导致第二次近来的时候程序挂. IsMockActive="False" 实现的效果就和系统自带的图片浏览器一样了,很容易就能缩放图片, 但是这个 第二次进入这个 XAML程序就挂掉了 ... 另外我 debug 和release都试过 效果一样的
    2011年5月31日 8:38