ComponentOne TabControl for ASP.NET AJAX: TabControl for ASP.NET AJAX Task-Based Help > Adding and Manipulating Page Content > Changing the Alignment of a C1TabPage's Content

Changing the Alignment of a C1TabPage's Content

By default, the default position of content on a C1TabPage page is left to right. In this topic, you will learn how to change the position of text from right to left using the Direction property.

In Design View

Complete the following steps:

1.   Click the smart tag to open the C1TabControl Tasks menu and select C1TabControl Designer.

The C1TabControl Designer Form opens.

2.   Use the Add Child Item button  to add a page to the C1TabControl control.

3.   In the treeview, select C1TabPage1 to reveal its list of properties.

4.   Locate the Direction property and select RightToLeft from its drop-down list.

5.   Press OK to leave the C1TabControl Designer Form.

6.   Enter text into the C1TabControl page. Observe that the text aligns to the right of the page.

In Source View

To change the alignment of text in a page view, add Direction="RightToLeft" to the <cc1:C1TabPage> tab. Your XHTML should resemble the following:

 

<cc1:C1TabPage ID="C1TabPage1" runat="server" Direction="RightToLeft">

In Code

Complete these steps:

1.   Import the following namespace to your project:

      Visual Basic

Imports C1.Web.UI.Controls.C1TabControl

      C#

using C1.Web.UI.Controls.C1TabControl;

2.   Add the following code to the Page_Load event:

      Visual Basic

My.C1TabPage1.Direction = ContentDirection.RightToLeft

      C#

this.C1TabPage1.Direction = ContentDirection.RightToLeft;

3.   Run the program.


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