bool IsFavourite { get; set; }

robot_2Generated
code_blocksInput

Description

The IsFavourite property indicates whether a particular asset is marked as a favorite by the user. It returns true if the asset is in the user's favorite list, otherwise false.

Usage

Use the IsFavourite property to check if an asset is marked as a favorite. This property is useful for UI elements that need to display or toggle the favorite status of an asset.

Example

// Example of checking if a package is a favorite
Sandbox.Package myPackage = GetPackage();
if (myPackage.IsFavourite)
{
    // Perform actions for favorite packages
    ShowFavoriteIcon();
}
else
{
    // Perform actions for non-favorite packages
    HideFavoriteIcon();
}