Solved! Go to Solution.
Is there a way to constrain the InfoWindow, when visible, to the size of the browser window? If a user clicks a point that is close to the top of the browser window, the InfoWindow expands past the top of the page.
[ATTACH=CONFIG]12103[/ATTACH]
Ideally I'd like to shift the map south so that the entire InfoWindow displays.
[ATTACH=CONFIG]12104[/ATTACH]
Any ideas?
Hi..
Could you please post the code showing how you did this InfoWindow?
I'm having some problems to implement this control...
Thanks.
Are you having problems implementing a simple infoWindow? If so, then check this out:http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#InfoWindowSimple
<Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <DataTemplate x:Name="MyFeatureLayerInfoWindowTemplate"> <StackPanel Orientation="Horizontal"> <TextBlock Text="TEST" Foreground="Black" FontSize="12" /> </StackPanel> </DataTemplate> </Grid.Resources> <esri:InfoWindow x:Name="MyInfoWindow" Padding="2" CornerRadius="20" Background="LightSalmon" ContentTemplate="{StaticResource MyFeatureLayerInfoWindowTemplate}" /> </Grid>
void graphic_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { Graphic gra = sender as Graphic; MyInfoWindow MyInfo = new MyInfoWindow(); MyInfo.MyInfoWindow.Content = gra.Attributes; MyInfo.MyInfoWindow.Anchor = gra.Geometry as MapPoint; MyInfo.MyInfoWindow.Map = CurrentPage.myMap; MyInfo.MyInfoWindow.IsOpen = true; }
<esri:InfoWindow x:Name="MyInfoWindow" Padding="2" CornerRadius="20" Background="LightSalmon" ContentTemplate="{StaticResource MyFeatureLayerInfoWindowTemplate}" />