コード例 #1
0
        public static Point GetNativeScreenPosition(this VisualElement element)
        {
            var view  = element.GetNativeView();
            var point = Point.Zero;

            if (view != null)
            {
                int[] location = new int[2];
                view.GetLocationOnScreen(location);
                point = new global::Xamarin.Forms.Point(location[0], location[1]);
            }
            return(point);
        }
コード例 #2
0
        public static Point GetNativeScreenPosition(this VisualElement element)
        {
            var view  = element.GetNativeView();
            var point = Point.Zero;

            if (view != null)
            {
                int[] location = new int[2];
                var   p        = view.TransformToVisual((UIElement)view.Parent).TransformPoint(new Windows.Foundation.Point(0.0, 0.0));
                point = new global::Xamarin.Forms.Point(location[0], location[1]);
            }
            return(point);
        }
コード例 #3
0
 private void OnTap(global::Xamarin.Forms.Point location)
 {
 }