<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中時才起作用。
謝謝
嘗試添加一些代碼,你的問題是真的缺乏精確度。 – perror 2013-05-02 10:15:54