Ranet UI 3.7 was developed for WPF and Silverlight frameworks but can also be used in Windows Forms applications. In this post, we will show how to integrate its components in a WinForms application as exemplified by integrating Dynamic Pivot Grid Control using Visual Studio 2015 (you need to have Ranet UI 3.7 installed on your PC).

  1. Start Visual Studio 2015 and create a new WinForms project.
Creating winforms project

Figure 1. Creating a WinForms project.

2. Open Reference Manager -> Assemblies -> Extensions, and add references to the following Ranet assemblies in the project (Figure 2):

  • Olap.Core.dll
  • Olap.dll
  • Olap.Mdx.dll
  • Olap.Themes.dll
Adding links to Ranet OLAP assemblies

Figure 2. Adding links to Ranet OLAP assemblies.

3. In the same window, go to Assemblies -> Framework  and add references to the assemblies required by WPF:

  • PresentationCore.dll
  • PresentationCore.dll
  • PresentationFramework.dll
  • System.Xaml.dll
  • WindowsBase.dll

4. You will need System.Windows.Application instance in order to work with WPF components. Open Program.cs and change the code of Main method as follows, also adding Ranet services initialization:

5. Open Toolbox, select ElementHost component from WPF Interoperability category and drag it to the form (Figure 3).

Adding ElementHost to form

Figure 3. Adding ElementHost to the form

6. Open the form’s code and add DynamicPivotGridControl initialization:

7. Now you can compile and start the application.

Starting application

Figure 4. Application with Ranet UI.

We hope this article was helpful for you.

Contact us if you have any questions about integrating Ranet UI library in a WinForms application or any other question about Ranet UI.