How to Migrate to .NET Framework 4.8 using ComponentOne

Many changes have been made to Microsoft’s .NET Framework over the years, and 4.8 is the final version. Earlier, ComponentOne controls were provided for both .NET Framework 2.0 and 4.0; as Microsoft has stopped supporting these frameworks, we have also put our 2.0 and 4.0 .NET Framework controls into maintenance mode. Our most recent framework controls are for version 4.8.

Many users wonder if there is an easy way to migrate their projects from .NET Framework 2.0 controls to 4.8 controls. Few of them also ask if they need to replace the existing 2.0 controls with some other controls or need to change the reference path. I’ll address these questions with solutions in this blog.

Download the latest version of ComponentOne Control Today!

How to Upgrade Your .NET Framework Project to 4.8

Before getting started, as suggested in the installation guide, you need to install the .NET Framework 4.8 WinForms controls from the ComponentOne C1ControlPanel utility. This installs multiple different framework controls side-by-side at this location:
C:\Program Files (x86)\ComponentOne\WinForms Edition\bin

It’s safe to install both 2.0 and 4.8 controls simultaneously. After that, you can perform the following steps to upgrade your WinForms Application from .NET Framework 2.0 controls to 4.8 controls:

  1. Right-click your project node in the Solution Explorer and change the target framework of your application to 4.8 or per your requirement.
  2. Close all open forms in the designer and then expand the References Node in the Solution Explorer in your project.
  3. Note and remove references to all the existing 2.0 dll(s) from ComponentOne.
  4. Right-click on the References Node and select the Add References option.
  5. Browse to the following location: C:\Program Files (x86)\ComponentOne\WinForms Edition\bin\v4.8 and add the required dll(s).
  6. Update your Licenses.licx file by removing the culture, version, and public key token information suggested in this blog. You can also generate it using LicxGenerator.
  7. Rebuild the whole project.

And that's it. Your project has been upgraded from the 2.0 framework to the latest 4.8 framework.

Notes:

  • The ComponentOne .NET Framework 4.0 controls have been in maintenance mode since 2019, so if you plan to migrate, you should choose 4.5.2 or 4.8 framework controls, which will be included in the 2022 v2 release. Maintenance mode means only critical bugs will be fixed - no new features or controls will be added.
  • If you get a license nag screen after upgrading the project, you may refer to the License troubleshooting FAQs or contact the support team by creating a ticket.

Reasons to Migrate From .NET Framework 2.0 to 4.8

Apart from evolving technology, there are numerous reasons to migrate from ComponentOne .NET Framework 2.0 controls to 4.8 controls. Many modifications have been done at the control level, and many new controls and features have also been added. Let’s break this part into two parts to explore them in detail:

  • New Controls Introduced
  • New Features Added

New Controls Introduced

Over the years, we have included many new controls in the WinForms suite to give our users a better option to choose the most suited control per their scenarios. Many old controls had been put into maintenance, so we have also designed a better replacement control for them with more features and better performance. Let’s look at some major controls added to suites given below:

FlexReport

FlexReport is an enhanced version of C1Report that gives .NET developers the ability to handle complicated challenges to meet the application’s business needs. FlexReport’s architecture is built on top of C1Report, so you will be familiar with using C1Report with several additional advantages. GrapeCity now encourages C1Report customers to convert their reports to FlexReport, as the 2018 v2 update has declared C1Report obsolete. You can upgrade or convert C1Reports to FlexReport with little time investment by following the steps given in this blog.

FlexChart

To provide a consistent coding experience across platforms, fulfill business-specific charting requirements, and deliver a modern appearance and feel, we built FlexChart based on our previous charting tools. Our goal was to make FlexChart a versatile and feature-rich tool for developers and end-users.  We put C1Chart into maintenance mode long back and started working on making FlexChart a control that can make all the small changes your chart needs to make a big difference.

Some of the key aspects we considered when we designed FlexChart are in the chart below:

Key Aspects

FlexPivot

ComponentOne Studio developed FlexPivot for WinForms, a robust data analysis control built and developed to meet the requirements of complex business intelligence applications. FlexPivot control is a much more advanced and improved version of OLAP control. It has replaced OLAP to become our flagship control. It is built on a super-charged data engine that can process millions of rows of data in milliseconds.

Ribbon

