error in Xamarin.Forms Map Pins

AS_H 41 Reputation points
2022-05-11T07:03:21.613+00:00

Hi,

help me I'm having an error in the code,

The error:

Property 'DataTemplateContent' does not support values of type 'Pin'.
line 4

the Code:

            <publicViews:MapItemTemplateSelector x:Key="MapItemTemplateSelector">
                <publicViews:MapItemTemplateSelector.DataTemplate>
                    <DataTemplate>
                        <map:Pin
                            Address="{Binding Description}"
                            Icon="{Binding IconNumber, Converter={StaticResource iconConverter}}"
                            IsVisible="{Binding Isvisible}"
                            Label="{Binding Address}"
                            Position="{Binding Position}"
                            />
                    </DataTemplate>
                </publicViews:MapItemTemplateSelector.DataTemplate>
            </publicViews:MapItemTemplateSelector>
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,324 questions
{count} votes