//Basemaps stored locally in the project. This is usually an empty collection
string localBasemapTypeID = "cim_map_basemap";
var localBasemaps = await QueuedTask.Run(() =>
{
var mapContainer = Project.Current.GetProjectItemContainer("Map");
return mapContainer.GetItems().Where(i => i.TypeID == localBasemapTypeID).ToList();
});
//portal basemaps. If there is no current active portal, the usual default
//is arcgis online
var portal = ArcGISPortalManager.Current.GetActivePortal();
var portalBaseMaps = await portal.GetBasemapsAsync();
//use one of them...local or portal...
//var map = MapView.Active.Map;
//QueuedTask.Run(() => map?.SetBasemapLayers(portalBaseMaps[0]));