AppStore.Templates.StartPage.GetElementRect C# (CSharp) Method

GetElementRect() public static method

This is the position of the retcangle where the app will be pinned on the Start Page.
public static GetElementRect ( FrameworkElement element ) : Rect
element Windows.UI.Xaml.FrameworkElement FrameworkElement element object
return Windows.Foundation.Rect
        public static Rect GetElementRect(FrameworkElement element)
        {
            GeneralTransform buttonTransform = element.TransformToVisual(null);
            Point point = buttonTransform.TransformPoint(new Point());
            return new Rect(point, new Size(element.ActualWidth, element.ActualHeight));
        }
    }