I am writing a solution which means I have to create all of my docks programatically.
The problem I am coming across is creating the Commands in the TitleBar in the way I need them to look.
I have no problem creating custom commands and adding those (they appear on the right).
The only difference is that I require the DockExpandCollapseCommand on the left of the title.
I can add things to the TitlebarContainer but I'm not sure this is the right way to do things.
Ideally i want the layout:
[ CollapseCommand | Title CustomCommand1 | CustomCommand 2 ]
Thanks for your help!
The problem I am coming across is creating the Commands in the TitleBar in the way I need them to look.
I have no problem creating custom commands and adding those (they appear on the right).
The only difference is that I require the DockExpandCollapseCommand on the left of the title.
// I want this to be a command, not a hyperlink, but I can't add commands to the controls collection HyperLink hl = new HyperLink(); |
hl.NavigateUrl = "/url.aspx"; |
hl.Text = "CollapseCommand"; |
tempDock.TitlebarContainer.Controls.Add(hl); |
// Title |
Label lbl = new Label(); |
lbl.Text = tempDock.Title; |
tempDock.TitlebarContainer.Controls.Add(lbl); |
// Create a command for the "Edit" button |
DockCommand cmd = new DockCommand(); |
cmd.Name = "cmdHelp"; |
cmd.AutoPostBack = false; |
cmd.CssClass = "helpButton"; |
cmd.Text = "Help"; |
tempDock.Commands.Add(cmd); |
I can add things to the TitlebarContainer but I'm not sure this is the right way to do things.
Ideally i want the layout:
[ CollapseCommand | Title CustomCommand1 | CustomCommand 2 ]
Thanks for your help!