Bing maps Silverlight Zoom slider
Is there a way to change the style or position of the bing maps silver开发者_Python百科light defualt zoom silder?
yes you can hide the default slider and create your own attaching to the map events to get zoom / pan etc working with your control
I did something similar to this with XAML resembling:
<Grid>
<!-- MAP -->
<MapControl:Map x:Name="_map" />
<!-- ZOOM SLIDER -->
<Slider Style="{StaticResource MapZoomSliderStyle}"
HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="40" Width="18" Height="300"
Value="{Binding ElementName=_map, Path=ZoomLevel}"
Minimum="1" Maximum="20"/>
</Grid>
Binding the max/min values is a bit tricky, as they change depending upon where on the map you're viewing, and the map mode (road/aerial). See this question for further discussion.
精彩评论