Attaching C1ViewScroller to a Content Control

In order to use the C1ViewScroller control, you will need to specify which content control you want it to scroll through. To attach the C1ViewScroller control to a content control, you will have to set the ScrollTargetId property to the ID of the content control. This topic demonstrates how to attach the C1ViewScroller control to a C1NavigationList control in Design view and in Source view.

In Design View

Complete the following steps:

1.   Click the Design button to enter Design view.

2.   Navigate to the Toolbox and double-click the C1NavigationList icon to add the C1NavigationList control to your project. The default ID of the control is C1NavigationList1.

3.   Click the C1ViewScroller control to select it.

4.   In the Properties window, set the ScrollTargetId property to C1NavigationList1.

The C1ViewScroller control is now tied to the C1NavigationList control. Now you can add anchors to the view scroller and specify targets.

In Source View

To attach a C1ViewScroller control to a C1NavigationList control, complete steps 1 and 2 under "In Design View" and then add ScrollTargetID="C1NavigationList1" to the <C1ViewScroller> tag so that the markup resembles the following:

 

<C1ViewScroller:C1ViewScroller ID="C1ViewScroller1" runat="server"

ScrollTargetId="C1NavigationList1" >

In Code

Complete the following steps:

1.   Add the following code to the Page_Load event:

      Visual Studio

      C#

2.   Save the project and open it in a Studio for iPhone-compatible browser to execute the program.


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