Author Topic: How to add an option in the "ToolbarHamburgerButtonRegion" IW-8.5  (Read 4058 times)

Offline shahzeb

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
My question is valid for IW-8.5 where all the Workstation tabs are now shown as a dropdown menu in the "ToolbarHamburgerButtonRegion"

I have programmed a custom view (Tab) being shown in the "ToolbarWorkplaceRegion" (see code below). What i am not sure of is to how to add an option in the ToolbarHamburgerButtonRegion's drop down menu, which targets my new tab and opens it when the option is clicked, same as when we click the "My Channels" and "My statistics".

viewManager.ViewsByRegionName["ToolbarWorkplaceRegion"].Add(new ViewActivator
            {
                ViewType = typeof(IWFMPluginView),
                ViewName = "WFMPluginView",
                Condition = WFMPlugin_Condition,
                ActivateView = true
                //DynamicOnly = true
            });

How to add an option "WFM-plugin" in the dropdown menu in the "ToolbarHamburgerButtonRegion" ??

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: How to add an option in the "ToolbarHamburgerButtonRegion" IW-8.5
« Reply #1 on: May 08, 2015, 02:32:02 PM »
Hi,

Have a look at the provided sample code ExtensionSample

And just replace

[code]viewManager.ViewsByRegionName["WorkspaceMenuRegion"].Insert(0,
new ViewActivator() { ViewType = typeof(IMySampleMenuView), ViewName = "MySampleMenu", ActivateView = true });
[/code]

[code]viewManager.ViewsByRegionName["ToolbarHamburgerButtonRegion"].Insert(0,
new ViewActivator() { ViewType = typeof(IMySampleMenuView), ViewName = "MySampleMenu", ActivateView = true });[/code]

Although the old 8.1 'WorkspaceMenuRegion' seems to work as well


[code] ///////////////////////
// GUI customization case 2
// Add a view in the workspace in the main tool bar

// Here we register the view (GUI) "IMySampleView" and its behavior counterpart "IMySamplePresentationModel"
container.RegisterType<IMyExtensionSampleView, MySampleView>();
container.RegisterType<IMyExtensionSampleViewModel, MySampleViewModel>();

// Put the MySample view in the region "ToolbarWorkplaceRegion" (The TabControl in the main toolbar)
viewManager.ViewsByRegionName["ToolbarWorkplaceRegion"].Insert(0,
new ViewActivator() { ViewType = typeof(IMyExtensionSampleView), ViewName = "MySample" });

// Here we register the view (GUI) "IMySampleMenuView"
container.RegisterType<IMySampleMenuView, MySampleMenuView>();

// Put the MySampleMenuView view in the region "ToolbarHamburgerButtonRegion" (The Workspace Hamburger Button)
viewManager.ViewsByRegionName["ToolbarHamburgerButtonRegion"].Insert(0,
new ViewActivator() { ViewType = typeof(IMySampleMenuView), ViewName = "MySampleMenu", ActivateView = true });[/code]

Offline shahzeb

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: How to add an option in the "ToolbarHamburgerButtonRegion" IW-8.5
« Reply #2 on: May 15, 2015, 09:56:46 AM »
Thanks mate, i saw the samples after i had posted the question here in the forum :(
But thanks for the help and replying anyways.


Offline germanjuarez

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: How to add an option in the "ToolbarHamburgerButtonRegion" IW-8.5
« Reply #3 on: December 05, 2017, 02:50:59 PM »
Thanks PeteHoyle, it was useful!!!