ComponentOne TabStrip for ASP.NET AJAX: TabStrip for ASP.NET AJAX Task-Based Help > Customizing the Appearance of a C1TabStrip > Setting the Alignment of a Horizontal C1TabStrip

Setting the Alignment of a Horizontal C1TabStrip

A horizontal C1TabStrip control can be aligned in four positions: left, right, center, and justified. This topic illustrates how to set the alignment of horizontal tabstrip in Design view, Source view, and in code.

In Design View

Complete the following steps:

1.   Click C1TabStrip's smart tag () to open the C1TabStrip Tasks menu and then select TabStrip Designer.

      The C1TabStrip Designer Form appears.

2.   In treeview, select C1TabStrip1 to reveal its list of properties.

3.   Locate the Alignment property, click its drop-down arrow, and select an option from the list. For this example, select Center.

4.   Press OK and observe that the alignment of your tabstrip is now set to the center of the control.

In Source View

To change the alignment of the C1TabStrip control in Source view, add  Alignment="Center" to the <cc1:C1TabStrip> tag. The following HTML aligns C1TabStrip control on the center of the page:

 

<cc1:C1TabStrip ID="C1TabStrip1" runat="server" VisualStyle="Office2007Blue" VisualStylePath="~/C1WebControls/VisualStyles" Alignment="Center" Width="553px">

In Code

Complete the following steps:

1.   Import the following namespace into your project:

      Visual Basic

Imports C1.Web.UI.Controls

      C#

using C1.Web.UI.Controls;

2.   Add the following code to the Page_Load event:

      Visual Basic

C1TabStrip1.Alignment = TabAlignment.Center

      C#

C1TabStrip1.Alignment = TabAlignment.Center;

3.   Run the program.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.