Skip to content

DataRow lay out children like a horizontal StackPanel if DataTable is not present#784

Open
9rnsr wants to merge 1 commit intoCommunityToolkit:mainfrom
9rnsr:ImproveDataTable-3
Open

DataRow lay out children like a horizontal StackPanel if DataTable is not present#784
9rnsr wants to merge 1 commit intoCommunityToolkit:mainfrom
9rnsr:ImproveDataTable-3

Conversation

@9rnsr
Copy link
Copy Markdown
Contributor

@9rnsr 9rnsr commented Feb 23, 2026

Separate PR from #781

This added behavior just covers a corner case. If a user fails to place corresponding DataTable at correct position, displaying somethings is better than nothing.

Each rows layout their columns independent, because there's no main controller to remember the column widths, and then it looks like a horizontal StackPanel.

@9rnsr 9rnsr force-pushed the ImproveDataTable-3 branch from d7c83c9 to 3933681 Compare April 25, 2026 00:35
… not present

This added behavior just covers a corner case. If a user fails to place corresponding DataTable at correct position, displaying somethings is better than nothing.

Each rows layout their columns independent, because there's no main controller to remember the column widths, and then it looks like a horizontal StackPanel.
@9rnsr 9rnsr force-pushed the ImproveDataTable-3 branch from 3933681 to 371b6d9 Compare April 25, 2026 01:12
@michael-hawker
Copy link
Copy Markdown
Member

Was thinking about this scenario a bit more over the weekend, and I see a couple of directions:

  1. If they just have a DataRow it's better to just have another panel there instead if they don't intend to use it as it's intended. Providing another behavior may be confusing or not lead them to understanding that there's more to be done. Probably something to think about if we can indicate this different state another way.

  2. If we did want a default behavior. Probably doing a more EqualPanel type behavior where we space each item out based on the available width / number of items would make more sense, as then as long as the developer has the same number of items in each row (which they would with a data template) then it evenly spaces each item and maintains columns between the rows compared to them being jagged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants