![]() |
System Button Popup: Possible Now or Later? |
Post Reply
|
| Author | |
apuhjee
Senior Member
Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
Post Options
Thanks(0)
Quote Reply
Topic: System Button Popup: Possible Now or Later?Posted: 14 June 2007 at 1:52pm |
|
|
![]() |
|
apuhjee
Senior Member
Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 June 2007 at 2:08pm |
|
Nevermind. It appears that you forgot to include this in the C# sample.
Codejock: Could you please post the C# code necessary to perform the same functionality as the VB sample? Thanks.
jp
|
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 June 2007 at 4:26pm |
|
Hi Jason, this should be enought to get you started:
XtremeCommandBars.RibbonBar RibbonBar = null; RibbonBar = CommandBars.AddRibbonBar("The Ribbon"); RibbonBar.EnableDocking(XtremeCommandBars.XTPToolBarFlags.xtpFlagStretched); XtremeCommandBars.CommandBarPopup ControlFile = null; XtremeCommandBars.CommandBarPopup ControlTheme = null; XtremeCommandBars.CommandBarControl ControlAbout = null; XtremeCommandBars.CommandBar PopupBar = null; ControlFile = RibbonBar.AddSystemButton(); ControlFile.IconId = ID.ID_SYSTEM_ICON; ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_NEW, "&New", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_OPEN, "&Open...", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SAVE, "&Save", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SAVE_AS, "Save &As...", false, false); ControlPopup = (XtremeCommandBars.CommandBarPopup)ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlSplitButtonPopup, ID.ID_FILE_PRINT, "&Print", false, false); ControlPopup.BeginGroup = true; PopupBar = CommandBars.CreateCommandBar("CXTPRibbonSystemPopupBarPage"); ControlPopup.CommandBar = PopupBar; Control = PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlLabel, 0, "Preview and print the document", false, false); Control.Width = 296; Control.DefaultItem = true; Control.Style = XtremeCommandBars.XTPButtonStyle.xtpButtonCaption; PopupBar.DefaultButtonStyle = XtremeCommandBars.XTPButtonStyle.xtpButtonCaptionAndDescription; PopupBar.SetIconSize(32, 32); PopupBar.ShowGripper = false; PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT, "Print Pre&view", false, false); PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT_SETUP, "Pr&int Setup...", false, false); PopupBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PRINT_PREVIEW, "Print Pre&view", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PREPARE, "Prepare", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_SEND, "Send", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_PREPARE, "Publish", false, false); ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_CLOSE, "Close", false, false); Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarListCaption"); Control.Caption = "Recent Documents"; Control.BeginGroup = true; ControlFile.CommandBar.Controls.AddControl(Control, -1); Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_MRU_FILE1, "Recent File", false, false); Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton"); Control.Caption = "Options"; Control.Id = ID.ID_FILE_OPTIONS; ControlFile.CommandBar.Controls.AddControl(Control, -1); Control = CommandBars.CreateCommandBarControl("CXTPRibbonControlSystemPopupBarButton"); Control.Caption = "Exit Sample"; Control.Id = ID.ID_APP_EXIT; ControlFile.CommandBar.Controls.AddControl(Control, -1); ControlFile.CommandBar.SetIconSize(32, 32); |
|
![]() |
|
apuhjee
Senior Member
Joined: 02 September 2005 Location: United States Status: Offline Points: 130 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 June 2007 at 5:49pm |
|
Thanks Mike. Worked perfectly.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |