开发者

Event Handler for ScatterViewItem Location Change in Surface SDK?

Does anyone know of an easy way to capture a ScatterViewItem's position (Center property) once it loses momentum and comes to a stop after being flicked across the screen? I have a "hotspot" area set up that I'd like to initiate a file transfer from once the item comes to a stop within its bounds.

So far I've tried a PropertyChanged Notification with no success:

    ---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 have a SizedChanged event handler that I use to track scalin开发者_如何学JAVAg with, but it doesn't make sense that a TranslationChanged event handler would not exist.

Also, I'm unable to make use of the ManipulationStarting/Delta/Completed events for a ScatterViewItem.

Thanks ahead of time,

-Z


Use ScatterManipulationDelta for position, size, and rotation

Edit: delta not changed

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