ComponentOne TabControl for ASP.NET AJAX: TabControl for ASP.NET AJAX Task-Based Help > Customizing the Appearance of a C1TabControl > Setting the Vertical Tabstrip Alignment

Setting the Vertical Tabstrip Alignment

When the tabstrip of a C1TabControl is vertical, it can be aligned in four positions. This topic illustrates how to set the alignment of a C1TabControl's vertical tabstrip in Design view, in Source view, and in code.

In Design View

Complete the following steps:

1.   Click C1TabControl's smart tag () to open the C1TabControl Tasks menu and select TabControl Designer.

The C1TabControl Designer Form appears.

2.   In treeview, select C1TabControl1 to reveal its list of properties and then set the following properties:

      Set the Direction property to Left.

      Set the Alignment property to Left, Right, Center, or Justify. For this example, select Center.

3.   Press OK and observe that the alignment of your tabstrip is now set to your specification.

Setting the Alignment of a Vertical C1TabControl in Source View

To change the alignment of your vertical C1TabControl in Source view, add Alignment="Center" to the <cc1:C1TabControl> tag. The following XHTML aligns C1TabControl on the center of the page:

 

<cc1:C1TabControl ID="C1TabControl1" runat="server" Direction="Left" Alignment="Center">

In Code

Complete the following steps:

1.   Import the following namespace to your program:

      Visual Basic

Imports C1.Web.UI.Controls

      C#

using C1.Web.UI.Controls;

2.   Add the following code to the Page_Load event to set the TabAlignment property to Center:

      Visual Basic

Me.C1TabControl1.Alignment = TabAlignment.Center

      C#

this.C1TabControl1.Alignment = TabAlignment.Center;

3.   Run the program.


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