Back to Devexpress

Table.PreferredWidthType Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-table-241a16c8.md

latest4.9 KB
Original Source

Table.PreferredWidthType Property

Gets or sets how the width of a table is determined if Preferred Width is specified.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
WidthType PreferredWidthType { get; set; }
vb
Property PreferredWidthType As WidthType

Property Value

TypeDescription
WidthType

A WidthType enumeration value specifying how the Table.PreferredWidth is interpreted.

|

Available values:

NameDescription
None

Not set.

| | Auto |

Automatically determined width.

| | FiftiethsOfPercent |

Width in fiftieths of a percent.

| | Fixed |

Width in units of measurements that are currently in effect for the document.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the PreferredWidthType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Table.cs#L56

csharp
table.TableLayout = TableLayoutType.Fixed;
table.PreferredWidthType = WidthType.Fixed;
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4f);

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/TableActions.cs#L60

csharp
table.TableLayout = TableLayoutType.Fixed;
table.PreferredWidthType = WidthType.Fixed;
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4f);

word-document-api-examples/CS/CodeExamples/TablesActions.cs#L89

csharp
table.TableLayout = TableLayoutType.Fixed;
table.PreferredWidthType = WidthType.Fixed;
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4f);

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Table.vb#L49

vb
table.TableLayout = DevExpress.XtraRichEdit.API.Native.TableLayoutType.Fixed
table.PreferredWidthType = DevExpress.XtraRichEdit.API.Native.WidthType.Fixed
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4F)

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/TableActions.vb#L51

vb
table.TableLayout = TableLayoutType.Fixed
table.PreferredWidthType = WidthType.Fixed
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4F)

word-document-api-examples/VB/CodeExamples/TablesActions.vb#L83

vb
table.TableLayout = DevExpress.XtraRichEdit.API.Native.TableLayoutType.Fixed
table.PreferredWidthType = DevExpress.XtraRichEdit.API.Native.WidthType.Fixed
table.PreferredWidth = DevExpress.Office.Utils.Units.InchesToDocumentsF(4.0F)

See Also

SetPreferredWidth(Single, WidthType)

Table Interface

Table Members

DevExpress.XtraRichEdit.API.Native Namespace