I have put together an application that highlights a single Mapelement in yellow. This works find until I attempt to do a WindowPan to the selected Element. When I put the code in for the WindowPan, a single line of code [WindowPan(this.SelectedElement)], I then begin to have multiple selects upon clicking on the next few mapelements.
I have verified that my code selects only one item at a time when I click one item after another. I only get the above results of multiple selects when I put the one line of code in to Pan to the item.
Were you able to resolve your issue with panning the window? Please let me know if you have any further questions or concerns.
Jason,
I am still having the same problem. When I highlight an element and then move to a different element and do the WindowFit (see below), it does not clear the first highlight and then highlights the second element also. Here is the code:
private void mapODE_ElementClick(object sender, Infragistics.Silverlight.Map.MapElementClickEventArgs e) { if (this.SelectedElement != null && this.SelectedElement != e.Element) { this.AllowChangesOnSelectedElement = true; this.SelectedElement.Fill = null; this.AllowChangesOnSelectedElement = false; } e.Element.Fill = new SolidColorBrush(Colors.Yellow); this.SelectedElement = e.Element; this.mapODE.WindowFit(e.Element); }
private void mapODE_ElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "Fill" && sender == this.SelectedElement && !this.AllowChangesOnSelectedElement) { this.AllowChangesOnSelectedElement = true; this.SelectedElement.Fill = new SolidColorBrush(Colors.Yellow); this.AllowChangesOnSelectedElement = false; } }
Hi
This seems like a bug, so I have created a new bug issue #57963, which should be reolved for the next release. In the meantime try to set ElementHoverAction to None, e.g.:
xamMap1.ElementHoverAction = ElementHoverAction.None;
Please let me know if this works for you.
Best Regards, Ivan Kotev
I cannot find the ElementHoverAction in my Map Control. Is this a new one?
It's new for 2010.2, but you should be able to get it with the latest hotfix for 2009.2 too.
Ok, where do I go for that hotfix?
This service release is available under your account at the Infragistics Website. To download the service release, log in to ‘My IG’ and select ‘Keys & Downloads’. Select the NetAdvantage tab and then click on the product name. The available service releases should now be listed on the page underneath the tab control.