Microsoft.Silverlight.Testing.Controls.NumericExtensions.IsGreaterThan C# (CSharp) Method

IsGreaterThan() public static method

Determine if one number is greater than another.
public static IsGreaterThan ( double left, double right ) : bool
left double First number.
right double Second number.
return bool
        public static bool IsGreaterThan(double left, double right)
        {
            return (left > right) && !AreClose(left, right);
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Handle keys related to scrolling.
        /// </summary>
        /// <param name="key">The key to handle.</param>
        /// <returns>A value indicating whether the key was handled.</returns>
        private bool HandleScrollKeys(Key key)
        {
            ScrollViewer scrollHost = ItemsControlHelper.ScrollHost;

            if (scrollHost != null)
            {
                switch (key)
                {
                case Key.PageUp:
                    // Move horizontally if we've run out of room vertically
                    if (!NumericExtensions.IsGreaterThan(scrollHost.ExtentHeight, scrollHost.ViewportHeight))
                    {
                        scrollHost.PageLeft();
                    }
                    else
                    {
                        scrollHost.PageUp();
                    }
                    return(true);

                case Key.PageDown:
                    // Move horizontally if we've run out of room vertically
                    if (!NumericExtensions.IsGreaterThan(scrollHost.ExtentHeight, scrollHost.ViewportHeight))
                    {
                        scrollHost.PageRight();
                    }
                    else
                    {
                        scrollHost.PageDown();
                    }
                    return(true);

                case Key.Home:
                    scrollHost.ScrollToTop();
                    return(true);

                case Key.End:
                    scrollHost.ScrollToBottom();
                    return(true);

                case Key.Left:
                    scrollHost.LineLeft();
                    return(true);

                case Key.Right:
                    scrollHost.LineRight();
                    return(true);

                case Key.Up:
                    scrollHost.LineUp();
                    return(true);

                case Key.Down:
                    scrollHost.LineDown();
                    return(true);
                }
            }
            return(false);
        }
All Usage Examples Of Microsoft.Silverlight.Testing.Controls.NumericExtensions::IsGreaterThan