Need Help Configuring SplitMenuButton in Flare API

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Evetsm
Propeller Head
Posts: 90
Joined: Wed Apr 30, 2014 8:32 am

Need Help Configuring SplitMenuButton in Flare API

Post by Evetsm »

I am trying to add a ToggleButton to a tab group. (Apparently the button is also known as a SplitMenuButton.)
Although I have added the button and several selections, there is no text in the selections. The selections are blank:
screenshot2.png
My code to create and add a new tab and its children looks like this:

Code: Select all

INavContext mNavigationContext = mHost.GetNavContext();
IRibbon ribbon = mNavigationContext.GetRibbon();
IRibbonTab tab = ribbon.AddNewRibbonTab("Demo Plugins");
IRibbonGroup group = tab.AddNewRibbonGroup("PluginGroup");
IRibbonMenu menuChangeCase = group.AddRibbonSplitMenuButton(PluginViewModel.ChangeCase2);
My code in the PluginViewModel looks like this:

Code: Select all

get
{
    if (_changeCase2 == null)
    {
        //BitmapImage image = new BitmapImage(new Uri(ImageUrls.searchIconUrl));
        _changeCase2 = new RibbonMenuData()
        {
            SmallImage = new BitmapImage(new Uri(ImageUrls.changeCaseUrl)),
            Label = "Change Case",
            KeyTip = "Change Case",
            ToolTipDescription = "Change case of selection",
           
        };

        _changeCase2.ControlDataCollection.Add(new RibbonControlData()
        {
            Label = "Lower Case"
        });

        _changeCase2.ControlDataCollection.Add(new RibbonControlData()
        {
            Label = "Sentence Case"
        });
        _changeCase2.ControlDataCollection.Add(new RibbonControlData()
        {
            Label = "Heading Case"
        });

        _changeCase2.ControlDataCollection.Add(new RibbonControlData()
        {
               Label = "Toggle Case"
        });
    return _changeCase2;
}
I am probably adding the wrong sub-components to the button, but being a Flare API novice, I’m not sure what I’m doing wrong.

Thank you.
You do not have the required permissions to view the files attached to this post.
Post Reply