Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight 在WindowsPhone7中,当用户按下屏幕上的任意位置时,如何引发事件_Silverlight_Windows Phone 7 - Fatal编程技术网

Silverlight 在WindowsPhone7中,当用户按下屏幕上的任意位置时,如何引发事件

Silverlight 在WindowsPhone7中,当用户按下屏幕上的任意位置时,如何引发事件,silverlight,windows-phone-7,Silverlight,Windows Phone 7,我不熟悉使用silverlight的WindowsPhone7。 我希望用户能够按下屏幕上的任何位置,它将引发一个事件,我将能够知道用户在屏幕上按下的位置 请帮帮我。您可能无法将单击事件添加到页面的主标记中,但可以在页面标记中使用MouseLeftButtonUp。您可能无法将单击事件添加到页面的主标记中,但可以在页面标记中使用MouseLeftButtonUp。尝试使用。 如果需要捕获页面上的点击事件,则必须使用GestureListner类的服务 <phone:PhoneApplica

我不熟悉使用silverlight的WindowsPhone7。 我希望用户能够按下屏幕上的任何位置,它将引发一个事件,我将能够知道用户在屏幕上按下的位置


请帮帮我。

您可能无法将单击事件添加到页面的主标记中,但可以在页面标记中使用MouseLeftButtonUp。

您可能无法将单击事件添加到页面的主标记中,但可以在页面标记中使用MouseLeftButtonUp。

尝试使用。 如果需要捕获页面上的点击事件,则必须使用GestureListner类的服务

<phone:PhoneApplicationPage 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Name="phoneApplicationPage" 
    x:Class="XXXXX"
    >
       <toolkit:GestureService.GestureListener>
                <toolkit:GestureListener Tap="Page_Tap" />
       </toolkit:GestureService.GestureListener>
        .
        .
        .
尝试使用。 如果需要捕获页面上的点击事件,则必须使用GestureListner类的服务

<phone:PhoneApplicationPage 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Name="phoneApplicationPage" 
    x:Class="XXXXX"
    >
       <toolkit:GestureService.GestureListener>
                <toolkit:GestureListener Tap="Page_Tap" />
       </toolkit:GestureService.GestureListener>
        .
        .
        .

它在模拟器中工作。然而,当它在真正的手机上工作时,那里没有鼠标,它会以同样的方式工作吗?对不起,这个新手的问题,鼠标只是指任何在模拟器中工作的输入设备。然而,当它在真正的手机上工作时,那里没有鼠标,它会以同样的方式工作吗?很抱歉,新手问题鼠标只是指任何输入设备