This documentation is archived and is not being maintained.

FlowDocument.IsColumnWidthFlexible Property

Gets or sets a value that indicates whether the ColumnWidth value is flexible or fixed.

Namespace:  System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

member IsColumnWidthFlexible : bool with get, set

<object IsColumnWidthFlexible="bool" .../>

Property Value

Type: System.Boolean
true if the column width is flexible; false if the column width is fixed. The default is true.

The IsColumnWidthFlexible property determines the manner in which any excess content area width (that is, the difference between the page width and the width of the content after it is laid out) is distributed among columns. A setting of true means that the extra space is distributed equally to each column; in this case, columns may be sized wider than the width specified by the ColumnWidth property. A setting of false means excess space is distributed to the padding on the right side of the page; in this case, columns will always size to the width specified by the ColumnWidth property (so long as that width is smaller than the width of the page minus any PagePadding).

The following figure illustrates the difference in layout when this property is true or false. Light blue represents columns of content in a FlowDocument.

Screenshot: Compare IsColumnWidthFlexible values

The following example shows how to set the IsColumnWidthFlexible attribute of a FlowDocument element.

      If <Bold>IsColumnWidthFlexible</Bold> is false, this FlowDocument will always
      have 4 columns of width 100.  Because <Bold>IsColumnWidthFlexible</Bold> is true,
      this FlowDocument may be laid out such that the width of the is more than 100, resluting in
      fewer than 4 columns.

The following example shows how to set the IsColumnWidthFlexible property programmatically.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.