<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 中时才起作用。
谢谢