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