Last week, the .NET Team announced the second preview release of .NET 10 introducing several enhancements across various components, including .NET Runtime, SDK, libraries, C#, ASP.NET Core, Blazor, .NET MAUI, and more.
One of the key updates in ASP.NET Core focuses on improving both the user experience and development flexibility. A notable addition is the ReconnectModal component for Blazor Web App projects. This new UI component gives developers more control over the reconnection process when a client loses its WebSocket connection.
As stated, the component is bundled with its own stylesheet and JavaScript files, ensuring it adheres to stricter Content Security Policy (CSP) settings. Developers can now better manage the reconnection state with new features such as the retrying state and an event to signal state changes.
Furthermore, the NavigateTo function in Blazor has been updated to prevent the browser from scrolling to the top of the page when navigating to the same page, improving the user experience by maintaining the scroll position.
Another update to the NavLink component allows it to ignore query strings and fragments when using NavLinkMatch.All, offer more precise control over link-matching behavior. Also, a new method, CloseColumnOptionsAsync, is introduced for closing column options in the QuickGrid component, simplifying UI interactions.
Continuing from Preview 1, the XML documentation comments are now included in OpenAPI documents when using ASP.NET Core, providing as stated, richer metadata for APIs. This feature requires enabling XML documentation in the project file and is processed at build-time.
A note for the developers that a new upgrade to OpenAPI.NET v2.0.0-preview7 brings several improvements, including breaking changes that affect document transformers and other OpenAPI operations.
In .NET MAUI, several new features are introduced, including the ShadowTypeConverter for improved shadow styling, which supports flexible shadow configurations using formatted strings. The SpeechOptions API now includes a Rate property to control the playback speed for text-to-speech functionality.
A platform-specific update allows modals to be displayed as popovers on iOS and Mac Catalyst, giving developers more control over modal presentations. The Switch control now supports setting an OffColor in addition to the existing OnColor. The HybridWebView component introduces a new InvokeJavascriptAsync method, simplifying the interaction with JavaScript in WebView controls.
Entity Framework Core 10 in this preview adds support for the RightJoin operator, allowing developers to perform right joins in queries, complementing the previously introduced LeftJoin operator. Small improvements have also been made to optimize database root handling and other internal processes.
WPF has seen performance improvements, particularly in UI automation, file dialogs, and pixel format conversions. Bug fixes in Fluent style components have addressed issues with default styles for Label and animation for the Expander controls. Several other bug fixes have been applied, including resolving issues with text pointer normalization and localization for various UI components.
C# 14 introduces partial instance constructors and events, expanding the range of partial members that can be used in classes. These features, along with partial methods and properties introduced in previous versions, enhance the flexibility and modularity of class implementations, especially for use with source generators.
For those interested in further details and other changes, the full release notes are available, offering an in-depth look at the second preview of .NET 10.