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.
OK, so let's see if I've got this right. The name of my project is "SLTrafficCounts". I have added a new class file named PositionMapTip.cs and the header info in that file looks like this.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; }
I then add this xaml code to the page containing the map: 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>
With this code the build produces two errors:Error 1 Unexpected ATTRIBUTE in parse rule PropertyElement ::= . PROPERTYELEMENT Content? ENDTAG.. D:\WebDevelopment\SLTrafficCounts\SLTrafficCounts\Views\Map.xaml SLTrafficCountsError 2 The type 'local:SLTrafficCounts' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. D:\WebDevelopment\SLTrafficCounts\SLTrafficCounts\Views\Map.xaml 109 22 SLTrafficCountsSo can you tell me what I have wrong?Thanks