Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi How can I add a tool bar in tool bar tray programmatically?
C#
ToolBarTray tray = new ToolBarTray { Orientation = Orientation.Vertical };
ToolBar toolbar = new ToolBar() { Width = double.NaN, Height = double.NaN};
          
Button btnViewDetails = new Button() { Width = 200, Height = 30, Content = "View Details" };
Button btnAddModule = new Button() { Width = 200, Height = 30, Content = "Add Module" };
Button btnRemoveModule = new Button() { Width = 200, Height = 30, Content = "Remove Module" };
Button btnSendCommunication = new Button() { Width = 200, Height = 30, Content = "Send Communication" };

toolbar.Items.Add(btnViewDetails);
toolbar.Items.Add(btnAddModule);
toolbar.Items.Add(btnRemoveModule);
toolbar.Items.Add(btnSendCommunication);
toolbar.Band = 0;

//adding toolbar into tray
Posted
Updated 2-Feb-13 6:21am
v5

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900