Exemplo n.º 1
0
        /// <summary>
        /// Gets the <see cref="T:Size"/> uncovered by the SIP when it is shown.
        /// </summary>
        /// <param name="phoneApplicationFrame">The <see cref="T:PhoneApplicationFrame"/>.</param>
        /// <returns>The <see cref="T:Size"/>.</returns>
        public static Size GetSipUncoveredSize(this PhoneApplicationFrame phoneApplicationFrame)
        {
            double width  = phoneApplicationFrame.GetUsefulWidth();
            double height = phoneApplicationFrame.GetUsefulHeight() - phoneApplicationFrame.GetSipCoveredSize().Height;

            return(new Size(width, height));
        }
Exemplo n.º 2
0
        public static double GetUsefulHeight()
        {
            PhoneApplicationFrame phoneAppFrame = null;

            if (TryGetPhoneApplicationFrame(out phoneAppFrame))
            {
                return(phoneAppFrame.GetUsefulHeight());
            }

            return(Application.Current.Host.Content.ActualHeight);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the correct <see cref="T:Size"/> of a <see cref="T:PhoneApplicationFrame"/>.
 /// </summary>
 /// <param name="phoneApplicationFrame">The <see cref="T:PhoneApplicationFrame"/>.</param>
 /// <returns>The <see cref="T:Size"/>.</returns>
 public static Size GetUsefulSize(this PhoneApplicationFrame phoneApplicationFrame)
 {
     return(new Size(phoneApplicationFrame.GetUsefulWidth(), phoneApplicationFrame.GetUsefulHeight()));
 }