BaconographyWP8.Common.ReorderListBox.dragInterceptor_ManipulationCompleted C# (CSharp) Method

dragInterceptor_ManipulationCompleted() private method

Called when the user releases a drag. Moves the item within the source list and then resets everything.
private dragInterceptor_ManipulationCompleted ( object sender, System.Windows.Input.ManipulationCompletedEventArgs e ) : void
sender object
e System.Windows.Input.ManipulationCompletedEventArgs
return void
        private void dragInterceptor_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            if (this.dragItem == null)
            {
                return;
            }

            if (this.dropTargetIndex >= 0)
            {
                this.MoveItem(this.dragItem, this.dropTargetIndex);
            }

            if (this.dragItemContainer != null)
            {
                this.dragItemContainer.Visibility = Visibility.Visible;
                this.dragItemContainer.Opacity = 0;
                this.AnimateDrop(this.dragItemContainer);
                this.dragItemContainer = null;
            }

            this.dragScrollDelta = 0;
            this.dropTargetIndex = -1;
            this.ClearDropTarget();
        }