private void listpicker_selection_change(object sender, SelectionChangedEventArgs e)
{
if (isDownloading)
return;
if (!pickerOpen)
return;
pickerOpen = false;
_foundBuilding = false;
buildLoaded = false;
removeSearchButton();
if (BPicker.SelectedItem != null)
{
var selected = BPicker.SelectedItem.ToString();
if (selected.Equals("None") || selected.Equals("No Buildings to show"))
return;
if (Mymap.TileSources.Count > 0)
Mymap.TileSources.Clear();
BuildingSearch(selected);
if (_foundBuilding)
{
_searchBuilding = true;
_tileLoaded = true;
_foundTile = true;
}
else
{
_searchBuilding = false;
_tileLoaded = false;
_foundTile = false;
if (Mymap.TileSources.Contains(_wmstileprovider))
Mymap.TileSources.Remove(_wmstileprovider);
}
grid_search.Visibility = Visibility.Collapsed;
ContentPanel.Visibility = Visibility.Collapsed;
ApplicationBar.IsVisible = true;
}
}