public sealed record DesktopIconRequest : IEquatable<DesktopIconRequest> The icon to look up: by icon name, for an application, or for a content type, at a size and scale.
Remarks
Create a request with DesktopIconRequest.ForIconName, DesktopIconRequest.ForApplication or DesktopIconRequest.ForContentType; exactly one of DesktopIconRequest.IconName, DesktopIconRequest.ApplicationId and DesktopIconRequest.ContentType is set.
Properties
ApplicationId
public string? ApplicationId { get; } The application whose icon to look up, an DesktopApplicationInfo.Id.
ContentType
public string? ContentType { get; } The content type whose icon to look up, a DesktopContentType.Id.
IconName
public string? IconName { get; } A themed icon name, such as text-x-generic.
MaximumScale
public static int MaximumScale { get; } The largest scale a request accepts. A later release may raise it.
MaximumSize
public static int MaximumSize { get; } The largest size a request accepts, in pixels. A later release may raise it.
Scale
public int Scale { get; init; } The display scale the icon is for, 1 to DesktopIconRequest.MaximumScale; 2 asks for an icon designed for twice the pixel density.
Exceptions
ArgumentOutOfRangeExceptionThe scale is outside its range.
Size
public int Size { get; init; } The nominal size in pixels at scale 1, 1 to DesktopIconRequest.MaximumSize.
Exceptions
ArgumentOutOfRangeExceptionThe size is outside its range.
Methods
ForApplication
public static DesktopIconRequest ForApplication(string applicationId, int size, int scale = 1) Requests the icon of the application applicationId.
Exceptions
ArgumentExceptionThe identifier is empty or contains NUL.
ForContentType
public static DesktopIconRequest ForContentType(string contentType, int size, int scale = 1) Requests the icon of the content type contentType.
Exceptions
ArgumentExceptionThe identifier is empty or contains NUL.
ForIconName
public static DesktopIconRequest ForIconName(string iconName, int size, int scale = 1) Requests the themed icon iconName, such as folder.
Exceptions
ArgumentExceptionThe name is empty or contains NUL or a path separator.