

Explore .NET MAUI Blazor Apps with .NET 6.0 & Visual Studio 2022 Version 17....
source link: https://blog.medhat.ca/2021/12/explore-net-maui-blazor-apps-with-net.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Friday, December 17, 2021
Explore .NET MAUI Blazor Apps with .NET 6.0 & Visual Studio 2022 Version 17.1.0 Preview 1.1
In a previous article, I wrote about .NET MAUI Apps. In this article, I will discuss the Blazor version of .NET MAUI Apps. This is known as .NET MAUI Blazor Apps.
MAUI is not yet officially released. The current bits offer a glimpse into what the final product will look like.
This is the environment that I am using:
- Windows 11 Version 21H2
- Visual Studio 2022 Version 17.1.0 Preview 1.1
- .NET 6.0.101
Setup
Application
Enter "maui" in the filter field. You will discover that there are three MAUI-related projects that you can create - namely:
- .NET MAUI App
- .NET MAUI Blazor App
- .NET MAUI Class Library
id (int)lastName (string)firstName (string)occupation (string)gender (string)pictureUrl (string)votes (int)
@page "/toons"@using System.Text.Json@using System.Text.Json.Serialization<h1>Toon Characters</h1>@if (toonList == null) {<p><em>Loading...</em></p>} else {<table class="table"><tbody>@foreach (var item in toonList) {<tr><td>@item.FullName</td><td><img src="@item.PictureUrl" style="height: 40px" alt="@item.FirstName @item.LastName"> </td></tr></tbody></table>@code {private Toon[] toonList;protected override async Task OnInitializedAsync() {HttpClient client = new HttpClient();var stream = client.GetStreamAsync("https://api4all.azurewebsites.net/api/people");toonList = await JsonSerializer.DeserializeAsync<Toon[]>(await stream);public class Toon {[JsonPropertyName("id")]public int Id { get; set; }[JsonPropertyName("lastName")]public string LastName { get; set; }[JsonPropertyName("firstName")]public string FirstName { get; set; }[JsonPropertyName("occupation")]public string Occupation { get; set; }[JsonPropertyName("gender")]public string Gender { get; set; }[JsonPropertyName("pictureUrl")]public string PictureUrl { get; set; }[JsonPropertyName("votes")]public int Votes { get; set; }public string FullName {return string.Format("{0} {1}", this.FirstName, this.LastName);
No comments:
Post a Comment
Recommend
-
14
Syncfusion provides a Blazor Code Generator extension to add Syncfusion Blazor component code in Razor files and configure a Blazor application with Syncfusion. It generates Syncfusion Blazor component code very quickly with its required inpu...
-
5
Useful Visual Studio Extensions for Working with Blazor
-
11
.NET 6、MAUI、EF Core 6、Visual Studio 2022 对于 .NET 社区来说,6月是火热的夏天般...
-
7
#dotnetmaui #dotnet #xamarin.NET MAUI Previe...
-
11
Share on twitter Share on facebook Share on linkedin
-
7
Productivity comes to .NET MAUI in Visual Studio 2022 Maddy Montaquila
-
4
Introduction In this article, I will explain about MAUI first app development using visual studio 2022. Basically, .NET MAUI is an open source and its evolution of xamarin forms and .Net Multi-platform App UI is cross-platform framework...
-
7
.NET MAUI is now available in Visual Studio for Mac 17.4
-
6
As a Blazor developer, you can reuse your Razor components and your skills to create UIs for desktop and mobile applications through .NET MAUI. While you may know how to add authentication to a Blazor application, things are slightly different whe...
-
9
Introducing the .NET MAUI Toolbox for Visual StudioWe are glad to announce that the
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK