Back to DOM
TabClass
Definition
- Namespace
- DOM.Styles
- Assembly
- DOM.dll
Represents a single tab stop definition for paragraph layout.
Remarks
describes the position, alignment and leader character used when a tab character is rendered within a paragraph. Instances are typically stored in a paragraph style's tab collection and consulted by the layout engine when calculating tab stops and rendering tab leaders. Tab Tab stops are collected on . Tabs
Examples
csharp
1// 1. Left-aligned tab stop at 1 inch
2var tab = new Tab
3{
4 Position = new DocumentUnit(1.0, Units.inch),
5 TabStopType = TabStopValues.left
6};
7
csharp
1// 2. Right-aligned tab stop with leader dots (table of contents)
2var tab = new Tab
3{
4 Position = new DocumentUnit(6.0, Units.inch),
5 TabStopType = TabStopValues.right,
6 Leader = TabStopLeaderCharValues.dot
7};
8
csharp
1// 3. Decimal-aligned tab stop for numeric columns
2var tab = new Tab
3{
4 Position = new DocumentUnit(3.5, Units.inch),
5 TabStopType = TabStopValues.Decimal
6};
7
csharp
1// 4. Center-aligned tab stop with underscore leader
2var tab = new Tab
3{
4 Position = new DocumentUnit(2.0, Units.inch),
5 TabStopType = TabStopValues.center,
6 Leader = TabStopLeaderCharValues.underscore
7};
8
csharp
1// 5. Multiple tab stops in a paragraph style
2var style = new ParagraphStyle
3{
4 Tabs = new List<Tab>
5 {
6 new Tab { Position = new DocumentUnit(1.0, Units.inch), TabStopType = TabStopValues.left },
7 new Tab { Position = new DocumentUnit(3.0, Units.inch), TabStopType = TabStopValues.center },
8 new Tab { Position = new DocumentUnit(5.0, Units.inch), TabStopType = TabStopValues.right,
9 Leader = TabStopLeaderCharValues.dot }
10 }
11};
12
Properties
LeaderTabStopLeaderCharValues
Gets or sets the leader character used to fill the space between the text and the tab stop.
PositionDocumentUnit
Gets or sets the absolute position of the tab stop measured from the paragraph start.
TabStopTypeTabStopValues
Gets or sets the tab stop alignment/behaviour.