I am implementing a project in my Maui app to display a pointer over buttons and links on Windows. (vladislavantonyuk.github.io/articles/Setting-a-cursor-for-.NET-MAUI-VisualElement/)
At the class CursorBehavior I need to import the platform -namespaces to use the method SetCustomCursor(..). Visual Studio knows, which namespaces are missing.
After the (automatic) import of the namespaces, however, they are marked as faulty (on Android, MacCatalyst, Windows).
Only for iOS the message is different:
I tried also to set them all as global usings, what makes no differences.
Here as example the class CursorExtensions at Platforms.Android:
How can I use the platform namespaces?
First of all, you can't add all the platforms namespace in the share project directly. You can only add one of them which depends on the target platform.
Such as the picture shows, you can just add the Platforms.Android namespace.
In addition, I checked the link you provided. You don't have to add all the platforms namespace. You can check the author's source code on the github.