Adding Launch Items to the C1LaunchPad Toolbar

The following topic illustrates how to add items to the toolbar area of a C1LaunchPad control in the designer, in Design view, in Source view, and in code. This topic assumes that you have created an AJAX-enabled ASP.NET project that contains a ScriptManager control (see Creating an AJAX-Enabled ASP.NET Project) and a C1LaunchPad control.

In Design View

Complete the following steps:

1.   Add an image to your project by completing the following steps:

a.   In Solution Explorer, right-click the project's name to open its context menu and select New Folder. Name this folder "Images".

b.   Right-click the Images folder and select Add Existing Item from the context menu.

 

 

The Add New Item dialog box appears.

c.    Navigate to the location of the Studio for iPhone sample (C:\Program Files\ComponentOne Studio for iPhone/Samples/quickstart) and open the Images folder.

d.   In the Images folder, select mail_57x57.png and then click Add.

e.   The graphic mail_57x57.png is added to the Images folder.

2.   Click C1LaunchPad's smart tag () to open the C1LaunchPad Tasks menu and select C1LaunchPad Designer.

      The C1LaunchPad Designer Form opens.

3.   With ToolbarItems selected in treeview, click the Add Child Item drop-down arrow, and select LaunchPadItem.

 

 

 

C1LaunchPadItem01 is added to the project.

4.   In treeview, select C1LaunchPadItem01 and set the following properties:

      Set the Text property to "New Item".

      Set the ImageUrl property to "Images/mail_57x57.png".

5.   Click OK to close the C1LaunchPad Designer Form.

6.   Save the project and open it in a Studio for iPhone-compatible browser.

In Source View

Complete the following steps:

1.   Complete step 1 under "Adding Launch Items in Design View" to add an image to the project.

2.   Click the Source tag to enter Source view and then place the following XHTML between the <cc1:C1LaunchPage> tags: 

    <ToolBarItems>

         <cc1:C1LaunchPadItem runat="server" ID="LaunchItem" Text="New Item" ImageUrl="mail_57x57.png" />

    </ToolBarItems>

3.   Save the project and open it in a Studio for iPhone-compatible browser.

In Code

Complete the following steps:

1.   Complete step 1 under "Adding Launch Items in Design View" to add an image to the project.

2.   Double-click the project to enter Code view.

3.   Import the following namespace into your project:

      Visual Basic

      C#

4.   Create the launch item object by adding the following code to the Page_Load event:

      Visual Basic

      C#

5.   Set the Text and ImageUrl properties of the new launch item by adding the following code to the Page_Load event:

      Visual Basic

      C#

6.   Add the new launch item to the C1LaunchPage by adding the following code to the Page_Load event:

      Visual Basic

      C#

7.   Save the project and open it in a Studio for iPhone-compatible browser.

 This Topic Illustrates the Following:

The following image shows the C1LaunchPadItem that you added to the toolbar area of the C1LaunchPad control:

 


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.