.NET MAUI is now available in .NET 8 Preview 7 introducing keyboard accelerators, and more fixes and improvements. This is the final preview release of .NET 8 before we ship release candidates and the generally available (GA) release. We will celebrate that release as usual at .NET Conf, and the dates have been announced. Join us November 14-16, 2023 to celebrate the .NET 8 release!
Version 7.0.92 is the latest service release for .NET 7. During this time we are heavily focused on .NET 8 to make it the best release. Starting next release with RC1 you will be covered with a go live support license. We encourage everyone to consider using .NET 8 releases from this point forward.
Today’s release is brought to you by 25 contributors (bots included). We want to celebrate them all, especially first time contributors Lehonti Ramos, webwarrior-ws, molesmoke, and Aaron Galuzzi. Well done! We appreciate everyone’s contributions. See our contribution guide if you are interested in helping out.
Desktop Keyboard Accelerators
Keyboard accelerators enable you to assign keyboard shortcuts to any menu item, whether visible or not, and attach them to any UI element. For example, this page has a window level menu to which you can add an accelerator with the MenuItem.Accelerator
attached property:
<ContentPage.MenuBarItems>
<MenuBarItem Text="File">
<MenuFlyoutItem Text="Preferences"
Command="{Binding PreferencesCommand}"
/>
</MenuBarItem>
<MenuBarItem Text="Products">
<MenuFlyoutItem
x:Name="AddProductMenu"
MenuItem.Accelerator="ctrl+a"
Text="Add Product"
Command="{Binding AddProductCommand}"
/>
<MenuBarItem Text="Add Product Category"/>
</MenuBarItem>
</ContentPage.MenuBarItems>
If instead of the attached property you want to express the accelerator in C#, then you can you can write:
MenuItem.SetAccelerator(AddProductMenu, Accelerator.FromString("ctrl+a"));
Now when those keys are triggered, the AddProductCommand
fires just as if a user had tapped or clicked the menu item. See the Accelerator.FromString method for a list of supported modifiers.
What’s fixed and improved in .NET MAUI
The main focus of the release is on bug fixes and quality improvements. For a complete set of changes, review the 8.0.0-preview.7.8842 release notes. Here are the highlights:
-
Memory Leak Resolutions:
-
Enhanced UI Control Functionality:
- UI controls like Border, WebView, and Entry received updates to their behavior, performance, and customization options on different platforms (iOS, Android, Windows). These enhancements contribute to a more user-friendly and feature-rich experience. #14740, #15881, #15585, #14846, #16215, #15458, #16270
-
Platform-Specific Improvements:
-
Bug Fixes and Refinements:
- Several bugs, ranging from appearance issues (Shell TabBar) to functionality (SelectedItemChanged in ListView), were resolved across different platforms. These fixes contribute to a more polished and error-free application. #16128, #16241, #16275, #14663, #16057, #16116, #16174, #16248, #15099, #15459
-
Input and Interaction Enhancements:
Additional release notes:
How to update
Visual Studio 2022 on Windows now includes .NET 8 previews and the .NET MAUI preview workload. Download the latest preview version (17.8 Preview 1), select the .NET Multi-platform App UI workload, and then check the optional component “.NET MAUI (.NET 8 Preview)”.
There is a known issue on Mac building for Apple platforms when you have both .NET 8 Preview 6 and 7 installed. Please review the known issues for details and steps to resolve.
If you are on macOS, you can now develop using Visual Studio for Mac after enabling the preview feature for .NET 8 in Preferences and installing .NET 8 Preview 7 from the installer.
Download the .NET 8 Preview 7 installer, and then install .NET MAUI from the command line:
dotnet workload install maui
What’s Next
We are preparing to introduce Xcode 15 support in the next .NET 8 release for the new versions of iOS, iPadOS, macOS, Mac Catalyst, tvOS, and CarPlay. From that point forward .NET 8 will use Xcode 15 which we anticipate to be the stable Xcode at the time .NET 8 ships in November.
Developer tip: I recommend managing your Xcode versions by explicitly downloading and selecting versions from the Apple developer portal, rather than relying on the App Store which may auto-update and break your compatibility. When maintaining side-by-side versions of Xcode you may want to use something like Xcodes.app.
Feedback Welcome
We appreciate your feedback and contributions to .NET MAUI. You can report issues, suggest features, or submit pull requests on our GitHub repository. You can also join our Discord server.
Thank you for your support and happy coding!
How can I upgrade existing MAUI application to the latest version? I installed SDK 8.0.100-rc.1 but I’m not sure how to use it. VS 2022 allows me to use only .net 6 and 7
Hi David, how you doing?
I’m trying to use Accelerators following your example, but I’m getting the message of an obsolete implementation, did you guys changed something at RC1 release?
I'm disappointed to see things like CollectionView being effectively completely broken (16787 - this one completely breaks our app to the point it's entirely unusable) along with basic things like Border (17109) - considering .NET 8 is supposed to be quality-focused I'm stunned how regressions like this can get through, particularly the latter which is incredibly frustrating because it isn't even niche and seems to demonstrate a lack of even the most basic of testing....
why not just to integrate web engine / and use html to build ui
Azure Pipelines + (free!) Selfhosted Linux Agent + MAUI = failed
Still better to use AvaloniaUI while no Linux support planned
Im interested in trying .NET 8, but the Upgrade Assistant fails to upgrade some projects. It can handle:
net7.0
But can't handle more complex:
net7.0-android;net7.0-ios;net7.0-maccatalyst
$(TargetFrameworks);net7.0-windows10.0.19041
I have gone through all 19 projects in our Maui test solution to do it manually, but clearly missed something as I had a number of issues and couldn't get it to build without...
The .NET Upgrade Assistant is for moving projects from Xamarin to .NET MAUI. We may enhance it in the future to move from .NET 7 to 8 and so on, however that's not something we've invested in. Anything UA does today for that is not .NET MAUI specific.
You can compare .NET 7 to .NET 8 changes with GitHub. Roughly 20% of fixes were backported to .NET 7.
net7->net8 is the main change. There are new explicit...
Ok understood, I didn't realise UA wasn't meant for upgrading from .NET 7 to 8. In the end I just created .NET 8 projects and copied files across, all seems to be working nicely, then I upgraded our ADO build pipeline to install .NET8 + Maui and we are deploying iOS release builds now. Haven't tried Android but that should be simple enough.
Not seeing any notable speed improvements over .NET 7, or any improvements to...
While many people say about bugs in MAUI, and I agree that they exist, I should say that it helped me create a PRODUCTION-READY application, save a lot of time for learning new frameworks and reuse existing program modules. Yes, sometimes you may stumble upon layout/visual issues, but usually, it's not difficult to find a workaround.
It's also great to see that the community is evolving, Xamarin community projects are migrated to .NET MAUI, and toolkits...
That’s great to hear Andrew, thanks for sharing!
Will appcenter (a microsoft product used by tons of existing xamarin developers) ever support building/deploying MAUI apps?
Re
https://github.com/microsoft/appcenter/issues/2360 and
https://github.com/dotnet/maui/discussions/3333
We recommend Azure pipelines and GitHub for .NET MAUI apps. Any roadmap information about App Center would come from that product team.
Although I appreciate the reply, the only reason I'm posting here is because we have gotten complete silence from the App Center team for 1.5+ years at this point. See the github discussions I linked in my first comment. We can't even get the courtesy of "we won't support MAUI builds, use x, y and z instead."
Although I am in the process of switching to github actions for my company's app, I am...
So, a stupid question, but why is it called
Accelerator=
and not justShortcut=
or something? Is it intentionally more generic to be used for more in the future?Not stupid at all, I’ve asked it many times before. It comes from the naming from the desktop platform frameworks. The current naming and implementation came from the Xamarin.Forms macOS backend contribution.
https://learn.microsoft.com/en-us/windows/apps/design/input/keyboard-accelerators
We are entertaining aligning with this naming more closely, adding Keyboard to the name.
Microsoft's terminology is all over the place. Windows and Win32 use term "accelerators" but then define those through "shortcuts". In VS and Windows Forms parts of the docs shortcuts are referred to as "shortcuts" (e.g., here, here or here). And WPF uses "input gestures"....
Apple uses "shortcuts" (e.g. here). So does Ubuntu (e.g., here).