Class InlineKeyboardMarkup
This object represents an inline keyboard that appears right next to the message it belongs to. See ReplyMarkupMaker for an easy way to create one of these
Inherited Members
Namespace: TelegramBotApi.Types.Markup
Assembly: TelegramBotApi.dll
Syntax
[JsonObject(MemberSerialization = MemberSerialization.OptIn, ItemNullValueHandling = NullValueHandling.Ignore)]
public class InlineKeyboardMarkup : ReplyMarkupBase
Constructors
| Improve this Doc View SourceInlineKeyboardMarkup()
Initializes a new, empty instance of the InlineKeyboardMarkup class
Declaration
public InlineKeyboardMarkup()
InlineKeyboardMarkup(InlineKeyboardButton)
Initializes a new instance of the InlineKeyboardMarkup class with only one button
Declaration
public InlineKeyboardMarkup(InlineKeyboardButton button)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton | button | The one button |
InlineKeyboardMarkup(InlineKeyboardButton[])
Initializes a new instance of the InlineKeyboardMarkup class with only one row
Declaration
public InlineKeyboardMarkup(InlineKeyboardButton[] row)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton[] | row | The row of inlineKeyboardButtons |
InlineKeyboardMarkup(InlineKeyboardButton[][])
Initializes a new instance of the InlineKeyboardMarkup class with multiple rows
Declaration
public InlineKeyboardMarkup(InlineKeyboardButton[][] rows)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton[][] | rows | The rows of InlineKeyboardButtons |
Properties
| Improve this Doc View SourceInlineKeyboard
Array of button rows, each represented by an Array of InlineKeyboardButton objects
Declaration
[JsonProperty(PropertyName = "inline_keyboard", Required = Required.Always)]
public InlineKeyboardButton[][] InlineKeyboard { get; set; }
Property Value
Type | Description |
---|---|
InlineKeyboardButton[][] |
Operators
| Improve this Doc View SourceImplicit(InlineKeyboardButton to InlineKeyboardMarkup)
Converts an InlineKeyboardButton to a markup
Declaration
public static implicit operator InlineKeyboardMarkup(InlineKeyboardButton button)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton | button | The button |
Returns
Type | Description |
---|---|
InlineKeyboardMarkup |
Implicit(InlineKeyboardButton[] to InlineKeyboardMarkup)
Converts an InlineKeyboardButton row to a markup
Declaration
public static implicit operator InlineKeyboardMarkup(InlineKeyboardButton[] row)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton[] | row | The button row |
Returns
Type | Description |
---|---|
InlineKeyboardMarkup |
Implicit(InlineKeyboardButton[][] to InlineKeyboardMarkup)
Converts InlineKeyboardButton rows to a markup
Declaration
public static implicit operator InlineKeyboardMarkup(InlineKeyboardButton[][] rows)
Parameters
Type | Name | Description |
---|---|---|
InlineKeyboardButton[][] | rows | The button rows |
Returns
Type | Description |
---|---|
InlineKeyboardMarkup |