void MapSearchControlSetSource(object sender, DataEventArgs e) { _mapSearchControl.Close(); _mapSearchControl = null; SetSource((LocationResult)e.Data); }
void SearchLocationButtonClick(object sender, RoutedEventArgs e) { if (_mapSearchControl != null) _mapSearchControl.Close(); var height = FrameworkManager.Canvas.ActualHeight; _mapSearchControl = new MapSearchControl { Height = height - 200 }; _mapSearchControl.InitializeControl(FrameworkManager, 0, 0); _mapSearchControl.ShowKeyBoardRequested += MapSearchControlShowKeyBoardRequested; _mapSearchControl.HideKeyBoardRequested += MapSearchControlHideKeyBoardRequested; _mapSearchControl.SetDestination += MapSearchControlSetDestination; _mapSearchControl.Closed += MapSearchControlClosed; _mapSearchControl.SetSource += MapSearchControlSetSource; }
void MapSearchControlClosed(object sender, EventArgs e) { _mapSearchControl = null; }