graphic.Attributes.Add("Title", item.Title.Text)
graphic.Attributes.Add("Summary", item.Summary.Text)
graphic.Attributes.Add("PublishDate", item.PublishDate)
If item.Links.Count > 0 Then
graphic.Attributes.Add("Link", item.Links(0).Uri)
End If
graphic.Attributes.Add("FeedItem", item)
graphic.Attributes.Add("Id", item.Id)
<UserControl x:Name="hmTooltip" HorizontalAlignment="Left" Margin="132,141,0,289" Width="140">
<TextBlock Text="{Binding Converter={StaticResource MyDictionaryConverter}, ConverterParameter=FeedItem, Mode=OneWay}"
HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" Height="30" Width="190" FontSize="10" Foreground="Black" Margin="2,0,0,0" />
</UserControl>
<Grid.Resources>
<Border x:key="maptip" >
.......
</Border>
</Grid.resources>
........
<esri:FeatureLayer Maptip="{StaticResource maptip}" ........
myFeatureLayer.MapTip = [FrameworkElement]LayoutRoot.Resources["maptip"];
<Grid.Resources>
<DataTemplate x:key="maptip" >
<Border >
.......
</Border>
</DataTemplate>
</Grid.resources>
........
<esri:FeatureLayer ...>
<esri:FeatureLayer.MapTip>
<ContentControl ContentTemplate="{StaticResource maptip}" Content="{Binding}" />
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ...> <esri:FeatureLayer.MapTip> <MyMaptipControl .............../> </esri:FeatureLayer.MapTip> </esri:FeatureLayer>
<DataTemplate x:Name="edmMapTip">
<Border Background="#FF8EA992" BorderBrush="#FF161537">
<TextBlock x:Name="tbMapTip" Text="{Binding [VALUE]}" TextWrapping="Wrap" Height = "30" Width="120" FontSize="10" Foreground="Black" Margin="2" />
</Border>
</DataTemplate>
reportLayer.OutFields.Add("OCCUPANCY");
reportLayer.OutFields.Add("VALUE");
FlareClusterer clusterer = new FlareClusterer();
reportLayer.Clusterer = clusterer;
reportLayer.MapTip = grdMapBase.Resources["edmMapTip"] as MapTip;
<esri:FeatureLayer.MapTip>
<ContentControl ContentTemplate="{StaticResource maptip}" Content="{Binding}" />
</esri:FeatureLayer.MapTip>
reportLayer.MapTip = new ContentControl()
{
ContentTemplate = (DataTemplate)grdMapBase.Resources["maptip"]
};
reportLayer.MapTip.SetBinding(ContentControl.ContentProperty, new Binding());
<Border x:Name="bdBase" Background="CadetBlue">
<StackPanel x:Name="stLabel">
<TextBlock x:Name="tb" Text="{Binding [VALUE]}"/>
</StackPanel>
</Border>
public partial class MyMapTip : UserControl
{
public MyMapTip()
{
InitializeComponent();
DataContext = this;
tb.SetBinding(TextBlock.TextProperty,new System.Windows.Data.Binding{Source = this, Path = new PropertyPath("TipText")});
}
public static readonly DependencyProperty tbTextProperty = DependencyProperty.Register("Text", typeof(String), typeof(MyMapTip),null);
public string TipText
{
get { return(string) GetValue(tbTextProperty); }
set { SetValue(tbTextProperty, value); }
}
private static void Text_PropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { }
}
reportLayer.OutFields.Add("VALUE");
FlareClusterer clusterer = new FlareClusterer();
reportLayer.Clusterer = clusterer;
MyMapTip mt = new MyMapTip();
mt.TipText = "[VALUE]";
reportLayer.MapTip = mt;