Ejemplo n.º 1
0
        private static void PopoutCard(UIElement element, DragImage image, Point relativePosition)
        {
            // Copy the selected card into a bitmap for use as the movement target
            var bitmap = new WriteableBitmap(element, null);
            image.Image.Source = bitmap;
            image.Visibility = Visibility.Visible;
            image.Opacity = 1.0;

            // this needs to be relative to the scrolled position
            image.SetVerticalOffset(relativePosition.Y);
            //image.SetHorizontalOffset(relativePosition.X);

            // hide the underlying item
            element.Opacity = 0.0;
        }