void RaiseMapSelectedForOpening(object sender, ContentItemEventArgs e) { Cursor = Cursors.Wait; if (e != null && e.Item != null && !string.IsNullOrEmpty(e.Item.Id)) { if (MapSelectedForOpening != null) { string serverBaseUrl = System.IO.Path.Combine(ArcGISOnlineEnvironment.ConfigurationUrls.Sharing, "content"); MapSelectedForOpening(this, new MapDocumentEventArgs() { DocumentID = e.Item.Id, Document = new ESRI.ArcGIS.Client.WebMap.Document() { ServerBaseUrl = serverBaseUrl, BingToken = ArcGISOnlineEnvironment.BingToken, Token = ArcGISOnlineEnvironment.ArcGISOnline.User.Token, ProxyUrl = (string.IsNullOrWhiteSpace(ArcGISOnlineEnvironment.ConfigurationUrls.ProxyServerEncoded) ? null : ArcGISOnlineEnvironment.ConfigurationUrls.ProxyServerEncoded), GeometryServiceUrl = ArcGISOnlineEnvironment.ConfigurationUrls.GeometryServer } }); } //cache map as most recently used map MRUMaps.Add(e.Item); } Cursor = Cursors.Arrow; }
internal void Clear() { MRUMaps.Clear(); if (RecentMapsListBox != null) { RecentMapsListBox.ItemsSource = null; RecentMapsListBox.DataContext = null; } }