C
C#2y ago
Down

❔ xamarin forms displaying text in 1 line with spacing

how can i distribute text that first is at the start of the line second is in the middle and third is at the end do i make stack layout horizontal and put 3 labels inside? still how to space them
16 Replies
.kimba
.kimba2y ago
Choose a Xamarin.Forms Layout - Xamarin
Xamarin.Forms layout classes allow you to arrange and group UI controls in your application.
.kimba
.kimba2y ago
Suggest you making a Horizontal Stack Layout then set Margins
Down
DownOP2y ago
hm FlextLayout also looks good
.kimba
.kimba2y ago
it's up to what you wish 😛
Down
DownOP2y ago
so i tried using flex but looks like this
Down
DownOP2y ago
the middle numbers arent lined up
.kimba
.kimba2y ago
align = center?
Down
DownOP2y ago
you mean AlignContent?
.kimba
.kimba2y ago
probably :p check the link I sent
Down
DownOP2y ago
doesnt solve it
.kimba
.kimba2y ago
most likely its there
Down
DownOP2y ago
there is alignitems let me try that nope both doesnt solve it do i need to use some kind of grid?
.kimba
.kimba2y ago
that's why I suggested Stack Layout that way you can align all by the middle you make three vertical stack layouts but to be honest you should ask another person for help because I'm not too good with this 😅
lycian
lycian2y ago
Did you try using the demo app? https://github.com/xamarin/xamarin-forms-samples/tree/main/UserInterface/FlexLayoutDemos If you can't get the experimentation to work how you want, I'd suggest using a grid. In general for this layout a grid is probably better, but I think it can be achieved with FlexLayout
GitHub
xamarin-forms-samples/UserInterface/FlexLayoutDemos at main · xamar...
Sample apps built using the Xamarin.Forms framework - xamarin-forms-samples/UserInterface/FlexLayoutDemos at main · xamarin/xamarin-forms-samples
TotechsStrypper
You need to use the datagrid, if not you have to use the grid each cell for columns division and always binding to the width of each column content take (Which lead to huge potential performance issues)
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server