Пример #1
0
        public static Point GetNativeScreenPosition(this BindableObject bindableObject)
        {
            var view  = bindableObject.GetNativeView();
            var point = Point.Zero;

            if (view != null)
            {
                int[] location = new int[2];
                view.GetLocationOnScreen(location);
                point = new Xamarin.Forms.Point(location[0], location[1]);
            }
            return(point);
        }