Class Tab
Represents the tabs in the document.
Implements
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Portable.dll
Syntax
public class Tab : XDLSSerializableBase, IXDLSSerializable
Examples
The following code example demonstrates how to modify the existing tab values in the document.
private void Button1_Click(System.Object sender, System.EventArgs e)
{
//Create a new Word document
WordDocument document = new WordDocument("Template.docx");
//Add the section into Word document
WSection section = document.AddSection() as WSection;
//Access the first paragraph of the document
WParagraph paragraph = document.Sections[0].Paragraphs[0];
//Get the first tab from the paragraph
Tab tab = paragraph.ParagraphFormat.Tabs[0];
//Adjust the tab values
tab.Justification = TabJustification.Centered;
tab.Position = 200;
tab.TabLeader = Syncfusion.DocIO.DLS.TabLeader.Dotted;
//Save and close the Word document instance
document.Save("Sample.docx", FormatType.Docx);
document.Close();
}
Private Sub button_Click(sender As Object, e As EventArgs)
'Create a new Word document
Dim document As New WordDocument("Template.docx")
'Add the section into Word document
Dim section As WSection = TryCast(document.AddSection(), WSection)
'Access the first paragraph of the document
Dim paragraph As WParagraph = document.Sections(0).Paragraphs(0)
'Get the first tab from the paragraph
Dim tab As Tab = paragraph.ParagraphFormat.Tabs(0)
'Adjust the tab values
tab.Justification = TabJustification.Centered
tab.Position = 200
tab.TabLeader = Syncfusion.DocIO.DLS.TabLeader.Dotted
'Save and close the Word document instance
document.Save("Sample.docx", FormatType.Docx)
document.Close()
End Sub
Properties
DeletePosition
Gets or sets the delete position for the tab measured in points.
Declaration
public float DeletePosition { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The float that specifies the delete position. |
Item[Int32]
Gets or sets the key in property collection.
Declaration
protected object this[int key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | key | The integer that specifies the key. |
Property Value
Type | Description |
---|---|
System.Object | An object that specifies the key. |
Justification
Gets or sets the TabJustification.
Declaration
public TabJustification Justification { get; set; }
Property Value
Type | Description |
---|---|
TabJustification | The TabJustification member that specifies the tab justification of this Tab. |
Position
Gets or sets the position of the tab measured in points.
Declaration
public float Position { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The float that specifies the position of tab. |
TabLeader
Gets or sets the TabLeader.
Declaration
public TabLeader TabLeader { get; set; }
Property Value
Type | Description |
---|---|
TabLeader | The TabLeader member that specifies the tab leader. |
Methods
ReadXmlAttributes(IXDLSAttributeReader)
Reads object data from xml attributes.
Declaration
protected override void ReadXmlAttributes(IXDLSAttributeReader reader)
Parameters
Type | Name | Description |
---|---|---|
IXDLSAttributeReader | reader | The IXDLSAttributeReader object. |
Overrides
WriteXmlAttributes(IXDLSAttributeWriter)
Writes object data as xml attributes.
Declaration
protected override void WriteXmlAttributes(IXDLSAttributeWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IXDLSAttributeWriter | writer | The IXDLSAttributeWriter object. |