-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The vertical scrollbar of DataGrid cannot be automatically generated #1062
Comments
To ensure the vertical scrollbar of the DataGrid is correctly generated when placed in a Grid with RowDefinition set to "*", you can handle the SizeChanged event of the Page to dynamically adjust the height of the DataGrid. Here's an example: XAML:
Code-Behind (C#): using System.Windows; namespace YourNamespace
} By handling the SizeChanged event, you can ensure that the DataGrid height is dynamically adjusted, and the vertical scrollbar is generated correctly. |
@programxo I'm sure you're right, but 2.1.0 has the ability to automatically generate a vertical scroll bar without dynamically setting the height of the DataGrid.Is this a destructive change? |
Describe the bug
If I do not set the Height of the DataGrid control, but set it to a certain Grid.Row, the vertical scrollbar cannot be automatically generated, which is normal in version 2.1.0.
To Reproduce
.
Expected behavior
When I have multiple rows in a Grid, and one of them is a DataGrid with RowDefinition Height set to "*", the vertical scrollbar for the DataGrid is generated correctly, instead of the entire Grid's vertical scrollbar.
Screenshots
No response
OS version
windows11
.NET version
8.0
WPF-UI NuGet version
3.0.4
Additional context
No response
The text was updated successfully, but these errors were encountered: