Table of Contents

Class ImageElement

Namespace
Kook
Assembly
Kook.Net.Core.dll

An image element that can be used in an IModule.

public class ImageElement : IElement, IEquatable<ImageElement>, IEquatable<IElement>
Inheritance
ImageElement
Implements
Inherited Members
Extension Methods

Properties

Alternative

Gets the alternative text of the image.

public string? Alternative { get; }

Property Value

string

A string that represents the alternative text of the image.

Circle

Gets a value indicating whether the image should be rendered as a circle.

public bool? Circle { get; }

Property Value

bool?

true if the image should be rendered as a circle; otherwise, false; or null if whether the image should be rendered as a circle is not specified.

Size

Gets the size of the image.

public ImageSize? Size { get; }

Property Value

ImageSize?

An ImageSize that represents the size of the image; or null if the size is not specified.

Source

Gets the source of the image.

public string Source { get; }

Property Value

string

A string that represents the source of the image.

Type

Gets the type of the element.

public ElementType Type { get; }

Property Value

ElementType

An ElementType value that represents the theme of the button.

Methods

Equals(ImageElement?)

Determines whether the specified ImageElement is equal to the current ImageElement.

public bool Equals(ImageElement? imageElement)

Parameters

imageElement ImageElement

The ImageElement to compare with the current ImageElement.

Returns

bool

true if the specified ImageElement is equal to the current ImageElement; otherwise, false.

Equals(object?)

Determines whether the specified ImageElement is equal to the current ImageElement.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current ImageElement.

Returns

bool

true if the specified ImageElement is equal to the current ImageElement; otherwise, false.

Remarks

If the object passes is an ImageElement, Equals(ImageElement?) will be called to compare the 2 instances.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Operators

operator ==(ImageElement?, ImageElement?)

Determines whether the specified ImageElement is equal to the current ImageElement.

public static bool operator ==(ImageElement? left, ImageElement? right)

Parameters

left ImageElement
right ImageElement

Returns

bool

true if the specified ImageElement is equal to the current ImageElement; otherwise, false.

operator !=(ImageElement?, ImageElement?)

Determines whether the specified ImageElement is not equal to the current ImageElement.

public static bool operator !=(ImageElement? left, ImageElement? right)

Parameters

left ImageElement
right ImageElement

Returns

bool

true if the specified ImageElement is not equal to the current ImageElement; otherwise, false.