Exemplo n.º 1
0
        private async void OnPointerPressed(object sender, PointerRoutedEventArgs e)
        {
            UIElement uiElement = sender as UIElement;
            int       zIndex    = Canvas.GetZIndex(uiElement);

            if (e.GetCurrentPoint(uiElement).Position.Y < 30)
            {
                Canvas.SetZIndex(uiElement, zIndex + 1000);

                if (sender.GetType() == typeof(Grid))
                {
                    Grid grid = sender as Grid;
                    await StaticHelpers.DragAsync(grid, e);
                }



                await SaveGridLocations();

                Canvas.SetZIndex(uiElement, zIndex);
            }
        }
 private async void NonClientRectangle_OnPointerPressed(object sender, PointerRoutedEventArgs e)
 {
     await StaticHelpers.DragAsync(this, e, null);
 }