.NET 10 预览版 7 通过 XAML 源生成器加速了.NET MAUI。

  • August 12th: Microsoft Rolled Out.NET MAUI Preview 7

    • Focuses on compile-time XAML processing, richer media metadata support, safer UI layouts, and refined toolbar APIs.
  • MAUI Overview

    • Stands for Multiplatform Application UI. An evolution of Xamarin and Xamarin Forms frameworks, unifying target libraries and projects into one for multiple devices.
    • Currently supports Android 5+, iOS 12.2+, macOS 12+ (Mac Catalyst), Samsung Tizen, Windows 10 version 1809+, or Windows 11. No changes in supported minimum platforms from last year's version 9.
  • Build-Time XAML Compilation

    • XAML markup is now compiled at build time instead of runtime, reducing app startup latency, surfacing errors earlier, and enabling code inspection.
    • Developers need to add EnablePreviewFeatures property and decorate root namespace with XamlProcessing attribute.
  • MediaPicker and EXIF Metadata

    • MAUI can handle embedded EXIF metadata when selecting images via MediaPicker control.
    • New update preserves existing EXIF metadata when the image is picked.
  • Safe Area Improvements

    • Adds several new features for the Safe Area to prevent content from being rendered outside the device-specific screen space.
    • Layout logic around notches, rounded corners, and display cutouts is smarter, giving developers more control.
  • Toolbar Enhancements

    • Toolbars can now include secondary items rendered as device-specific secondary menu items.
    • ToolbarItem markup needs to include Order property set to Primary or Secondary.
  • New APIs and Deprecated Ones

    • Added several new APIs to controls like controlling pickers' states and exposing TabbedPageManager class.
    • Deprecated APIs like Accelerator class from Microsoft.Maui.Controls and ClickGestureRecognizer removed in favor of TapGestureRecognizer.
  • Developer Feedback

    • Generally positive. Stuart Ballard asked if Xaml source generator is limited to MAUI or can be general-purpose.
    • A post on windowsforum.com stated that Preview 7 is a consolidation pass focusing on quality improvements.
  • Complete Release Notes

    • Readers can refer to GitHub official MAUI repository for detailed release notes.
阅读 24
0 条评论