The toolbar at the beginning of this article can be created with the following piece of code:
Toolbar Example |
Copy Code
|
---|---|
NToolBar toolbar = new NToolBar(); toolbar.Items.Add(new NButton("Button 1")); toolbar.Items.Add(new NButton("Button 2")); toolbar.Items.Add(new NCommandBarSeparator()); toolbar.Items.Add(new NButton("Button 3")); NComboBox comboBox = new NComboBox(); comboBox.Items.Add(new NComboBoxItem("Item 1")); comboBox.Items.Add(new NComboBoxItem("Item 2")); comboBox.Items.Add(new NComboBoxItem("Item 3")); comboBox.SelectedIndex = 0; toolbar.Items.Add(comboBox); |