ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / FavoritesManager Class / RemoveFavorite Method
The item to remove from the favorite collection. For example a folder connection or a toolbox.
Example

In This Topic
    RemoveFavorite Method
    In This Topic
    Removes an item from the favorites collection.
    Syntax
    public void RemoveFavorite( 
       Item item
    )
    Public Sub RemoveFavorite( _
       ByVal item As Item _
    ) 

    Parameters

    item
    The item to remove from the favorite collection. For example a folder connection or a toolbox.
    Example
    Remove All Favorites
    var favorites = FavoritesManager.Current.GetFavorites();
    foreach (var favorite in favorites)
      FavoritesManager.Current.RemoveFavorite(favorite.Item);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also