Skip to content

Commit fdb031b

Browse files
jamesmontemagnodavidortinaujonathanpeppers
authored
Update dotnetmaui for preview 7 (#9997)
* Update dotnetmaui for preview 7 * Update dotnetmaui.md for preview 7 with copilot consolidation * Update release-notes/10.0/preview/preview7/dotnetmaui.md Co-authored-by: Jonathan Peppers <[email protected]> * Update dotnetmaui.md * Update dotnetmaui.md --------- Co-authored-by: David Ortinau <[email protected]> Co-authored-by: Jonathan Peppers <[email protected]>
1 parent d6211d7 commit fdb031b

File tree

1 file changed

+194
-4
lines changed

1 file changed

+194
-4
lines changed

release-notes/10.0/preview/preview7/dotnetmaui.md

Lines changed: 194 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,202 @@
22

33
Here's a summary of what's new in .NET MAUI in this preview release:
44

5-
- [Feature](#feature)
5+
- .NET MAUI
6+
- [XAML Source Generator](#xaml-source-generator)
7+
- [MediaPicker EXIF Support](#mediapicker-exif-support)
8+
- [SafeArea Enhancements](#safearea-enhancements)
9+
- [Secondary Toolbar Items](#secondary-toolbar-items)
10+
- [New Control APIs](#new-control-apis)
11+
- [Deprecated API Removals](#deprecated-api-removals)
12+
- [.NET for Android](#net-for-android)
13+
- [.NET for iOS, Mac Catalyst, macOS, tvOS](#net-for-ios-mac-catalyst-macos-tvos)
614

715
.NET MAUI updates in .NET 10:
816

9-
- [What's new in .NET MAUI](https://learn.microsoft.com/dotnet/maui/whats-new/) documentation
17+
- [What's new in .NET MAUI in .NET 10](https://learn.microsoft.com/dotnet/maui/whats-new/dotnet-10) documentation.
1018

11-
## Feature
19+
## XAML Source Generator
1220

13-
Something about the feature
21+
.NET MAUI now includes a source generator for XAML that improves build performance and enables better tooling support. This generator creates strongly-typed code for your XAML files at compile time, reducing runtime overhead and providing better IntelliSense support.
22+
23+
The source generator decorates generated types with the `[Generated]` attribute for better tooling integration and debugging support.
24+
25+
To enable XAML source generation, opt-in to preview features and then decorate your C# with the `XamlProcessing` directive.
26+
27+
```xml
28+
<PropertyGroup>
29+
<EnablePreviewFeatures>true</EnablePreviewFeatures>
30+
</PropertyGroup>
31+
```
32+
33+
```csharp
34+
[assembly: XamlProcessing(XamlInflator.SourceGen)]
35+
namespace MyApp;
36+
```
37+
38+
## MediaPicker EXIF Support
39+
40+
The `MediaPicker` now automatically handles EXIF information when working with images:
41+
42+
- **Auto-rotate images**: Images are automatically rotated based on their EXIF orientation data
43+
- **Preserve EXIF information**: Original EXIF metadata is preserved when using MediaPicker
44+
45+
This ensures that images appear correctly oriented regardless of how they were captured or stored on the device.
46+
47+
## SafeArea Enhancements
48+
49+
This release introduces significant improvements to SafeArea management:
50+
51+
- **Enhanced SafeAreaEdges control**: Improved `SafeAreaEdges` property with refined `SafeAreaRegions` enum for precise safe area behavior control
52+
- **iOS SafeArea fixes**: Resolved issues with SafeArea management on iOS, including extra bottom space in ScrollView when using SafeAreaEdges
53+
- **Improved defaults**: Fixed safe area defaults to provide more consistent behavior across platforms
54+
55+
The `SafeAreaEdges` property is available on these controls:
56+
57+
- **Layout**: Base layout class (inherited by `Grid`, `StackLayout`, `AbsoluteLayout`, `FlexLayout`, etc.)
58+
- **ContentView**: Content view container
59+
- **ContentPage**: Main page type
60+
- **Border**: Border control
61+
- **ScrollView**: Scrollable content container
62+
63+
The `SafeAreaRegions` enum provides granular control over safe area behavior:
64+
65+
```csharp
66+
public enum SafeAreaRegions
67+
{
68+
None = 0, // Edge-to-edge content (no safe area padding)
69+
SoftInput = 1, // Always pad for keyboard/soft input
70+
Container = 2, // Flow under keyboard, stay out of bars/notch
71+
Default = 4, // Platform default behavior
72+
All = int.MaxValue // Obey all safe area insets
73+
}
74+
75+
// Usage examples
76+
<ContentPage SafeAreaEdges="Container">
77+
<!-- Content flows under keyboard but respects bars/notch -->
78+
</ContentPage>
79+
80+
<ScrollView SafeAreaEdges="None">
81+
<!-- Edge-to-edge scrolling content -->
82+
</ScrollView>
83+
84+
<Grid SafeAreaEdges="SoftInput">
85+
<!-- Grid respects keyboard but not other safe areas -->
86+
</Grid>
87+
```
88+
89+
## Secondary Toolbar Items
90+
91+
iOS and macOS now support secondary toolbar items, providing better alignment with platform conventions:
92+
93+
- **Modern iOS pattern**: Uses iOS 13+ APIs with pull-down menu design following iOS Human Interface Guidelines
94+
- **Automatic detection**: Toolbar items with `Order="Secondary"` are automatically grouped into a secondary menu
95+
- **Priority ordering**: Items are ordered within the secondary menu based on their `Priority` property
96+
- **Platform positioning**: Menu appears on the far right (or left when RTL is enabled)
97+
- **Customizable icon**: Developers can override the default ellipsis icon through a protected virtual method
98+
99+
```xml
100+
<ContentPage.ToolbarItems>
101+
<!-- Primary toolbar items appear directly in the toolbar -->
102+
<ToolbarItem Text="Save" Order="Primary" Priority="0" />
103+
<ToolbarItem Text="Edit" Order="Primary" Priority="1" />
104+
105+
<!-- Secondary toolbar items appear in the overflow menu -->
106+
<ToolbarItem Text="Share" Order="Secondary" Priority="0" />
107+
<ToolbarItem Text="Delete" Order="Secondary" Priority="1" />
108+
<ToolbarItem Text="Settings" Order="Secondary" Priority="2" />
109+
</ContentPage.ToolbarItems>
110+
```
111+
112+
The secondary items are grouped into a pull-down menu with the system ellipsis icon (`UIImage.GetSystemImage("ellipsis.circle")`) by default. When the menu is opened and an item's properties change, the menu automatically rebuilds and closes to reflect the updates.
113+
114+
## New Control APIs
115+
116+
Several new APIs have been added to improve control functionality:
117+
118+
- **Picker controls**: New "Open/Close" API for programmatically controlling picker state
119+
- **SearchHandler**: Added API to hide or show the soft keyboard when using SearchHandler
120+
- **Vibration and HapticFeedback**: New `IsSupported` API to check platform support
121+
- **Windows**: Added API to enable/disable minimize and maximize buttons on Windows
122+
- **Shell navigation**: Added `Shell.SetNavBarVisibilityAnimationEnabled` property for controlling navigation bar visibility animations
123+
- **TabbedPageManager**: Made TabbedPageManager public for advanced customization scenarios
124+
- **StackNavigationManager**: Exposed public APIs for StackNavigationManager on Android
125+
126+
## Deprecated API Removals
127+
128+
As part of .NET 10, several deprecated APIs have been removed:
129+
130+
- **Accelerator class**: Removed from Microsoft.Maui.Controls
131+
- **ClickGestureRecognizer**: Removed in favor of `TapGestureRecognizer`
132+
- **Page.IsBusy**: Marked as obsolete
133+
- **Compatibility.Layout**: removed dependency
134+
135+
## Control and Layout Improvements
136+
137+
This release includes numerous fixes and improvements across controls and layouts.
138+
139+
## .NET for Android
140+
141+
This release includes continued integration with multiple .NET runtimes, and several bug fixes:
142+
143+
- Add `$(EnableDiagnostics)` cross-platform MSBuild property, to align with iOS and WASM.
144+
- Fixe an issue with `=` symbol in Android environment variables.
145+
- Fixed an issue where certain Java libraries were not redistributed in NuGet packages.
146+
- Add support for API 36 in various Visual Studio dropdowns & menus.
147+
- Changes to the "Java GC Bridge" to support multiple runtimes.
148+
149+
A detailed list can be found on the [dotnet/android GitHub releases](https://github.com/dotnet/android/releases/).
150+
151+
## .NET for iOS, Mac Catalyst, macOS, tvOS
152+
153+
This release includes Xcode 26 Beta 4 support for targeting .NET 9. We will include builds for .NET 10 in a subsequent release. To use these new bindings, target `net9.0-ios26` and/or `net9.0-maccatalyst26` and include `<NoWarn>$(NoWarn);XCODE_26_0_PREVIEW</NoWarn>` in your project file.
154+
155+
```xml
156+
<Project Sdk="Microsoft.NET.Sdk">
157+
<PropertyGroup>
158+
<TargetFramework>net9.0-ios26</TargetFramework>
159+
<NoWarn>$(NoWarn);XCODE_26_0_PREVIEW</NoWarn>
160+
<!-- rest of your configuration -->
161+
</PropertyGroup>
162+
</Project>
163+
```
164+
165+
> **Note** A current issues exists with `Shell` that prevents it from rendering on iOS 26. Other page types work.
166+
167+
Also in this release are significant improvements to binding generation, runtime performance, and API coverage:
168+
169+
- **New Binding Generator (RGen)**:
170+
- Enhanced source generator for better binding performance and maintainability
171+
- Added support for nested classes, categories, and constructors
172+
- Improved async method generation with proper Task-based patterns
173+
- Better memory management and semantic model usage
174+
- Support for strong dictionary properties and weak delegate patterns
175+
176+
- **Runtime and Interop Improvements**:
177+
- Reworked `NSObject` data storage to fix a crash
178+
- Enhanced P/Invoke handling and native library integration
179+
180+
- **API and Framework Updates**:
181+
- Fixed `CoreLocation` availability for macOS monitoring features
182+
- Enhanced `CoreText` font manager constants generation
183+
- Updated `StoreKit` by unmarking `AppStore` class as experimental
184+
- Fixed `CoreMedia` format description extensions and related APIs
185+
- Improved `Network` framework P/Invoke calls
186+
187+
- **Build and Tooling Enhancements**:
188+
- Better xcframework processing with improved diagnostics
189+
- Enhanced resource duplication detection
190+
- Better xml documentation generation for interfaces and protocols
191+
192+
- **Platform-Specific Fixes**:
193+
- Fixed `CVOpenGLESTexture` and `CVOpenGLESTextureCache` build integration
194+
- Resolved `AVFoundation` enum value locations
195+
- Enhanced `CoreImage` format convenience enum generation
196+
197+
A detailed list can be found on the [dotnet/macios GitHub releases](https://github.com/dotnet/macios/releases/) including a list of [Known issues](https://github.com/dotnet/macios/wiki/Known-issues-in-.NET10).
198+
199+
## Contributors
200+
201+
Thank you contributors! ❤️
202+
203+
[@Aguilex](https://github.com/Aguilex), [@Ahamed-Ali](https://github.com/Ahamed-Ali), [@albyrock87](https://github.com/albyrock87), [@anandhan-rajagopal](https://github.com/anandhan-rajagopal), [@bhavanesh2001](https://github.com/bhavanesh2001), [@Copilot](https://github.com/copilot-swe-agent), [@csigs](https://github.com/csigs), [@dotnet-bot](https://github.com/dotnet-bot), [@dotnet-maestro](https://github.com/dotnet-maestro), [@emaf](https://github.com/emaf), [@framinosona](https://github.com/framinosona), [@github-actions](https://github.com/github-actions), [@grendello](https://github.com/grendello), [@HarishKumarSF4517](https://github.com/HarishKumarSF4517), [@jfversluis](https://github.com/jfversluis), [@jonathanpeppers](https://github.com/jonathanpeppers), [@jonpryor](https://github.com/jonpryor), [@jsuarezruiz](https://github.com/jsuarezruiz), [@kubaflo](https://github.com/kubaflo), [@LogishaSelvarajSF4525](https://github.com/LogishaSelvarajSF4525), [@mandel-macaque](https://github.com/mandel-macaque), [@mattleibow](https://github.com/mattleibow), [@MichalStrehovsky](https://github.com/MichalStrehovsky), [@morning4coffe-dev](https://github.com/morning4coffe-dev), [@NafeelaNazhir](https://github.com/NafeelaNazhir), [@NanthiniMahalingam](https://github.com/NanthiniMahalingam), [@NirmalKumarYuvaraj](https://github.com/NirmalKumarYuvaraj), [@nivetha-nagalingam](https://github.com/nivetha-nagalingam), [@pictos](https://github.com/pictos), [@praveenkumarkarunanithi](https://github.com/praveenkumarkarunanithi), [@PureWeen](https://github.com/PureWeen), [@rmarinho](https://github.com/rmarinho), [@rolfbjarne](https://github.com/rolfbjarne), [@sheiksyedm](https://github.com/sheiksyedm), [@simonrozsival](https://github.com/simonrozsival), [@StephaneDelcroix](https://github.com/StephaneDelcroix), [@SyedAbdulAzeemSF4852](https://github.com/SyedAbdulAzeemSF4852), [@Tamilarasan-Paranthaman](https://github.com/Tamilarasan-Paranthaman), [@TamilarasanSF4853](https://github.com/TamilarasanSF4853), [@Vignesh-SF3580](https://github.com/Vignesh-SF3580), [@VitalyKnyazev](https://github.com/VitalyKnyazev), [@vs-mobiletools-engineering-service2](https://github.com/vs-mobiletools-engineering-service2)

0 commit comments

Comments
 (0)