Description
The Screenshots
property of the Package
class provides access to a collection of screenshots associated with the package. Each screenshot is represented by an instance of Sandbox.Package/Screenshot
. This property is useful for retrieving visual representations of the package, which can be displayed in user interfaces or used for other purposes.
Usage
To access the screenshots of a package, simply use the Screenshots
property on an instance of the Package
class. This will return an array of Screenshot
objects, which you can iterate over or manipulate as needed.
Example
// Example of accessing the Screenshots property
Package myPackage = new Package();
Sandbox.Package.Screenshot[] screenshots = myPackage.Screenshots;
foreach (var screenshot in screenshots)
{
// Process each screenshot
// For example, display the screenshot in a UI
DisplayScreenshot(screenshot);
}