Pregunta

he intentado hacer una chincheta a medida para el control Silverlight Bing Maps, pero sólo puedo añadir al menos 1 de alfiler. En el segundo pasador me sale el siguiente error:

System.ArgumentException: Value does not fall within the expected range.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
   at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
   at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
   at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
   at System.Windows.PresentationFrameworkCollection`1.Add(T value)
   at MapInfo.Silverlight.CitiesControl.MainPage.c_GetCitiesCompleted(Object sender, GetCitiesCompletedEventArgs e)

¿Alguien sabe lo que podría estar haciendo mal? Estoy fijando las siguientes propiedades antes de añadirla al mapa:

    public Location Location
    {
        get
        {
            return this.GetValue(MapLayer.PositionProperty) as Location;
        }
        set
        {
            this.SetValue(MapLayer.PositionProperty, value);
        }
    }
   this.SetValue(MapLayer.PositionOriginProperty, PositionOrigin.BottomLeft);
¿Fue útil?

Solución

2 chinchetas no pueden tener el mismo valor de la propiedad Name.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top