0

ScatterViewItemの位置(Centerプロパティ)が勢いを失い、画面上でフリックされた後に停止した場合に、ScatterViewItemの位置(Centerプロパティ)をキャプチャする簡単な方法を知っている人はいますか?アイテムがその範囲内で停止したときにファイル転送を開始したい「ホットスポット」エリアを設定しています。

これまでのところ、PropertyChanged通知を試しましたが成功しませんでした。

    ---OvelayWrapper.xaml.cs---
    ---------------------------
    public event PropertyChangedEventHandler PropertyChanged;

    public Point CurrentLocation
    {
        get
        {
            return _CurrentLocation;
        }
        set
        {
            _CurrentLocation = value;
            OnPropertyChanged("CurrentLocation");
        }
    }
    protected void OnPropertyChanged(string newLoc)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(newLoc));
        }
        Console.WriteLine("New Location Recorded");
    }


    ---OverlayWrapper.xaml---
    -------------------------
    <s:ScatterViewItem Center="{Binding Path=CurrentLocation}">
            <Label Content="Test" />
    </s:ScatterViewItem>

ScatterViewItemsには、スケーリングを追跡するために使用するSizedChangedイベントハンドラーがありますが、TranslationChangedイベントハンドラーが存在しないことは意味がありません。

また、ScatterViewItemのManipulationStarting / Delta/Completedイベントを利用できません。

よろしくお願いします、

-Z

4

1 に答える 1

1

位置、サイズ、回転にはScatterManipulationDeltaを使用します

編集:デルタは変更されていません

于 2011-09-15T12:39:14.763 に答える