Wisej.NET v4.0

Released: Apr 28, 2025

v4.0 での更新項目

機能

  • Wisej.NET v4 introduces significant improvements driven by these main factors:
    • The adoption of a .NET Core-only designer - 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.
    • The replacement of GDI+ with their managed graphics system - Replacing GDI+ with a managed System.Drawing library standardizes font measurements across platforms and removes the need for libgdiplus on Linux systems.
  • 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.
  • 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.
  • Markdown Support:
    • Wisej.NET controls with labels include the AllowHtml property for HTML tags in text.
    • Added the AllowMarkdown property to complement AllowHtml. This property enables markdown text rendering across Wisej.NET controls - expanded text formatting options.
  • 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:
    • Now fully supports 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.