/// <summary> /// Loads the contents of the stream into the TextView. /// </summary> /// <returns><c>true</c>, if stream was loaded, <c>false</c> otherwise.</returns> /// <param name="stream">Stream to load the contents from.</param> public void LoadStream(Stream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } ResetPosition(); model.LoadStream(stream); SetNeedsDisplay(); }