New Posts New Posts RSS Feed: Toolbars and menu
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Toolbars and menu

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Toolbars and menu
    Posted: 29-Dec-2007 at 12:20pm

How do I change the items in the Main Menu?  How do I add a toolbar to the are under the menu?

Back to Top
Bill Jensen View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Jul-2007
Location: United States
Posts: 229
Post Options Post Options   Quote Bill Jensen Quote  Post ReplyReply Direct Link To This Post Posted: 02-Jan-2008 at 12:53pm

In CAB, global extensions to the UI are handled by registering UIExtensionSites with the workitem.  I believe David Platt covers them in detail in his book.  If you don't have it, you should get it.  See my list of CAB resources in this thread:

 
In IdeaBlade.Cab, the shell layout views (defined in the Views\Layout folder of IdeaBlade.Cab.DotNet or IdeaBlade.Cab.DevEx in the CabanaLib solution) register the main menu bar using the constant UIExtensionSiteNames.MainMenu.   In the DevEx version, this is a "Bar" that can hold both menu items and widgets of various types.  In the DotNet version, it is a MenuBar.
 
For an example of extending the main menu, see the "Extend Menu" region of the SplashModuleController in the Cabana solution.  The code is commented out, but it shows the basic principles.
 
Neither shell layout version registers a separate tool bar as an extension site.  To do this, you'd need to make a copy of the appropriate ShellLayoutView in your Foundation module, change the namespace and add a tool bar and the code to register it (UIExtensionSiteNames already contains the constant "MainToolBar").  You'd then need to register YOUR shell layout view in place of the standard ShellLayoutView.  Do this in the ViewFactoryService (in your Foundation module) with something like:
 

// Register application-specific views here ...

// RegisterViewType<Views.MyViewType>(ViewNames.MyView);

UnregisterViewType(ViewNames.ShellLayout);

RegisterViewType<MyShellLayoutView>(ViewNames.ShellLayout);

UIExtensionSites work, but we feel they are one of the weaker areas of CAB and we have not incorporated many examples into Cabana.
 
Hope this helps a bit.
 
Bill Jensen
IdeaBlade
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down