public IReadOnlyList<Favorite> GetFavorites()
Public Function GetFavorites() As IReadOnlyList(Of Favorite)
Return Value
A readonly list of Favorite.
public IReadOnlyList<Favorite> GetFavorites()
Public Function GetFavorites() As IReadOnlyList(Of Favorite)
var favorites = FavoritesManager.Current.GetFavorites(); foreach (var favorite in favorites) { bool isAddedToAllProjects = favorite.IsAddedToAllNewProjects; // retrieve the underlying item of the favorite Item item = favorite.Item; // Item properties var itemType = item.TypeID; var path = item.Path; // if it's a folder item if (item is FolderConnectionProjectItem) { } // if it's a goedatabase item else if (item is GDBProjectItem) { } // else }
var favorites = FavoritesManager.Current.GetFavorites(); foreach (var favorite in favorites) FavoritesManager.Current.RemoveFavorite(favorite.Item);
ArcGIS.Desktop.Core.Events.FavoritesChangedEvent.Subscribe((args) => { // favorites have changed int count = FavoritesManager.Current.GetFavorites().Count; });
Target Platforms: Windows 11, Windows 10, Windows 8.1