❔ 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
Choose a Xamarin.Forms Layout - Xamarin
Xamarin.Forms layout classes allow you to arrange and group UI controls in your application.
Suggest you making a Horizontal Stack Layout
then set Margins
hm FlextLayout also looks good
it's up to what you wish 😛
so i tried using flex but looks like this
the middle numbers arent lined up
align = center?
you mean AlignContent?
probably :p
check the link I sent
doesnt solve it
most likely its there
there is alignitems
let me try that
nope both doesnt solve it
do i need to use some kind of grid?
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 😅
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
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)
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.