When smaller MaxWidth is set on a grid than its natural width, the value is ignored.
Step 1: Create a DataGrid with a text column containing 50 characters.
Step 2: Set the MaxWidth to 30.
Expected: The width of the rendered DataGrid should be 30.
Actual: The width of the rendered DataGrid is 54 (50 plus the paddings and borders).
Example:
A table like this:
┌────────────────────────────────────────────────────┐
│ Table without colors │
├────────────────────────────────────────────────────┤
│ Text │
├────────────────────────────────────────────────────┤
│ Generic types can have multiple generic parameters │
└────────────────────────────────────────────────────┘
When applying a MaxWidth of 30 on it, is expected to be rendered like this:
┌────────────────────────────┐
│ Table without colors │
├────────────────────────────┤
│ Text │
├────────────────────────────┤
│ Generic types can have │
│ multiple generic │
│ parameters │
└────────────────────────────┘
When smaller
MaxWidth
is set on a grid than its natural width, the value is ignored.Step 1: Create a
DataGrid
with a text column containing 50 characters. Step 2: Set theMaxWidth
to 30. Expected: The width of the renderedDataGrid
should be 30. Actual: The width of the renderedDataGrid
is 54 (50 plus the paddings and borders).Example: A table like this:
When applying a
MaxWidth
of 30 on it, is expected to be rendered like this: