I am wanting to display information in an InfoWindow when the user clicks on a point on the map. I have implemented the InfoWindow in XAML, but I do not understand the code behind it. Any information will be appreciated. Here is my (what I feel is relevant) XAML:
<esri:InfoWindow x:Name="MyInfoWindow"
Padding="2"
CornerRadius="20"
Background="{StaticResource PanelGradient}"
Map="{Binding MyMap}"
ContentTemplate="{StaticResource MyFeatureLayerInfoWindowTemplate}"
MouseLeftButtonUp="MyInfoWindow_MouseLeftButtonUp" />
If you need anymore information, let me know. I have the information being displayed correctly at the moment in a MapTip. Here is the XAML for that:
<esri:FeatureLayer.MapTip>
<Border CornerRadius="10" BorderBrush="Black" BorderThickness="2" Margin="0,0,15,15" Background="{StaticResource PanelGradient}">
<StackPanel Margin="7">
<TextBlock Text="{Binding [WVAL_ID], StringFormat='ID: \{0\}'}" FontWeight="Bold" Foreground="White" />
<TextBlock Text="{Binding [SIZE], StringFormat='Size: \{0\}'}" FontWeight="Bold" Foreground="White" />
<TextBlock Text="{Binding [WVAL_USE], StringFormat='Use: \{0\}'}" FontWeight="Bold" Foreground="White" />
<TextBlock Text="{Binding [WVAL_TYPE], StringFormat='Type: \{0\}'}" FontWeight="Bold" Foreground="White" />
<TextBlock Text="{Binding [OPENS], StringFormat='Opens: \{0\}'}" FontWeight="Bold" Foreground="White" />
<TextBlock Text="{Binding [TURNS], StringFormat='Turns: \{0\}'}" FontWeight="Bold" Foreground="White" />
<StackPanel Orientation="Horizontal" >
</StackPanel>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
Best Answer
I finally figured it out for the most part...
XAML:
C#: