internal void OnDragEnd(FrameworkElement child, Point origin, Point position) { if (child == null) { return; } Dispatcher.Invoke(() => { // Remove empty pages for (int i = pages.Count - 1; i >= 0; i--) { if (pages[i].Count == 0) { pages.RemoveAt(i); } } // Reset opacity child.Opacity = DefaultOpacity; child.SetValue(ZIndexProperty, TransitionZ); child.ReleaseMouseCapture(); dragging = null; UpdateFluidLayout(true); }); }