Setting the Horizontal Tabstrip Alignment
When the tabstrip of a C1TabControl is horizontal (either Top or Bottom), it can be aligned in four positions. This topic illustrates how to set the alignment of a C1TabControl's horizontal 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.
3. Locate the Alignment property, click its drop-down arrow, and select an option from the list. For this example, choose Center.
4. Press OK and observe that the alignment of your tabstrip is now set to your specification.
In Source View
To change the alignment of your 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" VisualStyle="Office2007Blue"
VisualStylePath="~/C1WebControls/VisualStyles" Alignment="Center" Width="553px">
In Code
Complete the following steps:
1. Import the following namespace to your program:
Imports C1.Web.UI.Controls
• C#
using C1.Web.UI.Controls;
2. Add the following code to the Page_Load event to set the Alignment property to Center:
Me.C1TabControl1.Alignment = TabAlignment.Center
• C#
this.C1TabControl1.Alignment = TabAlignment.Center;
3. Run the program.
|