I have a problem to show display a Image on the map. There are one Button and one Image on the map, the visibility of the Image is Collapsed and when the Button is clicked, the visibility of the image will be changed to Visible. But the Image doesn't display on the map, anyone can explain this?xaml code:
<esri:Map x:Name="LocalMap" >
<esri:ArcGISTiledMapServiceLayer ID="MyLayer"
Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
<esri:ElementLayer ID="MyElements">
<esri:ElementLayer.Children>
<Button x:Name="RedlandsButton" Width="100" Height="20" Content="ShowImage"
esri:ElementLayer.Envelope="-10,10,-10,10" Click="RedlandsButton_Click"
VerticalAlignment="Center" HorizontalAlignment="Center" ToolTipService.ToolTip="help"
>
</Button>
<Image x:Name="Pic" Source="../pin_red.png" Stretch="Fill" Visibility="Collapsed"
esri:ElementLayer.Envelope="0,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Left"></Image>
</esri:ElementLayer.Children>
</esri:ElementLayer>
</esri:Map>
cs code:
private void RedlandsButton_Click(object sender, RoutedEventArgs e)
{
Image image = (LocalMap.Layers["MyElements"] as ElementLayer).Children[1] as Image;
image.Visibility = Visibility.Visible;
}