RangeFromPoint() public method

public RangeFromPoint ( System.Point screenLocation ) : TextPatternRange
screenLocation System.Point
return System.Windows.Automation.Text.TextPatternRange
Beispiel #1
0
        //---------------------------------------------------------------------------
        // Wrapper for TextPattern.RangeFromPoint Method
        //---------------------------------------------------------------------------
        internal void Pattern_RangeFromPoint(TextPattern textPattern, ref TextPatternRange returnedRange, Point screenLocation, Type expectedException, CheckType checkType)
        {
            string call = "TextPattern.RangeFromPoint(" + screenLocation + ")";
            Comment("---Calling " + call);

            try
            {
                returnedRange = textPattern.RangeFromPoint(screenLocation);
            }
            catch (Exception actualException)
            {
                if (Library.IsCriticalException(actualException))
                    throw;

                TestException(expectedException, actualException, call, checkType);
                return;
            }

            if (returnedRange == null)
                throw new ArgumentNullException(call + " should not give a null TextPatternRange");

            TestNoExceptionQuiet(expectedException, call, checkType);
        }