MaterialButton TextColor style position problem
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- mobile-dev
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện trường hợp Android Xamarin.Forms với kiểu ContentPage.Resources được báo cáo và cả hai thứ tự Setter. Theo dõi cách MaterialButton xử lý các thuộc tính kiểu TextColor và ButtonType, sau đó xác minh rằng TextColor vẫn là White bất kể thứ tự của Setter.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🐛 Bug Report
I don't know about other cases, but if I set "TextColor" property before "ButtonType" property in my style declaration - the text color is not applied.
Expected behavior
The "TextColor" property has to be applied independently of the position in the style declaration.
Reproduction steps
- Create a simple ContentPage:
<ContentPage ...>
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="material:MaterialButton" x:Key="MaterialButtonStyle">
<Setter Property="TextColor" Value="White" />
<Setter Property="ButtonType" Value="Outlined" />
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout Orientation="Horizontal">
<material:MaterialButton Style="{StaticResource MaterialButtonStyle}" Text="Apply" />
<material:MaterialButton Style="{StaticResource MaterialButtonStyle}" Text="Ok" />
</StackLayout>
</ContentPage>
- Notice the text color is not white:

- Swap "TextColor" and "ButtonType" properties and notice the color is applied now:
<Style TargetType="material:MaterialButton" x:Key="MaterialButtonStyle">
<Setter Property="ButtonType" Value="Outlined" />
<Setter Property="TextColor" Value="White" />
</Style>

Configuration
Version: 1.7.8
Platform:
- 📱 iOS
- 🤖 Android
- 🏁 WPF
- 🌎 UWP
- 🍎 MacOS
- 📺 tvOS
- 🐒 Xamarin.Forms
- Ngôn ngữ chính
- C#
- Star
- 630
- Fork
- 149
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Baseflow/XF-Material-Library
-
.Net Maui SupportĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Baseflow/XF-Material-Library#458 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
Baseflow/XF-Material-Library#457 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Baseflow/XF-Material-Library#456 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Baseflow/XF-Material-Library#454 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 58/100
Baseflow/XF-Material-Library#453 ·
Tất cả issue của Baseflow/XF-Material-Library
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentĐang mởbug 優先: 低
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
.NET area: storage bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Larson-Logan/medal-sync#61 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày