none
Populating a VSTO Outlook Ribbon Gallery programmatically RRS feed

  • Question

  • I created a ribbon with a dropdown box in VS2010 using the designer, which VS coded as a gallery.  I"m trying to rewrite the code manually (using XML) but am unable to figure out how to dynamically populate the items in the "dropdown".

    Here is my XML file as it stands right now:

        <?xml version="1.0" encoding="UTF-8"?>
        <customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
            <ribbon>
                <tabs>
                    <tab idMso="TabMail" visible="true">
                        <group id="grp_PSTManagement" label="PST Management">
                          <gallery id="dd_PSTList" onAction="dd_PSTList_Click" label="Closed PST List" columns="1">
                          </gallery>
                          <buttonGroup>
                            <button id="btn_ClosedPSTs" onAction="btn_EditPSTList" label="Edit Closed PST List" />
                          </buttonGroup>
                        </group>
                    </tab>
                </tabs>
            </ribbon>
        </customUI>

    I did try converting from the designer to XML/C# with very little luck/insight.  I've followed a ton of links online but have been confused or lost in a world of poorly convertible VB.

    And, yes, the dropdown needs to be dynamically populated...it cannot be pre-populated due to the nature of the data.

    Thanks.


    Wednesday, August 24, 2011 3:20 PM

All replies

  • Hi lgwapnitsky,

    Thanks for posting in the MSDN Forum.

    <<I created a ribbon with a dropdown box in VS2010 using the designer>> Do you means you create a ribbon via designer?

    According to your xml snipppet, you add a group which named "PST Management" in home tab and add a gallery in this group. Is it right?

    Would you please show me the cs file which relate to this xml file for further research?

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, August 28, 2011 10:15 AM
    Moderator