Nevron Open Vision Documentation
Text Command Bars Overview

NOV Rich Text Editor provides a lot of commands and settings most of which can be shown to the end user in a command bars interface (menu and toolbars). There are two ways to create command bars associated with a rich text view:

Rich Text View with Command Bars Control

The easiest way to create a rich text view with command bars is to use the Visual Studio designer and drop an NRichTextViewWithCommandBarsControl from the Visiual Studio toolbox to your form/window. Check out the Rich Text Command Bars Designer topic for more information on how to use the Visual Studio designer to customize the rich text command bars.

Alternatively, you can use the NRichTextViewWithCommandBars class to add a rich text view with command bars to your form/window programatically. The example below demonstrates how to create a rich text view with command bars hosted in a NOV widget host. You can then add this host to a form's Controls collection if you are creating a WinForms application, set it as the Content of a WPF window in a WPF application project or to the ContentView of a Xamarin.Mac window.

Create a rich text view with command bars
Copy Code
NRichTextViewWithCommandBars commandBarsUI = new NRichTextViewWithCommandBars(); // Create a rich text view with command bars
NRichTextView richTextView = ribbonUI.View; // Get the rich text view

// Create a NOV widget host that hosts the rich text view with command bars
NNovWidgetHost<NWidget> novHost = new NNovWidgetHost<NWidget>(commandBarsUI);
Rich Text Command Bar Builder

NOV Text Editor provides a command bar builder that can be used to create some menus and toolbars to control and edit the content of a rich text view. This builder is represented by the class NRichTextCommandBarBuilder.

The easiest way to create a rich text view with command bars (menus and toolbars) is to use the NRichTextViewViewWithCommandBars class. The example below demonstrates how to create a rich text view with command bars hosted in a NOV widget host. You can then add this host to a form's Controls collection if you are creating a WinForms application, set it as the Content of a WPF window in a WPF application project or to the ContentView of a Xamarin.Mac window.

Create a Rich Text View with Command Bars
Copy Code
NNovWidgetHost<NRichTextViewWithCommandBars> novContent = new NNovWidgetHost<NRichTextViewWithCommandBars>();

Another way to create a command bar based commanding UI and associate it with a rich text view is:

Create Command Bars UI
Copy Code
NRichTextCommandBarBuilder commandBarBuilder = new NRichTextCommandBarBuilder();
NWidget uiWidget = commandBarBuilder.CreateUI(richTextView);
See Also

Commanding

UI

Send Feedback