Nevron Open Vision Documentation
Getting Started / Design-Time Support / Integrating NOV from the Visual Studio Toolbox
In This Topic
    Integrating NOV from the Visual Studio Toolbox
    In This Topic

    Most of the NOV widgets are exposed as toolbox items that allow you to directly place them inside a WinForms, WPF or Silverlight project. The toolbox items are installed in the Visual Studio Toolbox during the installation of NOV for Windows if you check the "Register in VS Toolbox" check box at install time. The following table lists the currently available toolbox items:

    The following sections describe how to use these controls.

    All NOV toolbox controls have a Widget property that exposes the widget embedded in the control (i.e. an instance of NButton, NRibbon, NRichTextView, NLinearGauge, etc.). The following code examples demonstrate how to use the Rich Text Text Editor toolbox item, but the code applies to other controls as well.

     Steps to Integrate a NOV Control inside WinForms
    1. Create a new Windows Forms Application project.
    2. Open "Form1.cs" in the designer.
    3. From the toolbox select NNovRichTextViewControl and drop it to the form.
    4. Open the form's source code and insert the following code:
      WinForms Example
      Copy Code
      using System;
      using System.Windows.Forms;
      using Nevron.Nov.Text;
      
      namespace WindowsFormsApplication1
      {
           public partial class Form1 : Form
           {
               public Form1()
               {
                   InitializeComponent();
               }
               protected override void OnLoad(EventArgs e)
               {
               base.OnLoad(e);
                   NRichTextView richTextView = nRichTextViewControl1.Widget;
                   NSection section = richTextView.Content.Sections[0];
                   section.Blocks.Clear();
                   section.Blocks.Add(new NParagraph("Hello Nevron Rich Text View"));
               }
           }
      }
      
    5. Run the application - it must display a rich text view control displaying "Hello Nevron Rich Text View".
     Steps to Integrate a NOV Control inside WPF
    1. Create a new WPF Application project.
    2. Open "MainWindow.xamls.cs" in the designer.
    3. From the toolbox select NNovRichTextViewControl and drop it to the window.
    4. Open the "MainWindow.xamls.cs" source file and insert the following code:
      WPF Example
      Copy Code
      using System.Windows;
      using Nevron.Nov.Text;
      
      namespace WpfApplication1
      {
          public partial class MainWindow : Window
          {
              public MainWindow()
              {
                  InitializeComponent();
                  NRichTextView richTextView = nRichTextViewControl1.Widget;
                  NSection section = richTextView.Content.Sections[0];
                  section.Blocks.Clear();
                  section.Blocks.Add(new NParagraph("Hello Nevron Rich Text View"));
              }
          }
      }
      
    5. Run the application - it must display a rich text view control displaying "Hello Nevron Rich Text View".
    See Also