How to you customize the ui of a Microsoft.Maui.Controls.Maps.Pin

Jeff Pfahl 91 Reputation points
2022-11-18T21:30:08.41+00:00

The doc says:

However, setting the Pin.Type property to any PinType member does not change the appearance of the rendered pin. Instead, you must customize the Pin handler to customize pin appearance.

PinHandler does not exist.

I am using VS 17.5 preview 1 and .net7.

Source:

using Microsoft.Maui.Controls.Maps;

namespace Computronix.Maui.Widgets;

public partial class PinBase : Pin
{
static PinBase()
{
PinHandler.Mapper.AppendToMapping(
"PinBase",
(handler, view) =>
{
});
}
}

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,900 questions
{count} votes