New Posts New Posts RSS Feed: Adding to main menu?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Adding to main menu?

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: Adding to main menu?
    Posted: 24-Sep-2007 at 10:37am
How do you add menu items to the main 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: 01-Oct-2007 at 5:03pm
Hi Dan,
 
Welcome back.
 
The main menu is defined in the DevExShellLayoutView or DotNetShellLsyoutView (in their respective IdeaBlade.Cab assemblies) and is registered with the root workitem as a UIExtension site in the view's RegisterUIExtensionSites() method. 
Examples of adding items to the main menu may be found in:
 
DevExShellLayoutViewPresenter (read UIElementBuilider for an example of reading menu information from App.config)
 
and
 
DotNetShellLayoutViewPresenter (examples of adding menu items at several registered UIExtensionSites.
 
Does this help?
 
BillJ
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2007 at 11:13am
Kind of. I see you can add them. But how do you envoke their controls/forms.
 
If the do pop up forms can they be done in any way? Can we have the forms added to the Workspace?
 
Also, where is the Skins I can't find them in the app.config. So I don't know where they are implmented. I really want to just choose one.
 
 
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2007 at 11:15am
I see the BonusSkins.Register. But how do I just do one of them.
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: 04-Oct-2007 at 10:25am
But how do you envoke their controls/forms.
 
Attach a handler to the command object invoked by the menu item.  It turns out that the CAB framework provides an attribute that accomplishes this, as in this example from FoundationModule.cs:
 

/// <summary>Called when the user asks to show the Help | About.</summary>

[CommandHandler(CommandNames.HelpAbout)]

public void OnHelpAbout(object sender, EventArgs e) {

ShowHelpAbout();

}

If the do pop up forms can they be done in any way? Can we have the forms added to the Workspace?
 
See my discussion with Mykel in the thread "Displaying Forms Modally".
 
I see the BonusSkins.Register. But how do I just do one of them.
 
I'm not sure I understand the question.  I'm not an expert on DevEx, but the bonus skins are registered in ShellApplication.cs.  Then, in DevExShwllLayoutViewPresenter.cs, a new instance of SkinMenu is added to the main menu UIExtensionSite.  The SkinMenu handles selection of skins (without the use of the command pattern).
 
Bill J.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2007 at 10:29am
I do not wish to have the skin menu. I want to choose just one skin. Setting the skin at the shell does not seem to work.
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: 04-Oct-2007 at 10:43am
Well, it looks to me like you need to be sure the bonus skins are registered, then call

UserLookAndFeel.Default.SetSkinStyle(skinName);

Is this what you're doing?

Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2007 at 10:51am
I have tried setting the look and feel on the shell as well as the DevExShellLayout and it hasn't worked.
 
Where do you suggest putting this.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2007 at 11:12am
Nevermind. Got it. I had to add the ShellViewPresenter to my project. Then I add the UserLookAndFeel to that.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down