[Root] / Xceed.Document.NET Assembly / Xceed.Document.NET Namespace / TextColumnsPreset Enumeration
ExampleExample


In This Topic
    TextColumnsPreset Enumeration
    In This Topic
    Contains the options that determine how columns are arranged.
    Syntax
    'Declaration
     
    
    Public Enum TextColumnsPreset 
       Inherits System.Enum
    'Usage
     
    
    Dim instance As TextColumnsPreset
    public enum TextColumnsPreset : System.Enum 
    Members
    MemberValueDescription
    Custom6Creates a custom layout for the TextColumns.
    Default0Corresponds to the default number of columns set by Microsoft Word, which is 1.
    Left1Creates 2 columns; the leftmost one is 2 times bigger than the one at the right.
    One3Creates 1 column; this it the default option in Microsoft Word.
    Right2Creates 2 columns; the rightmost one is 2 times bigger than the one at the left.
    Three5Creates 3 equally sized columns.
    Two4Creates 2 equally sized columns.
    Example
    // Creates a Document.
    using( var document = DocX.Load( SectionSample.SectionSampleResourcesDirectory + @"TextColumnTextBase.docx" ) )
      {
    
        // Sets the TextColumns for the first section using the default preset.
        document.Sections[ 0 ].PageLayout.TextColumnPreset = TextColumnsPreset.Three;
    
        //Gets the preset.
        TextColumnPreset preset = document.Sections[ 0 ].PageLayout.TextColumnPreset
    
        //Reverts to the default preset.
        if ( preset != TextColumnPreset.Default )
           {
             document.Sections[ 0 ].PageLayout.TextColumnPreset = TextColumnsPreset.Default;
           }
    
      }
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             Xceed.Document.NET.TextColumnsPreset

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also