MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Allow collapsing overflow area of ToolBar

未关闭
#2,723 9 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement up-for-grabs
主要语言
C#
星标
16.3k
派生
3.5k
平均合并
1 天 22 小时
30 天内合并 PR
8

描述

**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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 issue 中引用的 ToolBar 模板和 ToolBarOverflowButtonVisibilityConverter,然后检查溢出区域在 XAML 中的显示方式。添加一个可配置的 XAML 行为,用于折叠该区域,同时不改变其他对 Grid 的使用,并验证带有和不带溢出的工具栏是否按预期渲染。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
design, desktop
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。