Is it possible to access ComponentResourceManager resources in AddinModule?

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

Is it possible to access ComponentResourceManager resources in AddinModule?
 
developer_cp




Posts: 48
Joined: 2016-10-28
In the InitializeComponent() function, I see that it gets the resources and then it does a ApplyResources on all the ADX components that was crated and bind them with a look up string.


Basically we have the inspector ribbon defined in the AddinModule's designer, and right now we have a static function in AddinModule to modify anything related to that ribbon. However I don't like that approach, is there a way to gain access to that AddinModule resources from another class?

I've tried to do it like this, but it won't return me the button.


ComponentResourceManager resources = new ComponentResourceManager(typeof(AddinModule));
ADXRibbonButton btn = resources.GetObject("InspectorButton1") as ADXRibbonButton;


What's the right way to do it?
Posted 17 Nov, 2016 16:34:07 Top
Andrei Smolin


Add-in Express team


Posts: 14129
Joined: 2006-05-11
Hello Eric,

With Ribbon controls, you can only use this approach when the controls are being created.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Nov, 2016 07:14:52 Top