title | description | ms.date |
---|---|---|
What's new in .NET MAUI for .NET 8 |
Learn about the new features introduced in .NET MAUI for .NET 8. |
10/10/2023 |
.NET 8 is the successor to .NET 7 and focuses on being unified, modern, simple, and fast. Due to working with underlying external dependencies, such as Xcode or Android SDK Tools, the .NET Multi-platform App UI (.NET MAUI) support policy differs from the .NET and .NET Core support policy. For more information, see .NET MAUI support policy.
This article lists the new features of .NET MAUI for .NET 8 and provides links to more detailed information on each.
For information about what's new in .NET 8, see What's new in .NET 8.
.NET MAUI for .NET 8 addresses top feedback issues and introduces the following new functionality:
- xref:Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebView gains a
StartPath
property, aTryDispatchAsync
method, and enhanced logging capabilities. For more information, see Host a Blazor web app in a .NET MAUI app using BlazorWebView. - xref:Microsoft.Maui.Controls.PointerGestureRecognizer gains
PointerPressedCommand
,PointerPressedCommandParameter
,PointerReleasedCommand
,PointerReleasedCommandParameter
properties, andPointerPressed
andPointerReleased
events. For more information, see Recognize a pointer gesture. - xref:Microsoft.Maui.Devices.Flashlight gains a
IsSupportedAsync
method that determines whether a flashlight is available on the device. For more information, see Flashlight. - xref:Microsoft.Maui.Devices.Sensors.SensorSpeed intervals have been unified across all platforms. For more information, see Accessing device sensors.
- xref:Microsoft.Maui.Controls.SolidColorBrush.Color is the
ContentProperty
of the xref:Microsoft.Maui.Controls.SolidColorBrush class, and therefore does not need to be explicitly set from XAML. - The position at which a drag or drop gesture occurred can be obtained by calling the
GetPosition
method on a xref:Microsoft.Maui.Controls.DragEventArgs, xref:Microsoft.Maui.Controls.DragStartingEventArgs, or xref:Microsoft.Maui.Controls.DropEventArgs object. For more information, see Recognize a drag and drop gesture. - xref:Microsoft.Maui.Controls.WebView gains a
UserAgent
property. For more information, see WebView. - Inline media playback of HTML5 video, including autoplay and picture in picture, has been enabled by default for the xref:Microsoft.Maui.Controls.WebView on iOS. For more information, see Set media playback preferences on iOS and Mac Catalyst.
- Resources defined in a xref:Microsoft.Maui.Controls.ResourceDictionary can also be consumed in an
AppThemeBinding
with theDynamicResource
markup extension. For more information, see Define and consume theme resources. - The
Grid.Add
overload that accepts 5 arguments has been added back to .NET MAUI. However, this method is deprecated and is only present to aid migrations from Xamarin.Forms. - xref:Microsoft.Maui.Controls.Grid gains an
AddWithSpan
extension method that adds a view to theGrid
at the specified row and column with the specified row and column spans. - On iOS,
MauiUIApplicationDelegate
gains aPerformFetch
method that can be overridden or consumed via theiOSLifecycle.PerformFetch
delegate. For more information, see iOS platform lifecycle events.
The following types or members have been deprecated:
- xref:Microsoft.Maui.Controls.ClickGestureRecognizer has been deprecated.
- The
AutomationProperties.Name
,AutomationProperties.HelpText
, andAutomationProperties.LabeledBy
attached properties have been deprecated. - The xref:Microsoft.Maui.Controls.VisualElement.FocusChangeRequested has been deprecated. Instead, use the xref:Microsoft.Maui.IView.Focus method to attempt to set focus on the view.
The following types or members have been removed:
- The
Application.Properties
property andApplication.SavePropertiesAsync
method have been removed. To migrate your app properties data to .NET MAUI, see Migrate data from the Xamarin.Forms app properties dictionary to .NET MAUI preferences. - The
PhoneDialer.Current
property has been removed. UsePhoneDialer.Default
instead. OpenGLView
has been removed.