Setting the x and y location of a dragged item


I found a great blog for drag and drop in nativescript (, but I cannot figure out how to set an absolute x and y value for an element. I want an element to stick to another element, so essentially have the identical x and y of the element that gets dropped on. I see translateX and translateY move the element, but how do set the x and y to something specific?


If you are using AbsoluteLayout you can set left (x) and top (y) coordinates.


Yeah, that works if the container is an absolute layout. It would be nice if I could use a grid, but I guess I’ll figure it out.