Avalonia 11.1.0-beta1 發佈

11.1.0-beta1

Avalonia 是 dotnet 的跨平臺 UI 框架,提供靈活的樣式系統,支持 Windows、macOS、Linux、iOS、Android 和 WebAssembly 等多種平臺。 Avalonia 已經成熟並已做好生產準備,已被 Schneider Electric、Unity、JetBrains 和 GitHub 等公司使用。

 

Full Changelog: https://github.com/AvaloniaUI/Avalonia/commits/11.1.0-beta1

完整變更日誌:https://github.com/AvaloniaUI/Avalonia/commits/11.1.0-beta1
Full API Diff: https://gist.github.com/maxkatz6/a7df42607cc7187b94e2e693ccf15f6d
完整 API 差異:https://gist.github.com/maxkatz6/a7df42607cc7187b94e2e693ccf15f6d

Please install latest dotnet templates.
請安裝最新的 dotnet 模板。

Most of new features are still pending updated documentation.
大多數新功能仍在等待更新文檔。

You can follow progress on this issue - AvaloniaUI/avalonia-docs#384.
您可以關注此問題的進展 - AvaloniaUI/avalonia-docs#384。

New features 新功能

  • Binding markup extension was refactored, and now supports UpdateSourceTrigger!
    綁定標記擴展已重構,現在支持 UpdateSourceTrigger!
  • Tizen backend with Tizen TV support.
    Tizen 後端,支持 Tizen TV。
  • XAML warnings support, starting with Obsolete and TemplatePart warnings. Configurable via csproj and editorconfig. XAML error reporting is now also improved, not being limited by a single error at a time.
    XAML 警告支持,從 Obsolete 和 TemplatePart 警告開始。可通過 csproj 和 editorconfig 配置。 XAML 錯誤報告現在也得到了改進,不再受一次單個錯誤的限制。
  • New top-level and application services: ILauncher, IInputPane, IActivatableLifetime.
    新的頂級和應用程序服務:ILauncher、IInputPane、IActivatableLifetime。
  • XY focus with arrow keys and remote DPad is now available.
    現在可以使用箭頭鍵和遠程 DPad 進行 XY 對焦。
  • Global exception handling via Dispatcher UnhandledException and UnhandledExceptionFilter.
    通過 Dispatcher UnhandledException 和 UnhandledExceptionFilter 進行全局異常處理。

New and extended controls:
新的和擴展的控件:

  • HyperlinkButton is now available.
    超鏈接按鈕現已可用。
  • MenuItem now supports ToggleType property, including CheckBox and Radio types with radio groups.
    MenuItem 現在支持 ToggleType 屬性,包括帶有單選組的 CheckBox 和 Radio 類型。
  • Border now includes a new BackgroundSizing property, allowing customizing transparent border brushes rendering.
    邊框現在包含一個新的 BackgroundSizing 屬性,允許自定義透明邊框畫筆渲染。
  • Many interactive controls were updated to be usable with TV remote control, where only DPad buttons and Space (Select) + Escape (Back) are available.
    許多交互式控件已更新爲可與電視遙控器一起使用,其中僅 DPad 按鈕和 Space(選擇)+ Escape(返回)可用。
  • NumericUpDown and AutoCompleteBox: MaxLength, InnerLeftContent, and InnerRightContent.
    NumericUpDown 和 AutoCompleteBox:MaxLength、InnerLeftContent 和 InnerRightContent。
  • WindowNotificationManager was refactored and now can be embedded at any level of the controls tree, not being hardcoded to the top level.
    WindowNotificationManager 進行了重構,現在可以嵌入到控件樹的任何級別,而不是硬編碼到頂層。
  • RadialGradientBrush now has separated RadiusX and RadiusY properties that allow absolute and relative values. Old Radius property is now obsolete.
    RadialGradientBrush 現在具有獨立的 RadiusX 和 RadiusY 屬性,允許絕對值和相對值。舊的 Radius 屬性現已過時。

New platform features 新平臺功能

Windows 視窗

  • DirectComposition rendering mode is now supported for older Windows versions (8.1+)
    舊版 Windows 版本 (8.1+) 現在支持 DirectComposition 渲染模式
  • It's now possible to add WndProc and WindowStyles callbacks via Win32Properties API.
    現在可以通過 Win32Properties API 添加 WndProc 和 WindowStyles 回調。

macOS 蘋果系統

  • TrayIcon now includes MacOSProperties.IsTemplateIcon attached property, allowing monochrome icons consistent with macOS system icons
    TrayIcon 現在包含 MacOSProperties.IsTemplateIcon 附加屬性,允許單色圖標與 macOS 系統圖標一致

Linux

  • It's now possible to set NetWmWindowType and WmClass on any window via X11Properties attached properties.
    現在可以通過 X11Properties 附加屬性在任何窗口上設置 NetWmWindowType 和 WmClass 。
  • Avalonia now respects XGD accent color spec.
    Avalonia 現在遵循 XGD 強調色規範。

Browser 瀏覽器

  • StaticWebAssets SDK is now supported. It brings support for building in .NET Brotli compression and caching. To use this SDK, please recreate the browser project from the new template using the 11.1.0-beta1 version.
    StaticWebAssets 現在支持 SDK。它支持構建 .NET Brotli 壓縮和緩存。要使用此 SDK,請使用 11.1.0-beta1 版本從新模板重新創建瀏覽器項目。
  • WebGL2 is now enabled by default.
    WebGL2 現在默認啓用。

iOS

  • Metal rendering mode was implemented and now can be enabled via iOSPlatformOptions.
    Metal 渲染模式已實現,現在可以通過 iOSPlatformOptions 啓用。
  • Physical keyboard and mouse input handling now work.
    物理鍵盤和鼠標輸入處理現在可以使用。
  • tvOS support was added. 添加了 tvOS 支持。

Android

  • Android TV support was added
    添加了 Android TV 支持

Breaking Changes 重大變化

  • iOS and Android backends now require .NET 8 or newer, as per .NET mobile workloads support timelines.
    根據 .NET 移動工作負載支持時間表,iOS 和 Android 後端現在需要 .NET 8 或更高版本。
  • Browser backend now also requires .NET 8 or newer, but also has changes to its project structure. We recommend using newer Avalonia templates as a reference, but a migration guide specifically for the browser is also planned.
    瀏覽器後端現在也需要 .NET 8 或更高版本,但其項目結構也發生了變化。我們建議使用較新的 Avalonia 模板作爲參考,但還計劃專門針對瀏覽器的遷移指南。

 

原文來源:https://github.com/AvaloniaUI/Avalonia/releases/tag/11.1.0-beta1

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章