<Grid x:Name="LayoutRoot"> <ListBox Width="600" Height="400" Margin="0,5,0,10"> <esri:Map x:Name="LocalMap" Width="600" Height="400" > <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> </esri:Map> </ListBox> </Grid>
It looks like by using the ScrollableMap sample, I posted a few days ago (http://resources.esri.com/arcgisserver/apis/silverlight/index.cfm?fa=codeGalleryDetails&scriptID=16969), it should work inside a listbox (even without using the scrollviewer capabilities).Without scrollviewer for the item:<ListBox Margin="0,5,0,10"> <local:ScrollableMap> <esri:Map x:Name="LocalMap" Width="600" Height="400" > <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> </esri:Map> <local:ScrollableMap> </ListBox> With a scrollviewer for panning the map:<ListBox Margin="0,5,0,10"> <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> <local:ScrollableMap> <esri:Map x:Name="LocalMap" Width="600" Height="400" > <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> </esri:Map> <local:ScrollableMap> </ScrollViewer> </ListBox>
<ListBox Margin="0,5,0,10"> <local:ScrollableMap> <esri:Map x:Name="LocalMap" Width="600" Height="400" > <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> </esri:Map> <local:ScrollableMap> </ListBox>
<ListBox Margin="0,5,0,10"> <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"> <local:ScrollableMap> <esri:Map x:Name="LocalMap" Width="600" Height="400" > <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> </esri:Map> <local:ScrollableMap> </ScrollViewer> </ListBox>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.