Better sample pages in ".NET MAUI Blazor Hybrid and Web App" project template #62204
Replies: 1 comment
-
UPDATE: Now I noticed these lines in Home.razor: @using BlazorComponentsEverywhere.Shared.Services
@inject IFormFactor FormFactor And the add service in MauiProgram.cs: // Add device-specific services used by the BlazorComponentsEverywhere.Shared project
builder.Services.AddSingleton<IFormFactor, FormFactor>(); That's a start. Maybe the biggest problem is documentation.
Now I see:
So the answer seems to be to refer to descriptions of the two pieces, Blazor Web App and Blazor Hybrid. All three of those links belong in a "readme" file. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Unless I've missed something, the Blazor Hybrid of this project is simply a thin wrapper for the razor components.
When I first saw Blazor Hybrid, I couldn't grasp how the C# code would interact with other, non-Blazor, Maui C# code. Need to show people that doing so is straightforward.
Suggestion: Demonstrate interaction between a Blazor Component, and a Maui class that can call an API on each device.
Two cases:
Perhaps the clipboard: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/data/clipboard?view=net-maui-9.0
Show that each platform can implement a service in a different way on that platform.
Beta Was this translation helpful? Give feedback.
All reactions