Select to view content in your preferred language

Configure InfoWindow

2178
1
Jump to solution
06-21-2012 07:55 AM
IkerBerasaluce
Occasional Contributor
Hello,
I have been adding to my development popup capabilities using this sample (http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#WebMapDynamicServicePopups) Although I had some problems now it is working but I like to add a couple of supposedly minor changes that I have no idea how to implement.
The first one is a close button, it seems quite straightforward but the only thing I managed to get done is closing the infowindow when you click on it. I have been searching and the flex API has a closeButtonVisible property but the silverlight API does not have it. How can I put a close button in my silverlight .Net development?
Also, I am showing a image just like in the example, but unlike the example my picture is quite general so it looks too tiny in the infowindow. I supose that it is getting a thumbnail to show. At first I tried to show the full image in a new window when clicking the thumbnail but as this is not working and I have space left I would like to make the thumbnail bigger. How can I do this?
Thank you.
0 Kudos
1 Solution

Accepted Solutions
JenniferNery
Esri Regular Contributor
The DataTemplate is created for you based on the webmap PopupInfo. Unfortunately a MaxWidth/MaxHeight is set for image so it currently cannot exceed 235/145.

If you are not using Webmap Popups, you can change the DataTemplate as you wish: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#InfoWindowSimple

For example:
   <DataTemplate x:Key="MyFeatureLayerInfoWindowTemplate">     <StackPanel>      <TextBlock Text="{Binding [STATE_NAME]}" Foreground="Black" FontSize="12" />      <Image Source="http://2.bp.blogspot.com/-2TNxVSJ4J9E/TfYfd0ChiMI/AAAAAAAABcc/53CtYEptiBY/s1600/USA-flag.jpg" Height="300" Width="300"/>      <Button Content="Close" Click="Button_Click"/>     </StackPanel>    </DataTemplate>


  private void Button_Click(object sender, RoutedEventArgs e)   {    MyInfoWindow.IsOpen = false;   }

View solution in original post

0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
The DataTemplate is created for you based on the webmap PopupInfo. Unfortunately a MaxWidth/MaxHeight is set for image so it currently cannot exceed 235/145.

If you are not using Webmap Popups, you can change the DataTemplate as you wish: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#InfoWindowSimple

For example:
   <DataTemplate x:Key="MyFeatureLayerInfoWindowTemplate">     <StackPanel>      <TextBlock Text="{Binding [STATE_NAME]}" Foreground="Black" FontSize="12" />      <Image Source="http://2.bp.blogspot.com/-2TNxVSJ4J9E/TfYfd0ChiMI/AAAAAAAABcc/53CtYEptiBY/s1600/USA-flag.jpg" Height="300" Width="300"/>      <Button Content="Close" Click="Button_Click"/>     </StackPanel>    </DataTemplate>


  private void Button_Click(object sender, RoutedEventArgs e)   {    MyInfoWindow.IsOpen = false;   }
0 Kudos