WinUI.TableView
WinUI.TableView copied to clipboard
Column width should resize to fit in parent width
Is your feature request related to a problem? Please describe. When using the table view inside of a grid of a specified width the table view extends beyond the width of the grid (i.e. the horizontal scroll is enabled). I expect this is due to the default width of controls within the cells (something like cell width is 300 by default)?
Describe the solution you'd like There is a dependency property "ResizeAutoColumnsToFit" or similar, resizes columns to fit (i.e. table view is the width of the parent with no horizontal scroll bar). I guess this happens only on AutoGenerateColumns as this user can resize after this. And I'm not sure such functionality should apply when columns are explicitly defined.
Describe alternatives you've considered A dependency property "MaxColumnWidth" which applies to all columns (unless specified otherwise).
Additional context I just wanted to try this out to replace the WCT datagrid as it seems it is discontinued in version 8. My data grid on consists of 2 columns with column width of around 150 or so. Because of this and wanting the columns to display in full I am forced to define them myself. For grids with a low number of columns I think having columns resize and the window size changes etc is preferable, potentially with the ability of setting a MinWidth for all columns.