<local:SLTrafficCounts />
In this sample, MapTipPosition is the name of the project.You don't need to create a new project, you can just include theMapTipPositionBehavior.cs source in your project and add the behavior to your map.
using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SLTrafficCounts { public class PositionMapTip : Behavior<Map> { private Point _mousePos; // Track the position of the mouse on the Map /// Distance between the MapTip and the boundary of the map public double Margin { get; set; }
xmlns:local="clr-namespace:SLTrafficCounts" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" . . . <esri:Map x:Name="MyMap" Extent="748437,575771,1204687,267438" MouseClick="QueryPoint_MouseClick"> <i:Interaction.Behaviors> <local:SLTrafficCounts /> </i:Interaction.Behaviors>
I'm not clear as to how to resolve the missing reference for xmlns:local="clr-namespace:MapTipPosition"
This bog post is talking about positionning maptips inside maps. It may be helpful : http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/09/30/How-to-keep-MapTips-in-the-Map.aspx
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.