The elements I added to the ADXRibbonMenu are not visible

Add-in Express™ Support Service
That's what is more important than anything else

The elements I added to the ADXRibbonMenu are not visible
 
Nevzat Hayri TAVUK?U




Posts: 30
Joined: 2019-12-19
The code is below. Why the elements I added are not visible?

 this.rmRecentItems.Caption = "Recent Items";
            this.rmRecentItems.Dynamic = true;
            this.rmRecentItems.Id = "adxRibbonMenu_1b7136a044cb43b2a08135d705b8572f";
            this.rmRecentItems.ImageTransparentColor = System.Drawing.Color.Transparent;
            this.rmRecentItems.ItemSize = AddinExpress.MSO.ADXRibbonXItemSize.Large;
            this.rmRecentItems.Ribbons = ((AddinExpress.MSO.ADXRibbons)(((AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose | AddinExpress.MSO.ADXRibbons.msrOutlookPostCompose) 
            | AddinExpress.MSO.ADXRibbons.msrOutlookExplorer)));
            this.rmRecentItems.Size = AddinExpress.MSO.ADXRibbonXControlSize.Large;
            this.rmRecentItems.OnCreate += new AddinExpress.MSO.ADXRibbonCreateMenu_EventHandler(this.rmRecentItems_OnCreate);

 private async void rmRecentItems_OnCreate(object sender, ADXRibbonCreateMenuEventArgs e)
        {
            if (sender is ADXRibbonMenu ribbonMenu)
            {
               e.Clear();

                GDefinations.RecentObjects.Take(10).ToList().ForEach(recentObject =>
                {
                    ADXRibbonButton subButton = new ADXRibbonButton();
                    subButton.Caption = recentObject.Name.GetName();
                    subButton.ShowCaption = true;
                    subButton.Id = Guid.NewGuid().ToString();// recentObject.Id.ToString();
                    subButton.Tag2 = recentObject;
                    subButton.ImageTransparentColor = System.Drawing.Color.Transparent;
                    subButton.OnClick += new ADXRibbonOnAction_EventHandler(button_OnClick);
                    subButton.Ribbons = ((AddinExpress.MSO.ADXRibbons)((AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose | AddinExpress.MSO.ADXRibbons.msrOutlookExplorer)));
                    e.AddControl(subButton);
                });
            }
        }


User added an image
Posted 27 Jan, 2020 03:50:54 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Nevzat,

Enable the option described in section Get Informed about Errors in Ribbon markup; see the PDF file in the folder {Add-in Express}\Docs on your development PC.

A common mistake is re-using an id(s) - it must be unique. In your case, the newly created guid starts with a number while the id must start with a letter.


Andrei Smolin
Add-in Express Team Leader
Posted 27 Jan, 2020 04:38:38 Top
Nevzat Hayri TAVUK?U




Posts: 30
Joined: 2019-12-19
Thanks Andrei.I missed this detail
Posted 27 Jan, 2020 05:21:21 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
You are welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 27 Jan, 2020 05:23:12 Top