Hi, I am using the following wpf to create a popup when clicking on feature on map. The popup sometimes displays outside of the view window.
I would like to display the popup always in the centre of the map screen.
Any ideas??
<esri:MapView.Overlays>
<esri:OverlayItemsControl>
<Grid x:Name="popup" Visibility="Visible"
esri:MapView.ViewOverlayAnchor="{Binding Geometry}"
IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Top" MaxWidth="200">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Background="#FFFFFF" BorderThickness="1,1,1,0" Margin="0,0,-33,19" BorderBrush="White" Grid.ColumnSpan="2" Grid.RowSpan="2">
<StackPanel Margin="20" x:Name="MyStackPanel"/>
</Border>
</Grid>
</esri:OverlayItemsControl>
</esri:MapView.Overlays>