Skip to content

Latest commit

 

History

History
126 lines (86 loc) · 6.79 KB

dotnetmaui.md

File metadata and controls

126 lines (86 loc) · 6.79 KB

.NET MAUI in .NET 10 Preview 2 - Release Notes

Here's a summary of what's new in .NET MAUI, .NET for Android, and .NET for iOS, Mac Catalyst, macOS, and tvOS in this preview release:

.NET MAUI updates in .NET 10:

ShadowTypeConverter

.NET 10 includes a ShadowTypeConverter type for converting a formatted string to a Shadow on a VisualElement.

  • color, offset X, offset Y

    <VerticalStackLayoutBackgroundColor="#fff"Shadow="#000000 4 4" />
  • offset X, offset Y, radius, color

    <VerticalStackLayoutBackgroundColor="#fff"Shadow="4 4 16 #000000" />
  • offset X, offset Y, radius, color, opacity

    <VerticalStackLayoutBackgroundColor="#fff"Shadow="4 4 16 #000000 0.5" />

SpeechOptions Rate

When using Text-to-Speech in .NET 10 you now have the option to control the rate at which the audio plays by setting Rate on the SpeechOptions.

publicasyncvoidSpeakSettings(){IEnumerable<Locale>locales=awaitTextToSpeech.Default.GetLocalesAsync();SpeechOptionsoptions=newSpeechOptions(){Rate=2.0f,// 0.1 - 2.0Pitch=1.5f,// 0.0 - 2.0Volume=0.75f,// 0.0 - 1.0Locale=locales.FirstOrDefault()};awaitTextToSpeech.Default.SpeakAsync("How nice to meet you!",options);}

Styling Modal as Popover

With this new platform-specific you can display a modal page as a popover on iOS and Mac Catalyst. It's consumed by setting the Page.ModalPopoverSourceView bindable property to a View that defines the source of the modal, the Page.ModalPopoverRect bindable property to a Rectangle that defines the rectangle within the source of the modal, and the Page.ModalPresentationStyle bindable property to Popover:

publicpartialclassPopoverPage:ContentPage{publicPopoverPage(Viewmodal,Rectanglerectangle){InitializeComponent();On<iOS>().SetModalPopoverView(modal);On<iOS>().SetModalPopoverRect(rectangle);On<iOS>().SetModalPresentationStyle(UIModalPresentationStyle.Popover);}}

Then, navigate to the modal page with the Navigation.PushModalAsync method:

PagemodalPage=newPopoverPage(originButton,Rectangle.Empty);awaitNavigation.PushModalAsync(modalPage);

More info see the GitHub pull request.

Switch.OffColor

You can now set the OffColor in addition to OnColor for a Switch control.

<SwitchOffColor="Red"OnColor="Blue" />

SearchBar.SearchIconColor

You can now set the color of the search icon that appears with a SearchBar by setting SearchIconColor.

<SearchBarPlaceholder="Search items..."SearchIconColor="Red" />

HybridWebView new InvokeJavascriptAsync Method

A method for InvokeJavascriptAsync has been made public for when you don't want a generic argument or return type argument to be required as was the case previously.

More info see the GitHub pull request.

Deprecations

  • The FontImageExtension XAML markup extension is deprecated. Use FontImageSource instead.
  • MessagingCenter is now internal. It can be replaced with WeakReferenceMessenger in the CommunityToolkit.Mvvm NuGet package. For more information, see Messenger.

.NET for Android

This release was focused on quality improvements. A detailed list can be found on dotnet/android GitHub releases.

.NET for iOS, Mac Catalyst, macOS, tvOS

This release was focused on quality improvements. A detailed list can be found on dotnet/macios GitHub releases including a list of Known issues.

Community Contributors

Thank you to community contributors @MartyIX, @StephaneDelcroix, @Zerod159, @jonathanpeppers, @jfversluis, @rmarinho, @albyrock87, @symbiogenesis, @pjcollins, @sthewissen, @spadapet, @PureWeen, @jsuarezruiz, @dotnet-bot, @rabuckley, @csigs, @pictos, @APoukar, @kubaflo, @piersdeseilligny, @tj-devel709, @jkurdek, @mohsenbgi, @SuthiYuvaraj, @KarthikRajaKalaimani, @BagavathiPerumal, @Tamilarasan-Paranthaman, @dotnet-maestro, @anandhan-rajagopal, @NirmalKumarYuvaraj, @Shalini-Ashokan, @Vignesh-SF3580, @Ahamed-Ali, @NanthiniMahalingam, @devanathan-vaithiyanathan, @prakashKannanSf3972, @Dhivya-SF4094, @nivetha-nagalingam, @NafeelaNazhir, @LogishaSelvarajSF4525, @HarishKumarSF4517, @bhavanesh2001, and @SubhikshaSf4851.

close