How to create a navigation button for display a plugin

Forum Forums Visual Components 4.1 .NET Addon Programming How to create a navigation button for display a plugin

This topic contains 3 replies, has 2 voices, and was last updated by Avatar GoodL 4 days, 11 hours ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18821
    Avatar
    GoodL
    Participant

    I know how to create a navigation and program a plugin, but I don’t know how to bind the button of navigation and the plugin, I want to realize a click event to display a plugin or not.

    #18833
    Jay
    Jay
    Moderator

    Use ActionItem AttachTo property in the ActionItem constructor. For example

    [Export(typeof(IPlugin))]
    [Export(typeof(IActionItem))]
    public class Class1 : ActionItem, IPlugin
    {
    public Class1() : base(“actionItemid”, “action item command”, “rCommand”, null, MenuTools.ButtonTool, false, true)
    {
    AttachTo = “[Shortcut Control + F2] = [Action Execute]; [Event Click] = [Action Execute]”;
    }

    }

     

    #18923
    Avatar
    GoodL
    Participant

    I build a tab and a plugin.

    When I open VC, the plugin always open. I want to stop the opening of the plugin and open by clicking the button.

    Attachments:
    You must be logged in to view attached files.
    #19004
    Avatar
    GoodL
    Participant

    I have solved this question by setting IsVisible false in IPlugin, it also works in IActionItem.

    However, if I don’t set false in IPlugin, it can’t be changed in IActionItem, may be it is a problem.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.