MudStack: Add parameter StretchItems to have certain children fill space#8545
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8545 +/- ##
==========================================
- Coverage 89.51% 89.48% -0.03%
==========================================
Files 410 410
Lines 11831 11832 +1
Branches 2355 2355
==========================================
- Hits 10590 10588 -2
- Misses 713 715 +2
- Partials 528 529 +1 ☔ View full report in Codecov by Sentry. |
|
I like the functionality, it is very useful, reminds me of Also, we should consider LTR vs RTL. Naming suggestion: [Parameter]
public StretchItems StretchItems { get; set; }
public enum StretchItems {
None,
Start,
End,
StartAndEnd,
Middle,
All,
}Usage: <MudStack StretchItems="StretchItems.End">
...
</MudStack>It might be good to add a |
Yeah, I think this is very common functionality in the Xamarin, Flutter, MAUI, WPF etc. |
Taking this further, perhaps |
|
Oh sorry, you didn't make the changes yet. Make sure to use the |
|
|
This is a tricky one because RTL does not mean the same in |
…ns in MudStack, added xml comments.
|
Whatever it is now feels natural in both LTR and RTL when reversed, and when not, so I'd leave it as is. I have changed parameter name to |
| </SectionHeader> | ||
| <SectionContent Block FullWidth Code="StackStretchChildrenExample" ShowCode="false" DarkenBackground> | ||
| <StackStretchChildrenExample /> | ||
| <SectionContent Block FullWidth Code="StackStretchItemsExample" ShowCode="false" DarkenBackground> |
There was a problem hiding this comment.
Please use Code="@nameof(StackStretchItemsExample)" and you may also add nameofs in the other sections
|
Perfect, looks good. If you will add the nameofs real quick I'll merge this today. |
I have made a mistake here, it's |
|
In theory there could be other uses of stretching, i.e. for images where you would need Stretch.Uniform, Stretch.X, Stretch.Y etc, so yes, it is the safest bet to rename the enum to |
|
Thanks @BieleckiLtd |
…ace (MudBlazor#8545) Co-authored-by: Pawel Bielecki <[email protected]>
…ace (MudBlazor#8545) Co-authored-by: Pawel Bielecki <[email protected]>
|
Hello guys Is it possible to implement this functionality in v6? |
|
v6 is on community support which means that those who need something backported from higher versions or bug fixes can do so. We'll review PRs and merge them and release a new version of v6. |


If the original PR #6010 was rejected due to conflicts, this update brings the previous code up to date with the current dev branch. If the rejection was for a different reason, please close this PR. Thank you.
Description
Closes #4960
2022-12-19_00-36-23.mp4
How Has This Been Tested?
unit + visually
Types of changes
Checklist:
dev).