static void CreateColumns(Document document) { #region #CreateColumns document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml); document.Unit = DevExpress.Office.DocumentUnit.Inch; // Get the first section in a document Section firstSection = document.Sections[0]; // Create columns and apply them to the document SectionColumnCollection sectionColumnsLayout = firstSection.Columns.CreateUniformColumns(firstSection.Page, 0.2f, 3); firstSection.Columns.SetColumns(sectionColumnsLayout); #endregion #CreateColumns }
static void CreateColumns(Document document) { #region #CreateColumns document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml); document.Unit = DevExpress.Office.DocumentUnit.Inch; // Get the first section in a document. Section firstSection = document.Sections[0]; // Create equal width column layout. SectionColumnCollection sectionColumnsLayout = firstSection.Columns.CreateUniformColumns(firstSection.Page, 0.2f, 3); // Set different column width. sectionColumnsLayout[0].Width = 3f; sectionColumnsLayout[1].Width = 2f; sectionColumnsLayout[2].Width = 1f; // Apply layout to the document. firstSection.Columns.SetColumns(sectionColumnsLayout); #endregion #CreateColumns }