Xceed SmartUI for WinForms v3.6 Documentation
Using the SmartExplorerTaskPane SmartControl
Welcome to Xceed SmartUI for WinForms v3.6 > Basic Concepts > SmartControls > SmartExplorerTaskPane > Using the SmartExplorerTaskPane SmartControl

This topic demonstrates how to use the SmartExplorerTaskPane SmartControl using both the designer and code. The code is provided in a sequential order and can be cut and pasted into your application step-by-step.

Basic steps

To use the SmartExplorerTaskPane in your application, the following steps must be performed:

  1. Add the SmartExplorerTaskPane control to your form. 

If you would prefer to add the SmartExplorerTaskPane SmartControl to your form programmatically, the following code can be used:

using Xceed.SmartUI;

using Xceed.SmartUI.Controls.ExplorerTaskPane;

SmartExplorerTaskPane explorerPane = new SmartExplorerTaskPane();

this.Controls.Add( explorerPane );
  1. Double click on the New Group menu or click on the drop down arrow to add the desired number of Group SmartItems.

To each of these Group SmartItems, you can then added the desired number of Task SmartItems by selecting a group and double clicking on the New Task menu. 

If you want to add items other than Groups and Tasks, you can click on the drop down arrow and select the SmartItem to add. 

To add SmartItems programmatically to the SmartExplorerTaskPane, you can use the following code:

We will start by adding 2 Group SmartItems and then we will add 3 Task SmartItems to the first group. To the second group, we will add a ComboBoxTool SmartItem.

explorerPane.Items.Add( "First Group" );

explorerPane.Items.Add( "Second Group" );

( ( Xceed.SmartUI.Controls.ExplorerTaskPane.Group )explorerPane.Items[ 0 ] ).Expanded = true;

( ( Xceed.SmartUI.Controls.ExplorerTaskPane.Group )explorerPane.Items[ 1 ] ).Expanded = true;

explorerPane.Items[ 0 ].Items.Add( "Task One" );

explorerPane.Items[ 0 ].Items.Add( "Task Two" );

explorerPane.Items[ 0 ].Items.Add( "Task Three" );

explorerPane.Items[ 1 ].Items.Add( new ComboBoxTool( "Combo Tool" ) );
  1. Configure your SmartExplorerTaskPane.  You can decide if a Group SmartItem is expanded, enabled or visible and you can change its text, position within the list, etc. You can also configure various properties of each Task SmartItem.

In the following code, we will collapse the second Group SmartItem and move the last Task SmartItem in the first group to the first position:

( ( Xceed.SmartUI.Controls.ExplorerTaskPane.Group )explorerPane.Items[ 1 ] ).Expanded = false;

explorerPane.Items[ 0 ].Items[ explorerPane.Items[ 0 ].Items.Count - 1 ].Index = 0;
  1. The SmartExplorerTaskPane SmartControl also allows you to create "special" groups that do not have the same appearance as regular groups. This is done by setting the SpecialGroup property to true. 

When you run your application, you end up with an XP-style taskpane quite similar to the one found throughout Windows: 

Things you should consider