Beispiel #1
0
 void AppendText(string text)
 {
     Console.Write(text);
     _textOutput.InvokeOnMainThread(() => {
         _textOutput.Text = _textOutput.Text + text;
         var bounds       = _textOutput.GetCaretRectForPosition(_textOutput.SelectedTextRange.Start);
         _textOutput.ScrollRectToVisible(bounds, false);
     });
 }
        private static void AdjustTextViewSelection(UITextView textView)
        {
            // Ensure that the text view is visible by making the text view frame smaller as text can be slightly cropped at the bottom.
            // Note that this is a workwaround to a bug in iOS.
            textView.LayoutIfNeeded();

            var caretRect = textView.GetCaretRectForPosition(textView.SelectedTextRange.End);

            caretRect.Height += textView.TextContainerInset.Bottom;
            textView.ScrollRectToVisible(caretRect, false);
        }
		private void AdjustTextViewSelection(UITextView textView)
		{
			// Ensure that the text view is visible by making the text view frame smaller as text can be slightly cropped at the bottom.
			// Note that this is a workwaround to a bug in iOS.
			textView.LayoutIfNeeded ();

			var caretRect = textView.GetCaretRectForPosition (textView.SelectedTextRange.End);
			caretRect.Height += textView.TextContainerInset.Bottom;
			textView.ScrollRectToVisible (caretRect, animated: false);
		}