Skip to content

Conversation

@Koichi-Kobayashi
Copy link
Contributor

@Koichi-Kobayashi Koichi-Kobayashi commented Nov 28, 2025

Pull request type

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Issue Number: #557 #770 #1402

What is the new behavior?

-Added an “Add Button” and a “Close Button”
-Enabled tab dragging and dropping

Other information

2025-11-29_06h29_47 2025-11-29_06h30_54
2025-11-29_11h33_36_TabContorl.mp4

@github-actions github-actions bot added themes Topic is related to managing themes controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request gallery WPF UI Gallery dotnet release labels Nov 28, 2025
- Implement TabAddingProperty and TabClosingProperty attached properties
  in TabControlExtensions to allow XAML-based event handler assignment
- Add comprehensive XML documentation comments for the new properties
  and their change handlers
- Add implementation examples in Gallery with detailed code samples
- Enable XAML syntax: uiControls:TabControlExtensions.TabAdding="Handler"
  and uiControls:TabControlExtensions.TabClosing="Handler"
@Koichi-Kobayashi Koichi-Kobayashi changed the title Added an “Add Button” and a “Close Button” to the tab control. Additionally, drag-and-drop functionality has been enabled. feat(controls): Add an “Add Button” and a “Close Button” to the tab control. Additionally, drag-and-drop functionality has been enabled. Dec 6, 2025
…ting tabs

Add TargetNullValue to SymbolIcon Symbol binding in scroll bar button
styles to handle null Content values during tab deletion.

- ScrollBar.xaml: Add TargetNullValue to UiScrollBarLineButton
- DynamicScrollBar.xaml: Add TargetNullValue to DynamicScrollBarLineButton
@github-actions github-actions bot added documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code navigation Changes to navigation related controls. labels Dec 10, 2025
@Koichi-Kobayashi Koichi-Kobayashi marked this pull request as draft January 12, 2026 13:34
@Koichi-Kobayashi
Copy link
Contributor Author

There was an issue where the close button was displayed even when tabs were set not to be closable.

- Update TabControlExtensions to control close button visibility based on IsClosable property only
- Fix tab spacing when close button is hidden by using fixed column width instead of Auto
- Add example in TabControlPage to make first tab non-closable
- Update method documentation comments in TabControlPage
@Koichi-Kobayashi Koichi-Kobayashi marked this pull request as ready for review January 14, 2026 21:56
@Koichi-Kobayashi
Copy link
Contributor Author

We have adjusted the display state and spacing of the close button on the tab control. Please review.

@chucker
Copy link
Collaborator

chucker commented Jan 15, 2026

Please review.

So, to align this with WinUI 3 where possible, I'm wondering if we should split the control in two:

  • the thing you're writing is called the TabView in WinUI 3 Gallery:
image

It has close buttons, drag & drop, etc. Its description says "provides the user with a collection of tabs that can be used to display several documents".

  • but the thing a WPF TabControl usually does is IMHO distinct. It's closer to what WinUI 3 Gallery calls a SelectorBar
image

…and WinUI 2(?) called it a Pivot:

image

My thinking is that low-level, we can do these changes, but high-level, using TabControl directly through WPF-UI should be discouraged; rather, we provide two high-level controls

  • SelectorBar
  • TabView

…that internally use TabControl, but externally expose the appropriate properties.

Or maybe we can have a property Behavior where you can choose SelectorBar or TabView?

@chucker
Copy link
Collaborator

chucker commented Jan 15, 2026

See also #847, #1038

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. documentation Improvements or additions to documentation dotnet gallery WPF UI Gallery github_actions Pull requests that update GitHub Actions code navigation Changes to navigation related controls. PR Pull request release styles Topic is related to styles themes Topic is related to managing themes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants