Bottomless Mode Example for Blazor

Nevron NOV RichTextEditor for Blazor ships with hundreds of examples with full source code, as part of the Nevron Open Vision Suite. All Blazor RichTextEditor examples are also available as a stand-alone Visual Studio solution in C#, which you can download from the links below.

Bottomless Mode Example for Blazor Description

The example demonstrates how to create a bottomless text control.


Bottomless Mode Example

C# Bottomless Mode Example Code for Nevron RichTextEditor for Blazor
Language: C#

using Nevron.Nov;
using Nevron.Nov.Dom;
using Nevron.Nov.Graphics;
using Nevron.Nov.Layout;
using Nevron.Nov.Text;
using Nevron.Nov.UI;
using Nevron.Nov.Windows.Forms;
using System.Windows.Forms;

namespace NovWinFormsProject
{
	public partial class Form1 : Form
	{
		#region Constructors

		public Form1()
		{
			InitializeComponent();

			// Set form title
			Text = "NOV WinForms - NBottomlessModeExample";

			// Create the NOV example and its controls
			NWidget exampleContent = CreateExampleContent();
			NWidget exampleControls = CreateExampleControls();
			if (exampleControls != null)
			{
				exampleControls.PreferredWidth = 300;
			}

			// Place the example and its controls in a pair box
			NPairBox pairBox = new NPairBox(exampleContent, exampleControls);
			pairBox.FillMode = ENStackFillMode.First;
			pairBox.FitMode = ENStackFitMode.First;
			pairBox.Margins = new NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing);

			// Host the example in the form
			NNovWidgetHost host = new NNovWidgetHost(pairBox);
			host.Dock = DockStyle.Fill;
			Controls.Add(host);
		}

		#endregion

		#region Example

		public NWidget CreateExampleContent()
		{
			// Create the rich text
			m_RichText = new NRichTextView();
			m_RichText.AcceptsTab = true;
			m_RichText.Content.Sections.Clear();

			NSection section = new NSection();
			section.Blocks.Add(new NParagraph("Type some content here"));
			m_RichText.Content.Sections.Add(section);

			m_RichText.Content.Layout = ENTextLayout.Web;

			m_RichText.ViewSettings.ExtendLineBreakWithSpaces = false;

			m_RichText.VScrollMode = ENScrollMode.Never;
			m_RichText.HScrollMode = ENScrollMode.Never;
			m_RichText.HRuler.Visibility = ENVisibility.Hidden;
			m_RichText.VRuler.Visibility = ENVisibility.Hidden;
			m_RichText.PreferredWidth = double.NaN;
			m_RichText.PreferredHeight = double.NaN;
			m_RichText.Border = NBorder.CreateFilledBorder(NColor.Black);
			m_RichText.BorderThickness = new NMargins(1);

			m_RichText.HorizontalPlacement = ENHorizontalPlacement.Fit;
			m_RichText.VerticalPlacement = ENVerticalPlacement.Top;

			return m_RichText;
		}
		public NWidget CreateExampleControls()
		{
			return null;
		}
		public string GetExampleDescription()
		{
			return @"

The example demonstrates how to create a bottomless text control.

"; } /// /// Gets the relevant documentation links for the example /// /// public (string Name, string Url)[] GetDocumentationUrls() { return new[] { ("Rich Text Documents - Overview", "https://www.nevron.com/docs/openvision/rich-text-documents-overview.html"), ("Rich Text Block Layout", "https://www.nevron.com/docs/openvision/rich-text-block-layout.html"), }; } #endregion #region Implementation #endregion #region Event Handlers #endregion #region Fields private NRichTextView m_RichText; #endregion #region Static Methods #endregion #region Constants #endregion #region Nested Types #endregion } }

Download a fully functional C# (.cs) Bottomless Mode Example for Blazor Solution