Setting a cursor for .NET MAUI VisualElement #98
Replies: 6 comments 12 replies
-
|
how to trigger actions when the mouse is clicked? |
Beta Was this translation helpful? Give feedback.
-
|
Hello, where do I put this code? MyVisualElement.SetCustomCursor(CursorIcon.Hand, MyVisualElement.Handler?.MauiContext); Should this be in my MainPage.xaml.cs file? Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I like your tutorial, but I have a problem with getting the MauiContext. I don't use AppShell and when I directly put mainPage = HomePage() (which is just a contentPage) in app.xaml.cs, I get an exception because the mauicontext is null when building the view from xaml. This didn't happen with appshell. Any idea ? |
Beta Was this translation helpful? Give feedback.
-
|
Is it possible to add our own cursor when hovering over a control? We have some core cursors that are working. Is it possible to add a new .cur file on Windows and Mac in .NET MAUI? |
Beta Was this translation helpful? Give feedback.
-
|
In maui iOS .Net 9, this code throws an error: var path = UIBezierPath.FromPath(pathGeometry.ToCGPath().Data); I think using Microsoft.Maui.Controls.Compatibility.Platform.iOS; is no longer valid in .Net 9 Please kindly help. Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
The suggested solution does not work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Setting a cursor for .NET MAUI VisualElement
The article demonstrates how to change cursor of any .NET MAUI VisualElement.
https://vladislavantonyuk.github.io/articles/Setting-a-cursor-for-.NET-MAUI-VisualElement/
Beta Was this translation helpful? Give feedback.
All reactions