Skip to content

Comments

Provide support to customize the spacing between header items in Tab View#307

Merged
PaulAndersonS merged 2 commits intomainfrom
TabViewHeaderItemSpacing
Dec 15, 2025
Merged

Provide support to customize the spacing between header items in Tab View#307
PaulAndersonS merged 2 commits intomainfrom
TabViewHeaderItemSpacing

Conversation

@naveenkumar-sanjeevirayan
Copy link
Collaborator

Root Cause of the Issue

Need to customize the spacing between header items in the TabView. This spacing is currently hardcoded to 36 (see https://github.com/syncfusion/maui-toolkit/blob/main/maui/src/TabView/Control/SfTabBar.cs#L33).

Description of Change

Introduces a new HeaderItemSpacing property on SfTabView, piped down to SfTabBar.

Preserves the current value of 36 as the default.

Screenshots

headeritemspacing

@naveenkumar-sanjeevirayan naveenkumar-sanjeevirayan changed the title Provided HeaderItemSpacing property for SfTabView Provide support to customize the spacing between header items in Tab View Dec 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for customizing the spacing between header items in SfTabView. Previously, this spacing was hardcoded to 36 pixels. The change introduces a new HeaderItemSpacing property that can be configured while maintaining backward compatibility by keeping 36 as the default value.

Key Changes:

  • Added HeaderItemSpacing bindable property to SfTabView and SfTabBar
  • Removed hardcoded _defaultTextPadding field and replaced all usages with the new property
  • Added comprehensive unit tests for the new property

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
maui/src/TabView/Control/SfTabView.cs Added public HeaderItemSpacing property with bindable property declaration, property changed handler, and update method
maui/src/TabView/Control/SfTabBar.cs Added internal HeaderItemSpacing property, removed hardcoded field, replaced all usages in width calculation methods
maui/tests/Syncfusion.Maui.Toolkit.UnitTest/Navigation/SfTabViewUnitTests.cs Removed obsolete private field tests, added comprehensive tests for HeaderItemSpacing including default value, set/get, and property changed propagation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ewUnitTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@PaulAndersonS PaulAndersonS merged commit f613c34 into main Dec 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tabview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants