MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

Allow collapsing overflow area of ToolBar

Đang mở
#2,723 9 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

enhancement up-for-grabs
Ngôn ngữ chính
C#
Star
16.3k
Fork
3.5k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách xác định template ToolBar và ToolBarOverflowButtonVisibilityConverter được tham chiếu trong issue, sau đó kiểm tra cách vùng overflow được hiển thị trong XAML. Thêm một behavior XAML có thể cấu hình để thu gọn vùng đó mà không thay đổi các cách sử dụng Grid khác, và xác minh rằng các toolbar có và không có overflow được render như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp
Lĩnh vực
design, desktop
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.