private void keyb_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Grid uIElement = sender as Grid; pointDic[uIElement.Name] = e.GetPosition(null); Panel.SetZIndex(uIElement, 2); uIElement.CaptureMouse(); //keyb.Cursor = Cursors.Hand; }