Table of Contents

Class ButtonElement

Namespace
Kook
Assembly
Kook.Net.Core.dll

A button element that can be used in an IModule.

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

Properties

Click

Gets the event type fired when the button is clicked.

public ButtonClickEventType? Click { get; }

Property Value

ButtonClickEventType?

A ButtonClickEventType value that represents the event type fired when the button is clicked.

Text

Gets the text element of the button.

public IElement Text { get; }

Property Value

IElement

An IElement value that represents the text element of the button.

Theme

Gets the theme of the button.

public ButtonTheme? Theme { get; }

Property Value

ButtonTheme?

A ButtonTheme value that represents the theme of the button.

Type

Gets the theme of the button.

public ElementType Type { get; }

Property Value

ElementType

An ElementType value that represents the theme of the button.

Value

Gets the value of the button.

public string? Value { get; }

Property Value

string

A string value that represents the value of the button.

Methods

Equals(ButtonElement?)

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

public bool Equals(ButtonElement? buttonElement)

Parameters

buttonElement ButtonElement

The ButtonElement to compare with the current ButtonElement.

Returns

bool

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

Equals(object?)

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

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current ButtonElement.

Returns

bool

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

Remarks

If the object passes is an ButtonElement, Equals(ButtonElement?) 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 ==(ButtonElement?, ButtonElement?)

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

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

Parameters

left ButtonElement
right ButtonElement

Returns

bool

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

operator !=(ButtonElement?, ButtonElement?)

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

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

Parameters

left ButtonElement
right ButtonElement

Returns

bool

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