Explain how to dynamically add items to a menu in .NET.Following answer provides a very generalized idea of how this can be done:
- The first step would be locating the Assembly DLL. - An appropriate plug-in can be indicated by publishing an interface residing in the remote DLL. This is the second step. - Then, load the DLL using the LoadFrom method. - Validate plug-in status using reflections. - Create a new instance of the object in the class supporting your interface. - Then use the GetMenuItem method to have the class to return a MenuItem object. - And then add the MenuItem.
|