0

私は持っていSurfaceWindowます。その中に がありScatterviewScatterViewItemの中に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 に答える