Back to DOM
FitContentValuesEnum
Definition
- Namespace
- DOM.Enums
- Assembly
- DOM.dll
Specifies how content inside a container should fit.
Remarks
Used by table layout engines to decide whether columns should adapt to their content or whether content should be resized to fit a container.
Examples
csharp
1// 1. Auto-fit to content
2var fit = FitContentValues.AutoFitToContent;
3
csharp
1// 2. Auto-fit to window
2var fit = FitContentValues.AutoFitToWindow;
3
csharp
1// 3. Fixed column width
2var fit = FitContentValues.FixedColumnWidth;
3
csharp
1// 4. Choose based on the layout scenario
2var fit = isTableOfNumbers ? FitContentValues.FixedColumnWidth : FitContentValues.AutoFitToContent;
3
Fields
AutoFitToContent
Automatically size the element to fit its content.
AutoFitToWindow
Automatically resize content to fit the window or container.
FixedColumnWidth
Keep a fixed column width.