private void StartSearch() { bool found = false; AllowTimersTick = false; RefreshMapTimer.Start(); List <Location> locations = new List <Location>(); EPL_WS.GET_Suspensions_FullDetailed_Result item = new EPL_WS.GET_Suspensions_FullDetailed_Result(); foreach (Pushpin pushpin in m_PushpinLayer.Children) { string tag = pushpin.Tag.ToString(); int index = tag.IndexOf("_"); string ID_Suspension = tag.Substring(0, index); string ID_Ramal = tag.Substring(index + 1, tag.Length - index - 1); if (ID_Suspension.Equals(TB_Search.Text)) { pushpin.RenderTransform = new ScaleTransform { CenterX = pushpin.Width / 2, CenterY = pushpin.Height / 2, ScaleX = 1.5, ScaleY = 1.5 }; Canvas.SetZIndex(pushpin, 1000); locations.Add(pushpin.Location); if (!found) { item = PinsArray.Where(e => e.ID.ToString().Equals(ID_Suspension)).ElementAt(0); SelectedPushpin = pushpin; found = true; } } else { pushpin.RenderTransform = new ScaleTransform { CenterX = pushpin.Width / 2, CenterY = pushpin.Height / 2, ScaleX = 0.75, ScaleY = 0.75 }; Canvas.SetZIndex(pushpin, 0); } } if (found) { MiraMap.SetView(new LocationRect(locations)); ShowSuspensionDetail(SelectedPushpin, item); } }