MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Allow collapsing overflow area of ToolBar

Open
#2,723 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement up-for-grabs
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
A ToolBar always contains the area for the overflow, even there is no overflow at all. I am not sure if this is intended behavior or no. For small toolbars I find this rather annoying.

Here a small example, the overflow part is the lighter area to the right of the ‘B’ button:
![grafik](https://user-images.githubusercontent.com/3511772/171138302-565e7bbc-97b2-452d-a10e-a1e6f2f77bd6.png)

In the package code itself I can get achieve my expected result by changing `ToolBarOverflowButtonVisibilityConverter` to return `Visibility.Collapsed` instead of `Visibility.Hidden`. But I guess that could cause issues in other use cases.

**Describe the solution you'd like**
The behavior of the overflow area is configurable in XAML.

**Describe alternatives you've considered**
My current workaround is to collapse the overflow grid using an implicit style:
```XAML


<Setter Property="Visibility" Value="Collapsed" />

```
This works only as long as there are no other uses of Grid.

**Additional context**
This is based on to 4.5.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ToolBar template and ToolBarOverflowButtonVisibilityConverter referenced in the issue, then inspect how the overflow area is shown in XAML. Add a configurable XAML behavior for collapsing that area without changing other Grid uses, and verify that toolbars with and without overflow render as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
design, desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.