{"id":46805,"date":"2023-08-08T10:07:00","date_gmt":"2023-08-08T17:07:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=46805"},"modified":"2023-08-09T09:19:27","modified_gmt":"2023-08-09T16:19:27","slug":"announcing-dotnet-maui-in-dotnet-8-preview-7","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-maui-in-dotnet-8-preview-7\/","title":{"rendered":"Announcing .NET MAUI in .NET 8 Preview 7: Keyboard Accelerators"},"content":{"rendered":"<p>.NET MAUI is now available in <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-8-preview-7\/\" rel=\"noopener\" target=\"_blank\">.NET 8 Preview 7<\/a> 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 <a href=\"https:\/\/dotnetconf.net\/\" rel=\"noopener\" target=\"_blank\">.NET Conf<\/a>, and the dates have been announced. Join us November 14-16, 2023 to celebrate the .NET 8 release!<\/p>\n<blockquote>\n<p><a href=\"https:\/\/github.com\/dotnet\/maui\/releases\/tag\/7.0.92\" rel=\"noopener\" target=\"_blank\">Version 7.0.92<\/a> 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.<\/p>\n<\/blockquote>\n<p>Today&#8217;s release is brought to you by 25 contributors (bots included). We want to celebrate them all, especially first time contributors <a href=\"https:\/\/github.com\/Lehonti\" rel=\"noopener\" target=\"_blank\">Lehonti Ramos<\/a>, <a href=\"https:\/\/github.com\/webwarrior-ws\" rel=\"noopener\" target=\"_blank\">webwarrior-ws<\/a>, <a href=\"https:\/\/github.com\/molesmoke\" rel=\"noopener\" target=\"_blank\">molesmoke<\/a>, and <a href=\"https:\/\/github.com\/agaluzzi\" rel=\"noopener\" target=\"_blank\">Aaron Galuzzi<\/a>. Well done! We appreciate everyone&#8217;s contributions. See our <a href=\"https:\/\/github.com\/dotnet\/maui\/blob\/main\/.github\/CONTRIBUTING.md\" rel=\"noopener\" target=\"_blank\">contribution guide<\/a> if you are interested in helping out.<\/p>\n<h2>Desktop Keyboard Accelerators<\/h2>\n<p>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 <code>MenuItem.Accelerator<\/code> attached property:<\/p>\n<pre><code class=\"language-xaml\">&lt;ContentPage.MenuBarItems&gt;\r\n    &lt;MenuBarItem Text=\"File\"&gt;\r\n        &lt;MenuFlyoutItem Text=\"Preferences\"\r\n            Command=\"{Binding PreferencesCommand}\"\r\n        \/&gt;\r\n    &lt;\/MenuBarItem&gt;\r\n    &lt;MenuBarItem Text=\"Products\"&gt;\r\n        &lt;MenuFlyoutItem \r\n            x:Name=\"AddProductMenu\"\r\n            MenuItem.Accelerator=\"ctrl+a\"\r\n            Text=\"Add Product\"\r\n            Command=\"{Binding AddProductCommand}\"\r\n        \/&gt;\r\n        &lt;MenuBarItem Text=\"Add Product Category\"\/&gt;\r\n    &lt;\/MenuBarItem&gt;\r\n&lt;\/ContentPage.MenuBarItems&gt;<\/code><\/pre>\n<p>If instead of the attached property you want to express the accelerator in C#, then you can you can write:<\/p>\n<pre><code class=\"language-csharp\">MenuItem.SetAccelerator(AddProductMenu, Accelerator.FromString(\"ctrl+a\"));<\/code><\/pre>\n<p>Now when those keys are triggered, the <code>AddProductCommand<\/code> fires just as if a user had tapped or clicked the menu item. See the <a href=\"https:\/\/github.com\/dotnet\/maui\/blob\/main\/src\/Controls\/src\/Core\/Accelerator.cs#L47\" rel=\"noopener\" target=\"_blank\">Accelerator.FromString<\/a> method for a list of supported modifiers.<\/p>\n<p><div style=\"width: 1480px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-46805-1\" width=\"1480\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/08\/accelerator.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/08\/accelerator.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/08\/accelerator.mp4<\/a><\/video><\/div><\/p>\n<h2>What&#8217;s fixed and improved in .NET MAUI<\/h2>\n<p>The main focus of the release is on bug fixes and quality improvements. For a complete set of changes, review the <a href=\"https:\/\/github.com\/dotnet\/maui\/releases\/tag\/8.0.0-preview.7.8842\" rel=\"noopener\" target=\"_blank\">8.0.0-preview.7.8842 release notes<\/a>. Here are the highlights:<\/p>\n<ol>\n<li>\n<p><strong>Memory Leak Resolutions<\/strong>: <\/p>\n<ul>\n<li>Several memory leak issues were addressed in various UI controls, including Border, Editor, and Entry on different platforms, such as iOS, Android, and Windows. These fixes ensure improved memory management and application stability. <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15946\">#15946<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15614\">#15614<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16045\">#16045<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16101\">#16101<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16348\">#16348<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16349\">#16349<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Enhanced UI Control Functionality<\/strong>: <\/p>\n<ul>\n<li>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. <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14740\">#14740<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15881\">#15881<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15585\">#15585<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14846\">#14846<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16215\">#16215<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15458\">#15458<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16270\">#16270<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Platform-Specific Improvements<\/strong>: <\/p>\n<ul>\n<li>Each major platform (iOS, Android, Windows) saw targeted improvements, ranging from memory leak fixes to performance enhancements, ensuring that the app runs smoothly and efficiently across diverse environments. <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15734\">#15734<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16145\">#16145<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16032\">#16032<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Bug Fixes and Refinements<\/strong>: <\/p>\n<ul>\n<li>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. <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16128\">#16128<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16241\">#16241<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16275\">#16275<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/14663\">#14663<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16057\">#16057<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16116\">#16116<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16174\">#16174<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/16248\">#16248<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15099\">#15099<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15459\">#15459<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Input and Interaction Enhancements<\/strong>: <\/p>\n<ul>\n<li>Improvements were made to user input and interaction features, such as cursor preservation in text boxes, menu key accelerators, and InputTransparent behavior permutations. These updates enhance user engagement and application usability. <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15799\">#15799<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/pull\/15835\">#15835<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Additional release notes:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/xamarin\/xamarin-android\/releases\/\" rel=\"noopener\" target=\"_blank\">.NET for Android<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/xamarin\/xamarin-macios\/releases\/tag\/dotnet-8.0.1xx-preview7-8694\" rel=\"noopener\" target=\"_blank\">.NET for iOS and Mac <\/a><\/li>\n<\/ul>\n<h2>How to update<\/h2>\n<p>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 &#8220;.NET MAUI (.NET 8 Preview)&#8221;.<\/p>\n<blockquote>\n<p>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 <a href=\"https:\/\/github.com\/xamarin\/xamarin-macios\/wiki\/Known-issues-in-.NET8#illink--error-mt2301-the-linker-step-setup-failed-during-processing-failed-to-parse-plist-data-type-dict\" rel=\"noopener\" target=\"_blank\">known issues<\/a> for details and steps to resolve.<\/p>\n<\/blockquote>\n<p>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.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2023\/08\/vsm_enable_net8.png\" alt=\"Enable .NET 8 in Visual Studio 2022 for Mac\" \/><\/p>\n<p>Download the <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/8.0\">.NET 8 Preview 7 installer<\/a>, and then install .NET MAUI from the command line:<\/p>\n<pre><code class=\"language-bash\">dotnet workload install maui<\/code><\/pre>\n<h2>What&#8217;s Next<\/h2>\n<p>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.<\/p>\n<p>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 <a href=\"https:\/\/github.com\/XcodesOrg\/XcodesApp\" rel=\"noopener\" target=\"_blank\">Xcodes.app<\/a>.<\/p>\n<h2>Feedback Welcome<\/h2>\n<p>We appreciate your feedback and contributions to .NET MAUI. You can <a href=\"https:\/\/github.com\/dotnet\/maui\/issues\/new\/choose\">report issues<\/a>, <a href=\"https:\/\/github.com\/dotnet\/maui\/issues\/new?assignees=&amp;labels=proposal%2Fopen%2Ct%2Fenhancement&amp;projects=&amp;template=feature-request.yml\">suggest features<\/a>, or <a href=\"https:\/\/github.com\/dotnet\/maui\/blob\/main\/.github\/CONTRIBUTING.md\">submit pull requests<\/a> on our GitHub repository. You can also join our <a href=\"http:\/\/aka.ms\/dotnet-discord\" rel=\"noopener\" target=\"_blank\">Discord server<\/a>.<\/p>\n<p>Thank you for your support and happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET MAUI in .NET 8 Preview 7 has more new quality improvements for developers, experimental new AOT for iOS, and exciting new Visual Studio support.<\/p>\n","protected":false},"author":553,"featured_media":46806,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7233],"tags":[7701,7238],"class_list":["post-46805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-maui","tag-dotnet-8","tag-net-maui"],"acf":[],"blog_post_summary":"<p>.NET MAUI in .NET 8 Preview 7 has more new quality improvements for developers, experimental new AOT for iOS, and exciting new Visual Studio support.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/46805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/553"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=46805"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/46805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/46806"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=46805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=46805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=46805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}