Bing Maps di controllo silverlight puntina da disegno personalizzato
-
19-09-2019 - |
Domanda
Ho provato a fare una puntina da disegno personalizzato per il controllo Silverlight Bing Maps, ma posso solo aggiungere 1 puntina da disegno. Alla seconda puntina ottengo il seguente errore:
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)
Qualcuno sa quello che potrebbe essere sbagliato? Io pongo le seguenti proprietà prima di aggiungerlo alla mappa:
public Location Location
{
get
{
return this.GetValue(MapLayer.PositionProperty) as Location;
}
set
{
this.SetValue(MapLayer.PositionProperty, value);
}
}
this.SetValue(MapLayer.PositionOriginProperty, PositionOrigin.BottomLeft);
Soluzione
2 simboli non possono avere lo stesso valore della proprietà Name
.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow