Bot Framework V3, How to get Adjacent Submit Action buttons in an adaptive card with c#





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.



It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.










share|improve this question





























    0















    I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.



    It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.










    share|improve this question

























      0












      0








      0








      I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.



      It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.










      share|improve this question














      I am trying to get adjacent submit actionsDesired submit action,rather than the default action buttons(one below the other) that we get in an adaptive carddefault submit action buttons. Please refer the images attached.



      It would be helpful if you can let me know how can we achieve this using C#. Thanks for the help in advance.







      botframework adaptive-cards






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 29 '18 at 5:19









      Ravindra VarmaRavindra Varma

      32




      32
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.



          A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.



          Hope this helps.



          {
          "type": "ColumnSet",
          "spacing": "Medium",
          "columns": [
          {
          "type": "Column",
          "selectAction": {
          "type": "Action.OpenUrl",
          "url": "https://www.microsoft.com/"
          },
          "items": [
          {
          "type": "TextBlock",
          "horizontalAlignment": "Center",
          "size": "Large",
          "weight": "Bolder",
          "color": "Accent",
          "text": "Set due date"
          }
          ],
          "width": 1
          },
          {
          "type": "Column",
          "selectAction": {
          "type": "Action.OpenUrl",
          "url": "https://www.microsoft.com/"
          },
          "items": [
          {
          "type": "TextBlock",
          "horizontalAlignment": "Center",
          "size": "Large",
          "weight": "Bolder",
          "color": "Accent",
          "text": "Comment"
          }
          ],
          "width": 1
          }


          enter image description here






          share|improve this answer


























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532331%2fbot-framework-v3-how-to-get-adjacent-submit-action-buttons-in-an-adaptive-card%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.



            A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.



            Hope this helps.



            {
            "type": "ColumnSet",
            "spacing": "Medium",
            "columns": [
            {
            "type": "Column",
            "selectAction": {
            "type": "Action.OpenUrl",
            "url": "https://www.microsoft.com/"
            },
            "items": [
            {
            "type": "TextBlock",
            "horizontalAlignment": "Center",
            "size": "Large",
            "weight": "Bolder",
            "color": "Accent",
            "text": "Set due date"
            }
            ],
            "width": 1
            },
            {
            "type": "Column",
            "selectAction": {
            "type": "Action.OpenUrl",
            "url": "https://www.microsoft.com/"
            },
            "items": [
            {
            "type": "TextBlock",
            "horizontalAlignment": "Center",
            "size": "Large",
            "weight": "Bolder",
            "color": "Accent",
            "text": "Comment"
            }
            ],
            "width": 1
            }


            enter image description here






            share|improve this answer






























              1














              Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.



              A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.



              Hope this helps.



              {
              "type": "ColumnSet",
              "spacing": "Medium",
              "columns": [
              {
              "type": "Column",
              "selectAction": {
              "type": "Action.OpenUrl",
              "url": "https://www.microsoft.com/"
              },
              "items": [
              {
              "type": "TextBlock",
              "horizontalAlignment": "Center",
              "size": "Large",
              "weight": "Bolder",
              "color": "Accent",
              "text": "Set due date"
              }
              ],
              "width": 1
              },
              {
              "type": "Column",
              "selectAction": {
              "type": "Action.OpenUrl",
              "url": "https://www.microsoft.com/"
              },
              "items": [
              {
              "type": "TextBlock",
              "horizontalAlignment": "Center",
              "size": "Large",
              "weight": "Bolder",
              "color": "Accent",
              "text": "Comment"
              }
              ],
              "width": 1
              }


              enter image description here






              share|improve this answer




























                1












                1








                1







                Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.



                A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.



                Hope this helps.



                {
                "type": "ColumnSet",
                "spacing": "Medium",
                "columns": [
                {
                "type": "Column",
                "selectAction": {
                "type": "Action.OpenUrl",
                "url": "https://www.microsoft.com/"
                },
                "items": [
                {
                "type": "TextBlock",
                "horizontalAlignment": "Center",
                "size": "Large",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Set due date"
                }
                ],
                "width": 1
                },
                {
                "type": "Column",
                "selectAction": {
                "type": "Action.OpenUrl",
                "url": "https://www.microsoft.com/"
                },
                "items": [
                {
                "type": "TextBlock",
                "horizontalAlignment": "Center",
                "size": "Large",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Comment"
                }
                ],
                "width": 1
                }


                enter image description here






                share|improve this answer















                Unfortunately, the button orientation in the Botframework is channel specific. The only channels where it is possible to align buttons on the same line is WebChat and DirectLine, but the process to change the button alignment in those two channels is quite complicated.



                A simple way to solve your issue would be to create two columns and add a selectAction attribute to each column. That way when the user clicks on the column it will invoke the corresponding action. This approach works with the OpenUrl and Submit actions but doesn't work with the ShowCard action. The only other downside to this approach is that each column will not be formatted the same as the other buttons (there's no way to put an outline around each column), but you can add an image to each column to get the desired UI.



                Hope this helps.



                {
                "type": "ColumnSet",
                "spacing": "Medium",
                "columns": [
                {
                "type": "Column",
                "selectAction": {
                "type": "Action.OpenUrl",
                "url": "https://www.microsoft.com/"
                },
                "items": [
                {
                "type": "TextBlock",
                "horizontalAlignment": "Center",
                "size": "Large",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Set due date"
                }
                ],
                "width": 1
                },
                {
                "type": "Column",
                "selectAction": {
                "type": "Action.OpenUrl",
                "url": "https://www.microsoft.com/"
                },
                "items": [
                {
                "type": "TextBlock",
                "horizontalAlignment": "Center",
                "size": "Large",
                "weight": "Bolder",
                "color": "Accent",
                "text": "Comment"
                }
                ],
                "width": 1
                }


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 30 '18 at 18:20

























                answered Nov 29 '18 at 23:28









                tdurnfordtdurnford

                942119




                942119
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53532331%2fbot-framework-v3-how-to-get-adjacent-submit-action-buttons-in-an-adaptive-card%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

                    Calculate evaluation metrics using cross_val_predict sklearn

                    Insert data from modal to MySQL (multiple modal on website)