Back in 2019, we launched our new Office 365-based Ribbon. The Simplified Ribbon view is introduced in this control with the concept of displaying items in less vertical space. Also, the BackStageView is a new idea in the Simplified Ribbon that connects a separate user control with the Ribbon, where all the functionality associated with the tabs in the File menu can be found. The new Ribbon for WinForms is a better, faster, and the latest version of the already existing Ribbon for WinForms, now referred to as Classic Ribbon for WinForms. Existing users of Classic Ribbon may migrate to the latest version by following some simple steps described in the "Upgrade from Classic Ribbon to New Ribbon" topic.

PrintDocument

C1PrintDocument offers a comprehensive and feature-packed document object model (DOM), with support for a variety of layouts (inline, stacked), ambient and hierarchical styles, tables with an infinite number of levels of nesting, a table of contents, and granular control over pagination (orphan/widow, page size/headers/footers, etc.). It allows you to create complex documents completely through code and bind them to a database through a flexible data binding model. It generates documents that can be previewed, printed, persisted in a disc file, or exported to several external formats, including PDF (Portable Document Format) and RTF (Rich Text File).

The C1PrintDocument component was a part of the C1Report assembly for years. With the advent of the 2021 v2 release, we partitioned C1PrintDocument into its own assembly and simultaneously ported it to both.NET 5 and.NET 6 simultaneously, as C1Report had been marked obsolete many years back.

Several other controls have been added to the 4.x control suite that is not present in the 2.0 framework controls. These controls are DashboardLayout, ExpressionEditor, MultiSelect, RulesManager, Sparkline, TreeView, Calendar, and many more. You can find more information on these controls by following the link to our documentation

New Features Added

In addition to new controls in the ComponentOne suite, GrapeCity has upgraded its existing controls in terms of new features, performance, and improvements to constantly provide our customers with a better experience.

In the below-given tables, we have shown some important features added to our most used controls, which will help you to decide to migrate to 4.8 controls.

FlexGrid

Feature

Description

SearchThroughVisibleRows property

It determines whether to search through all rows or only the visible rows.

C1FlexGridRowDetail Control

This control can be used to represent data with relations.

SearchDefinition property

It is to get or set an XML string containing the current search state. 

DataAnnotations

Added reference to System.ComponentModel.DataAnnotations.dll for C1.Win.C1FlexGrid assemblies.

ColumnContextMenuEnabled property 

To enable showing the column context menu when the user clicks the right mouse on the column header.

MultiColumn Sort Option

It allows sorting multiple columns in a different order with a mouse click on its header.

AllowPinning property

It determines whether the grid should add pin buttons to the column headers and how the pin buttons should behave. 

C1FlexGridBandedView component

This is a C1FlexGrid extension component, which represents a C1FlexGrid external view with the ability to create and customize column bands at runtime and design time.

GanttView

Feature

Description

DragNotificationControl property

It provides a way to change the tooltip that is shown when a task is dragged in GanttView.

PrintInfo.PreviewHelper property

It allows one to customize the Print Preview dialog.

 Input:

Feature

Description

MouseWheelSelection property

This property indicates whether the selected item changes using the mouse wheel when the C1ComboBox isn't dropped down.

ShowTooltip property

It indicates whether or not the C1ComboBox displays a tooltip for the drop-down list item.

AllowPreload property

This property indicates whether C1ComboBox should preload items into the dropdown form after setting the data source.

TrueDBGrid:

Feature

Description

ShowExpandIcons property

It allows hide expand-collapse buttons for splits.

PrintCheckbox property

This property gets or sets a value indicating whether to print checkbox icons instead of Boolean values.                                      

FetchFilterStyles property

It determines whether the FetchFilterStyle event should be fired.

 

[C1TrueDBDropdown] CaseSensitive property

This property sets whether a search is case-sensitive when the ValueTranslate is true.

Conclusion

Neither Microsoft nor GrapeCity ComponentOne has no plans to end support for .NET Framework 4.8 as per this post, so you do not have to convert your application. Still, for new development, it is recommended to move to .NET 6.

We plan to continue enhancing the look and feel of our .NET 4.8 controls over the next release, as well as to work to address customer feedback on existing controls. However, this post does not provide an exhaustive list of minor bug fixes and features added to other controls. See the Release Notes for a complete list of changes and additions.

If you have any comments on the new features or want to share how these are helpful, drop a comment below! Check out the latest release and let us know what you think!

Download the latest version of ComponentOne Control Today!

comments powered by Disqus