From the course: Creating .NET MAUI Applications with Blazor
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Handling UI differences between website and app - .NET MAUI Tutorial
From the course: Creating .NET MAUI Applications with Blazor
Handling UI differences between website and app
- [Instructor] We've created a project that runs both on a mobile platform through MAUI Blazor and in a browser with Blazor WebAssembly. But we probably don't want all systems to have exactly the same UI. In fact, the expectations can change quite frequently by platform. How should we handle this? In a normal MAUI app, we may want to use pre compilation directives but that won't work in our Razor class library. It needs to be able to run on all platforms at compiled time. Additionally, the library project can't access anything that isn't available on both the MAUI and the Blazor WebAssembly versions of .net. So what can we do? Once again, creating an interface with different implementations will come to our rescue. If we look at the start code for this video, we can see an interface has been added to the core project and this interface is iPlatformHhelper. This interface returns information about what environment the…
Contents
-
-
-
-
-
A single website to rule them all4m 11s
-
(Locked)
How about native APIs?6m 48s
-
(Locked)
Razor Class Libraries5m 52s
-
(Locked)
Handling UI differences between website and app9m 50s
-
(Locked)
Storing local data: Part 14m 55s
-
(Locked)
Storing local data: Part 29m 49s
-
(Locked)
Issues around keeping your app up to date3m 30s
-
(Locked)
The HTML5 service worker and WebAssembly4m 33s
-
(Locked)
Challenge: Implementing IndexedDB1m 56s
-
(Locked)
Solution: Implementing IndexedDB5m 2s
-
-
-