Skip to main content

.NET MAUI Release Candidate 2 – With 100% More Tizen

We are excited to release .NET Multi-platform App UI (.NET MAUI) Release Candidate 2. This release is covered by a “go-live” support policy, meaning .NET MAUI is supported by Microsoft for your production apps. The team has been focused on stabilizing the toolkit, resolving the high impact issues you have been helping us to identify through your valuable feedback. Thank you!

Get Started Today

To acquire .NET MAUI RC2 on Windows, install or update Visual Studio 2022 Preview to version 17.2 Preview 5. In the installer, confirm .NET MAUI (preview) is checked under the “Mobile Development with .NET” workload.

To use .NET MAUI RC2 on Mac, follow the command-line instructions on the wiki. Support for .NET MAUI in Visual Studio 2022 for Mac will ship formally in a future preview.

Release Candidate 2 release notes are on GitHub. For additional information about getting started with .NET MAUI, refer to our documentation and the migration tip sheet for a list of changes to adopt when upgrading projects.

Reminder about Xamarin support The Xamarin Support Policy is still in effect, which covers those products for 2 years after initial release. The last release was in November of 2021, so support will continue through November 2023.

Adding Tizen Platform

Tizen.NET has long enabled .NET applications to run on millions of Samsung TVs, phones, and other devices running Tizen. Today, Tizen joins Android, iOS, macOS, and Windows as one of the target platforms you can reach with .NET MAUI. Congratulations to the Samsung Tizen.NET team on this great milestone!

Visit the Tizen .NET introduction to get started. While the platform support is part of .NET MAUI SDK and we’ve added the scaffolding for Tizen to the .NET MAUI template project, the required workload dependencies are distributed through a separate installation experience maintained by Tizen.

Looking for samples? The Tizen team keeps up to date with all our beautiful sample apps to make sure they run great on Tizen mobile and Tizen TV.

The official Tizen Emulator supporting .NET 6 will be released by the Tizen team soon.

HelloMaui

Tizen emulator

Source

WeatherTwentyOne

Tizen TV emulator running WeatherTwentyOne

Source

.NET Podcast

Tizen emulator and browser running dot net podcasts

Tizen TV emulator running dot net podcasts

Source

Getting the most from platforms

.NET MAUI excels at giving you the same UI and styling for native controls across all supported platforms, while also giving you broad access to native platform features all from a single .NET language. .NET does this by taking full advantage of multi-targeting to organize code and resources that may span several platforms from a single project.

There may also be scenarios in your applications where you’ll want to customize how it looks and behaves on a specific platform in order to take full advantage of native features only present on that platform, or to unify an experience to be more consistent with other platforms. There are 3 main ways in which you can do this in .NET MAUI:

1. Platform folders

Within the single project structure, we’ve paved the way for you to put platform-specific code and files into folders by platform. The build tasks for .NET MAUI are pre-configured to know that anything you place there will apply only to that platform.

Solution shows platform folders

2. Filename convention

The .NET MAUI build tasks will also look at filename conventions to determine what code should run for each platform. The source code is actually setup this way as well. The Button handlers suffix the filenames by platform: Android, iOS, Tizen, and Windows.

Button handler files by platform

3. Conditional compilation

Multi-targeting also works via conditional compilation arguments. By using #if, you can segment code per platform from anywhere in your project. For example, in the WeatherTwentyOne app’s MauiProgram.cs, we configure services for local notifications and the system tray, which are very platform-specific APIs.

    var services = builder.Services;
#if WINDOWS
    services.AddSingleton<ITrayService, WinUI.TrayService>();
    services.AddSingleton<INotificationService, WinUI.NotificationService>();
#elif MACCATALYST
    services.AddSingleton<ITrayService, MacCatalyst.TrayService>();
    services.AddSingleton<INotificationService, MacCatalyst.NotificationService>();
#endif
    services.AddSingleton<HomeViewModel>();
    services.AddSingleton<HomePage>();

By default, the following options are available to you:

  • ANDROID
  • IOS
  • MACCATALYST
  • TIZEN
  • WINDOWS

You’ll notice IntelliSense will additionally offer you more specific options to target each platform such as “WINDOWS10_0_17763_0_OR_GREATER” in case you need it.

For additional information on writing platform-specific code, check out the .NET MAUI documentation:

.NET MAUI provides other helpful strategies for adapting your applications to different platforms, screen sizes, idioms, and more. For example, you can leverage these markup extensions and strategies:

  • OnPlatformWidthRequest="{OnPlatform 250, iOS=200, Android=300}"
  • OnIdiomWidthRequest="{OnIdiom 100, Phone=200, Tablet=300, Desktop=400}"
  • Triggers – Property, Data, Event, Multi-triggers, EnterActions, ExitActions, and State

We need your feedback

Install the latest preview of Visual Studio 2022 for Windows (17.2 Preview 5) following our simple guide and build your first multi-platform application today.

We’d love to hear from you! As you encounter any issues, file a report on GitHub at dotnet/maui.

The post .NET MAUI Release Candidate 2 – With 100% More Tizen appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/dotnet-maui-rc-2/

Comments

Popular posts from this blog

Fake CVR Generator Denmark

What Is Danish CVR The Central Business Register (CVR) is the central register of the state with information on all Danish companies. Since 1999, the Central Business Register has been the authoritative register for current and historical basic data on all registered companies in Denmark. Data comes from the companies' own registrations on Virk Report. There is also information on associations and public authorities in the CVR. As of 2018, CVR also contains information on Greenlandic companies, associations and authorities. In CVR at Virk you can do single lookups, filtered searches, create extracts and subscriptions, and retrieve a wide range of company documents and transcripts. Generate Danish CVR For Test (Fake) Click the button below to generate the valid CVR number for Denmark. You can click multiple times to generate several numbers. These numbers can be used to Test your sofware application that uses CVR, or Testing CVR APIs that Danish Govt provide. Generate

How To Iterate Dictionary Object

Dictionary is a object that can store values in Key-Value pair. its just like a list, the only difference is: List can be iterate using index(0-n) but not the Dictionary . Generally when we try to iterate the dictionary we get below error: " Collection was modified; enumeration operation may not execute. " So How to parse a dictionary and modify its values?? To iterate dictionary we must loop through it's keys or key - value pair. Using keys

How To Append Data to HTML5 localStorage or sessionStorage?

The localStorage property allows you to access a local Storage object. localStorage is similar to sessionStorage. The only difference is that, while data stored in localStorage has no expiration time untill unless user deletes his cache, data stored in sessionStorage gets cleared when the originating window or tab get closed. These are new HTML5 objects and provide these methods to deal with it: The following snippet accesses the current domain's local Storage object and adds a data item to it using Storage.setItem() . localStorage.setItem('myFav', 'Taylor Swift'); or you can use the keyname directly as : localStorage.myFav = 'Taylor Swift'; To grab the value set in localStorage or sessionStorage, we can use localStorage.getItem("myFav"); or localStorage.myFav There's no append function for localStorage or sessionStorage objects. It's not hard to write one though.The simplest solution goes here: But we can kee