VladislavAntonyuk / vladislavantonyuk.github.io

https://vladislavantonyuk.github.io
2 stars 1 forks source link

Can the position of the ShellItems in the TabBar be adjusted? #77

Open TheBaileyBrew opened 10 months ago

TheBaileyBrew commented 10 months ago

Hello!

I've been working through understanding all the work you did here: https://vladislavantonyuk.github.io/articles/Adding-custom-action-button-to-.NET-MAUI-Shell-TabBar/

And I love it!! It's exactly the concept that I was looking for instead of going the route of doing something like Sharpnado, Telerik or Syncfusion.

I have successfully implemented the handlers/renderers in my app, but I'm wondering if there's a way to adjust the spacing of the tabs themselves, since I have a need for 4 tabs to be visible, and it makes the middle 2 tabs REALLY close to the center action button?

image

TheBaileyBrew commented 10 months ago

I made it work by just adding an empty tab, but still curious if there's a way to do it via one of the renderers..

VladislavAntonyuk commented 10 months ago

yes, you have full control how to position the items. You only need to change the space between items. as for middle view, I set position Center: middleView.Center = new CGPoint(View.Bounds.GetMidX(), TabBar.Frame.Top - middleView.Frame.Height / 2); You can adjust it according your needs

rpharon commented 7 months ago

@TheBaileyBrew Hi, have you figured out how to space out each items based on @VladislavAntonyuk comments?