Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RowFormat.TablePositioning

    Show / Hide Table of Contents

    Class RowFormat.TablePositioning

    Represents the functionalities to absolute position a table when it has text wrap type as around.

    Inheritance
    System.Object
    OwnerHolder
    XDLSSerializableBase
    FormatBase
    RowFormat.TablePositioning
    Implements
    IXDLSSerializable
    Inherited Members
    FormatBase.m_propertiesHash
    FormatBase.m_oldPropertiesHash
    FormatBase.ImportContainer(FormatBase)
    FormatBase.ImportMembers(FormatBase)
    FormatBase.HasKey(Int32)
    FormatBase.HasBoolKey(Int32)
    FormatBase.ClearFormatting()
    FormatBase.GetDefComposite(Int32)
    FormatBase.OnChange(FormatBase, Int32)
    FormatBase.EnsureComposites()
    FormatBase.EnsureComposites(Int32[])
    FormatBase.GetBaseKey(Int32)
    FormatBase.GetFullKey(Int32)
    FormatBase.GetDefComposite(Int32, FormatBase)
    FormatBase.Item[Int32]
    XDLSSerializableBase.IXDLSSerializable.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.IXDLSSerializable.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.IXDLSSerializable.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.IXDLSSerializable.RestoreReference(String, Int32)
    XDLSSerializableBase.CloneImpl()
    XDLSSerializableBase.WriteXmlAttributes(IXDLSAttributeWriter)
    XDLSSerializableBase.WriteXmlContent(IXDLSContentWriter)
    XDLSSerializableBase.ReadXmlAttributes(IXDLSAttributeReader)
    XDLSSerializableBase.ReadXmlContent(IXDLSContentReader)
    XDLSSerializableBase.InitXDLSHolder()
    XDLSSerializableBase.RestoreReference(String, Int32)
    XDLSSerializableBase.IXDLSSerializable.XDLSHolder
    XDLSSerializableBase.XDLSHolder
    OwnerHolder.m_doc
    OwnerHolder.Document
    Namespace: Syncfusion.DocIO.DLS
    Assembly: Syncfusion.DocIO.Portable.dll
    Syntax
    public class TablePositioning : FormatBase, IXDLSSerializable
    Examples

    The following code example demonstrates how to set the absolute position to a table in the document.

    private void Button1_Click(System.Object sender, System.EventArgs e)
    {
        //Create an instance of WordDocument class (Empty Word Document)
        WordDocument document = new WordDocument();
        //Open an existing Word document into DocIO instance
        document.Open("Table.docx", FormatType.Docx);
        //Access the instance of the first section in the Word document
        WSection section = document.Sections[0];
        //Access the instance of the first table in the section
        WTable table = section.Tables[0] as WTable;
        //Specify the table positioning options
        table.TableFormat.Positioning.HorizPositionAbs = HorizontalPosition.Right;
        table.TableFormat.Positioning.HorizRelationTo = HorizontalRelation.Margin;
        table.TableFormat.Positioning.VertPositionAbs = VerticalPosition.Center;
        table.TableFormat.Positioning.VertRelationTo = VerticalRelation.Page;
        table.TableFormat.Positioning.DistanceFromBottom = 10;
        table.TableFormat.Positioning.DistanceFromLeft = 10;
        table.TableFormat.Positioning.DistanceFromRight = 10;
        table.TableFormat.Positioning.DistanceFromTop = 10;
        //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 an instance of WordDocument class (Empty Word Document)
        Dim document As New WordDocument()
        'Open an existing Word document into DocIO instance
        document.Open("Table.docx", FormatType.Docx)
        'Access the instance of the first section in the Word document
        Dim section As WSection = document.Sections(0)
        'Access the instance of the first table in the section
        Dim table As WTable = TryCast(section.Tables(0), WTable)
        'Specify the table positioning options
        table.TableFormat.Positioning.HorizPositionAbs = HorizontalPosition.Right
        table.TableFormat.Positioning.HorizRelationTo = HorizontalRelation.Margin
        table.TableFormat.Positioning.VertPositionAbs = VerticalPosition.Center
        table.TableFormat.Positioning.VertRelationTo = VerticalRelation.Page
        table.TableFormat.Positioning.DistanceFromBottom = 10
        table.TableFormat.Positioning.DistanceFromLeft = 10
        table.TableFormat.Positioning.DistanceFromRight = 10
        table.TableFormat.Positioning.DistanceFromTop = 10
        'Save and close the Word document instance
        document.Save("Sample.docx", FormatType.Docx)
        document.Close()
    End Sub

    Properties

    DistanceFromBottom

    Gets or sets the distance between the table and the text below the table.

    Declaration
    public float DistanceFromBottom { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the distance from the bottom.

    DistanceFromLeft

    Gets or sets the distance between the table and the text to the left of table.

    Declaration
    public float DistanceFromLeft { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the distance from the left.

    DistanceFromRight

    Gets or sets the distance between the table and the text to the right of table.

    Declaration
    public float DistanceFromRight { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the distance from the right.

    DistanceFromTop

    Gets or sets the distance between the table and the text above the table .

    Declaration
    public float DistanceFromTop { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the distance from the top.

    HorizPosition

    Gets or sets the horizontal position for the table.

    Declaration
    public float HorizPosition { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the vertical position.

    HorizPositionAbs

    Gets or sets the absolute horizontal position for the table.

    Declaration
    public HorizontalPosition HorizPositionAbs { get; set; }
    Property Value
    Type Description
    HorizontalPosition

    The HorizontalPosition member that specifies the position.

    HorizRelationTo

    Gets or sets the horizontal relation of the table.

    Declaration
    public HorizontalRelation HorizRelationTo { get; set; }
    Property Value
    Type Description
    HorizontalRelation

    VertPosition

    Gets or sets the vertical position for the table.

    Declaration
    public float VertPosition { get; set; }
    Property Value
    Type Description
    System.Single

    The float that specifies the vertical position.

    VertPositionAbs

    Gets or sets the absolute vertical position for the table.

    Declaration
    public VerticalPosition VertPositionAbs { get; set; }
    Property Value
    Type Description
    VerticalPosition

    The VerticalPosition member that specifies the position.

    VertRelationTo

    Gets or sets the vertical relation of the table.

    Declaration
    public VerticalRelation VertRelationTo { get; set; }
    Property Value
    Type Description
    VerticalRelation

    Methods

    GetDefValue(Int32)

    Returns the default values.

    Declaration
    protected override object GetDefValue(int key)
    Parameters
    Type Name Description
    System.Int32 key

    The integer that specifies the key.

    Returns
    Type Description
    System.Object

    An object that specifies the default value.

    Overrides
    FormatBase.GetDefValue(Int32)

    Implements

    IXDLSSerializable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved