I Use C# and telegram.bot and want create dynamic InlineKeyboardMarkup
private static InlineKeyboardMarkup InlinePostsKeyboard;
private static List<string> PostsTitle;
...
PostsTitle = (from p in dba.BlogPosts select p.Subject).Take(4).ToList();
var inlineButtons = PostsTitle.Select(title => new[] { InlineKeyboardButton.WithCallbackData(title, title) }).ToArray();
InlinePostsKeyboard = new InlineKeyboardMarkup(inlineButtons);
...
Bot.SendTextMessageAsync(Chat.Id, e.Message.Text, replyMarkup: InlinePostsKeyboard);`
as you see in above code bot most show 4 InlineKeyboardButton (per line) , but does not show anything !
Just enough change ....Take(4).ToList(); to 3 or less than 4 (ex : 3 , 2 or 1) and you will see that the buttons will be displayed correctly
I want to know the reason for this Where have I made a mistake?