What's new in 4.0

Wisej.NET 4 Introduction

Getting Started

Wisej.NET 4 introduces significant improvements driven by two main factors:

  • The adoption of a .NET Core-only designer

  • The replacement of GDI+ with our managed graphics system

The .NET Core-only designer, in addition to the existing .NET Framework 4.8 designer enables projects to use the latest .NET Core libraries without maintaining .NET Framework compatibility.

Replacing GDI+ with our managed System.Drawing library standardizes font measurements across platforms and removes the need for libgdiplus on Linux systems.

Visual Studio 2019 is not supported with the Wisej.NET 4 Designer, regardless of whether you use .NET Framework 4.8 or .NET Core.

.NET Core Designer

Rebuilding Wisej.NET designers for the out-of-process .NET Core Designer required substantial changes and may present challenges in upcoming builds. Please be prepared to troubleshoot potential issues as we refine the implementation.

Because Visual Studio uses the .NET Framework, Microsoft divided the designer into two parts: the "client" component running on the .NET Framework within Visual Studio and the "server" component running in a hidden .NET Core process. These components connect through an interprocess communication framework. For details on these Visual Studio changes, visit Microsoft's documentation.

For details on the .NET Core designer in Wisej.NET 4, visit:

.NET Core Designer

Managed Graphics

System.Drawing in .NET Framework and System.Drawing.Common In .NET Core wrap Windows GDI+, the graphics device interface is used to render graphics and load fonts on Windows. System.Drawing.Common extends to Linux using libgdiplus. Microsoft provides no graphic support in .NET Core for iOS or Android platforms.

In Wisej.NET 3.5, font loading used different libraries per platform. .NET Framework 4.8 used System.Drawing with Windows GDI+. .NET Core used System.Drawing.Common with libgdiplus on Linux. Wisej.NET Hybrid applications used an early System.Drawing reimplementation using ImageSharp for iOS and Android. This caused font measurement differences across platforms.

Wisej.NET uses two System.Drawing classes: Font for measuring labels in AutoSize controls and Image for loading and managing image resources.

While Wisej.NET doesn't use drawing operations directly, it supports applications that need painting capabilities.

Read below to understand how these changes affect your projects and potential issues to avoid:

Managed Graphics

Fluent Markup

Microsoft introduced Fluent Markup extensions for .NET Multi-platform App UI (MAUI), which are documented at Fluent Markup Extensions. These extensions streamline declarative UI development in code.

Wisej.NET 4 incorporated comprehensive support for Fluent Markup syntax in both C# and VB.NET, enabling consistent coding across programming languages.

For an introduction to Wisej.Web.Markup extensions, visit:

Fluent Markup

Markdown Support

Wisej.NET controls with labels include the AllowHtml property for HTML tags in text.

We've added the AllowMarkdown property to complement AllowHtml. This property enables markdown text rendering across Wisej.NET controls - expanded text formatting options.

Markdown Support

Enhancements and Changes

Service Provider

Application.Services methods are now chainable, allowing concise syntax like Application.Services.AddService<Service1>().AddService<Service2>().

The new AddOrReplaceService method replaces a service without requiring prior removal.

HttpOnly Cookies

We now fully support HttpOnly cookies. Previously, developers could use HttpOnly cookies through the native HttpContext. The Wisej.Base.Cookie class now includes a property for managing HttpOnly cookies.

ControlRendered and ControlUpdated Events

All controls now include the ControlRendered and ControlUpdated events. This allows applications to modify control JSON rendering and handle browser updates without subclassing.

These events enable Wisej.AI to add AI capabilities to any Wisej.NET control.

Updated Templates

All C# templates have been revised to incorporate the latest C# syntax enhancements, specifically utilizing file-scoped namespaces and top-level statements.

The updated file-scoped namespace declaration is now implemented across all .cs files. However, the transition to top-level statements is applied exclusively to the Startup.cs file. This modern approach simplifies the code structure, making it cleaner and easier to read.

Upgrade from 3.x

Some Wisej.NET projects need changes in .resx (resource) and .Designer.cs (designer) files for Wisej.NET 4 and managed System.Drawing compatibility.

To facilitate this transition, we have provided an upgrade tool that automatically implements these changes across your project files.

For detailed instructions, visit:

Upgrade from 3.x

.NET Framework and VB.NET Support

Wisej.NET continues to support .NET Framework 4.8 (and newer) and VB.NET at both runtime and design time. As with all preceding versions, we will maintain this support for the foreseeable future.

Wisej.NET 3.5 Support

To facilitate a smooth transition from Wisej.NET version 3.5 to version 4.0, we will continue to maintain the 3.5 branch by providing bug fixes and enhancements for at least one year following the initial stable release of version 4.0. This ensures ongoing support and stability for existing users during their upgrade process.

Last updated

Was this helpful?