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) =>
{
});
}
}

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.