0

我有一个SurfaceWindow. 在它里面是一个Scatterview带有 aScatterViewItem并且在Scatterviewitem里面是一个包含SurfaceUserControl. 我ContactEvents在控件中添加了一些,例如ContactDownContactupContactTapGesture等(以及事件的预览版本)。

触发的唯一事件是contactdown 和 leave。在Scatterviewitem其他事件上也有效。

有人知道为什么吗?

对不起,我不能给你看任何代码。我在工作,由于某种原因代理阻止了登录到该站点。我正在用我的手机写这个。

4

1 回答 1

1
<s:SurfaceWindow x:Class="WeltkarteSurface.SurfaceWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:uc="clr-namespace:WeltkarteSurface"
    Title="WeltkarteSurface" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="768" Width="1024" SizeToContent="Manual" Loaded="SurfaceWindow_Loaded" >
  <s:SurfaceWindow.Resources>
    </s:SurfaceWindow.Resources>
    <Grid>
        <s:ScatterView x:Name="MainScatterView" Background="#FFB4DCFC">
            <s:ScatterViewItem x:Name="MainScatterViewItem" MinWidth="1024" MinHeight="768" Center="512,384" CanRotate="False" Width="1024" Height="768" Background="Transparent" ScatterManipulationDelta="MainScatterViewItem_ScatterManipulationDelta" >
                <s:ScatterViewItem.Template>
                    <ControlTemplate>
                        <Viewbox x:Name="MainViewbox">
                            <uc:MainMap PreviewContactTapGesture="MainMap_PreviewContactTapGesture" ContactTapGesture="MainMap_ContactTapGesture"></uc:MainMap>
                        </Viewbox>
                    </ControlTemplate>
                </s:ScatterViewItem.Template>
            </s:ScatterViewItem>
        </s:ScatterView>
    </Grid>
</s:SurfaceWindow>

这是我的 Surfacewindow 代码。MainMap 上的 PreviewContactTapGesture 和 ContactTapGesture 事件仅在它们不在 Scatterviewitem 中时才起作用。

谢谢

于 2013-05-02T12:20:09.780 回答