private void CreatePushpin(AddressLocator.ClientInfoObject client) { Location PinLocation = new Location(float.Parse(client.Latitude), float.Parse(client.Longitude)); Pushpin pin = new Pushpin(); pin.FontSize = 1; String TooltipContent = String.Join("\n", new String[] { String.Format("IP Address: {0}", client.address), String.Format("URL: {0}", client.UrlString), String.Format("Location: {0},{1},{2}", client.City, client.Province, client.Country) }); ToolTipService.SetToolTip(pin, TooltipContent); pin.MouseDoubleClick += PushpinClickedEventHandler; pin.Content = client.UrlString; pin.Location = PinLocation; MainMap.Children.Add(pin); }
private void ClientResolvedEventSubscriber(AddressLocator.ClientInfoObject client) { MainMap.Dispatcher.BeginInvoke(new PushpinCreator(this.CreatePushpin), new object[] { client }); }