.NET 11 Preview 2がMAUIをパフォーマンス向上とプラットフォーム改良で更新
.NET 11 Preview 2は、MAUIのMapコントロール、バインディングパフォーマンス、API一貫性に焦点を当てた、XAML、データバインディング、コントロール動作における具体的なユーザビリティとパフォーマンス問題に対処する、段階的だが具体的な更新を導入した。
キーポイント
MAUIの対象領域への更新
.NET 11 Preview 2は、.NET Multi-platform App UI (MAUI) に対して、Mapコントロール、バインディングパフォーマンス、API一貫性に焦点を当てた一連の対象を絞った更新を導入している。
変更の性質
変更は段階的だが具体的であり、XAML、データバインディング、コントロール動作における特定のユーザビリティとパフォーマンスの問題に対処している。
情報源と範囲
この情報はInfoQによって提供されており、.NET 11のプレビューリリースにおけるMAUIフレームワークの特定の改良点に焦点を当てている。
影響分析・編集コメントを表示
影響分析
この記事は、.NET MAUIフレームワークの継続的な開発と改良を強調しており、クロスプラットフォームアプリ開発者にとっては実用的な関心事である。ただし、これはプレビューリリースのマイナーアップデートであり、業界全体に大きな影響を与えるものではない。
編集コメント
これは.NET開発者、特にMAUIを使用するクロスプラットフォームアプリ開発者にとっては実用的な更新情報であるが、AI/テクノロジーニュースの専門アナリストの視点からは、AI業界との直接的な関連性は限定的である。
.NET 11 Preview 2 は、.NET Multi-platform App UI (MAUI) に対して、Map コントロール、バインディングのパフォーマンス、API の一貫性に焦点を当てた一連のターゲットされたアップデートを導入しました。これらの変更は漸進的ですが具体的なものであり、XAML、データバインディング、コントロールの動作における特定の使いやすさやパフォーマンスの問題に対処するものです。
今回のリリースは、新しい機能領域を広げるのではなく、既存の API を洗練させるという最近の方向性を継続しています。以前のバージョンでは、開発者はマップに関する XAML の記述冗長性、バインディングの非効率性、API 形状の一貫性の欠如に直面していましたが、Preview 2 ではこれらの領域に対して測定可能な改善と少数の動作変更で対応しています。
より目に見えるアップデートの一つは Map コントロールにおけるものです。今回のリリースでは、Location と MapSpan に対する新しい TypeConverter サポートが追加され、開発者が x:Arguments を使用せずに XAML 内で直接座標を定義できるようになりました。さらに、新しい Map.Region バインド可能プロパティにより、表示されるマップ領域の宣言的な初期化が可能になります。これら一連の変更により、XAML の冗長性が削減され、マップベースの UI における可読性が向上します。
Map コントロールはまた、要素に対するより良いランタイム制御も獲得しました。Polygon、Polyline、Circle を含むすべてのマップ形状が、IsVisible と ZIndex プロパティをサポートするようになり、開発者は要素を削除することなく表示の切り替えや描画順序の制御を行えるようになりました。さらに、これらの要素は Android、iOS、Mac Catalyst 全体でクリックイベントを公開するようになったため、カスタムプラットフォームコードなしでインタラクティブなオーバーレイを実現できます。
バインディングのパフォーマンスは、測定可能な向上が見られるもう一つの分野です。TypedBinding と SourceGeneratedBinding は、デリゲートのキャッシュ、バインドモードのキャッシュ、不要な変換の削除を通じて最適化されました。リリースノートによると、TypedBinding の実行時間は 47.47 ナノ秒から 32.90 ナノ秒に短縮され、1 操作あたりのメモリ割り当て量は 128 バイトから 64 バイトに削減されています。ソース生成バインディングも同様の改善を示し、実行速度が約 25% 向上し、メモリ使用量が半分になっています。これらの変更は、バインディングが頻繁に評価されるデータ集約型アプリケーションに直接的な影響を与えます。
今回のリリースでは、一般的に使用される型に対する不変性の保証も正式化されました。Color は ImmutableObject(true) アノテーションを付与され、Font は読み取り専用の構造体へと変更されています。これにより、XAML ソースジェネレーターがインスタンスを安全にキャッシュし、より効率的なコードパスを生成できるようになり、アプリケーション側の変更を必要とせずにランタイムパフォーマンスが向上します。
API の一貫性については VisualStateManager で対応されました。GetVisualStateGroups メソッドは now IList ではなく VisualStateGroupList を返すよう変更され、SetVisualStateGroups API と整合性が取られました。これは以前の戻り値タイプに依存するコードにとっては破壊的変更であり、型安全なシナリオでは更新が必要となる可能性があります。
長年のバインド問題も修正されました。Entry.Text を int? などの Nullable な値型にバインドする際、入力をクリアすると、以前は前の値を保持していましたが、現在は正しくバインドされたプロパティが null に設定されるようになりました。これにより、オプションの数値入力を含む双方向バインドのシナリオにおける正確性が向上します。
全体として、.NET 11 Preview 2 for MAUI は、XAML の使いやすさ、ランタイムパフォーマンス、API の整合性において集中的な改善をもたらしています。変更は広範なものではありませんが、開発者から報告された具体的な課題に対処し、フレームワークの中核部分を洗練させています。
開発者は、GitHub 上の MAUI リリースノートで各アップデートの詳細な文脈とともに、一連の変更点と関連するプルリクエストを参照できます。.NET 11 Preview 2 は、プレビューランタイムおよびツールパッケージとしてダウンロード可能です。
著者について
Edin Kapić
Edin Kapic は、スペイン・バルセロナに拠点を置き、Vista でリードソフトウェアエンジニアとして勤務しています。
エディンは 2005 年に .NET と SharePoint の扱いを始め、現在も引き続きそれらに触れています。彼は 2022 年まで SharePoint MVP として活動していました。同じく SharePoint に情熱を注ぐ他の二人と共に、SharePoint ユーザーグループ カタロニア(SUG.CAT)を設立し、現在は会長を務めています。スペイン国内外の多数の出版物やイベントで技術について執筆・講演を行っています。
技術的な仕事以外の空き時間には、フライトシミュレーション、セーリング、読書、ハイキングを楽しむのが好きです。
Show moreShow less
原文を表示
.NET 11 Preview 2 introduces a set of targeted updates to .NET Multi-platform App UI (MAUI), focusing on the Map control, binding performance, and API consistency. The changes are incremental but concrete, addressing specific usability and performance issues in XAML, data binding, and control behaviour.
The release continues the recent direction of refining existing APIs rather than introducing new surface area. In earlier versions, developers encountered verbosity in XAML for maps, inefficiencies in bindings, and inconsistencies in API shapes. Preview 2 addresses these areas with measurable improvements and a small number of behavioural changes.
One of the more visible updates is in the Map control. The release adds new TypeConverter support for Location and MapSpan, allowing developers to define coordinates directly in XAML without x:Arguments. In addition, a new Map.Region bindable property enables declarative initialisation of the visible map area. Together, these changes reduce XAML verbosity and improve readability in map-based UIs.
The Map control also gains better runtime control over elements. All map shapes, including Polygon, Polyline, and Circle, now support IsVisible and ZIndex properties, allowing developers to toggle visibility and control rendering order without removing elements. In addition, these elements now expose click events across Android, iOS and Mac Catalyst, enabling interactive overlays without custom platform code.
Binding performance is another area with measurable gains. TypedBinding and SourceGeneratedBinding have been optimised through delegate caching, binding mode caching, and removal of unnecessary conversions. According to the release notes, TypedBinding execution time decreased from 47.47 ns to 32.90 ns, while memory allocation dropped from 128 bytes to 64 bytes per operation. Source-generated bindings show similar improvements, with roughly 25 per cent faster execution and half the memory usage. These changes directly impact data-heavy applications where bindings are frequently evaluated.
The release also formalises immutability guarantees for commonly used types. Color is now annotated with ImmutableObject(true), and Font has been converted into a read-only struct. This enables the XAML source generator to safely cache instances and generate more efficient code paths, improving runtime performance without requiring application changes.
API consistency is addressed in VisualStateManager. The GetVisualStateGroups method now returns VisualStateGroupList instead of IList<VisualStateGroup>, aligning it with the SetVisualStateGroups API. This is a breaking change for code that depends on the previous return type and may require updates in strongly typed scenarios.
A long-standing binding issue has also been fixed. When binding Entry.Text to nullable value types, such as int?, clearing the input now correctly sets the bound property to null instead of retaining the previous value. This improves correctness in two-way binding scenarios involving optional numeric input.
Overall, .NET 11 Preview 2 for MAUI delivers focused improvements in XAML ergonomics, runtime performance, and API alignment. While the changes are not extensive, they address concrete issues reported by developers and refine core parts of the framework.
Developers can review the full set of changes and associated pull requests in the MAUI release notes on GitHub, which provide detailed context for each update. The .NET 11 Preview 2 is available for download as a preview runtime and tools package.
About the Author
Edin Kapić
Edin Kapic is a Lead Software Engineer working in Vista, based in Barcelona (Spain).
Edin started messing with .NET and SharePoint in 2005 and still tinkers with it. He was SharePoint MVP untin 2022. Together with two other like-minded SharePoint addicts he founded and currently acts as a president of the SharePoint User Group Catalonia (SUG.CAT). He writes and speaks about technology in numerous publications and events, in Spain and abroad.
When he has some free time, between technical stuff, he enjoys flight simulation, sailing, reading and hiking.
Show moreShow less
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み