MaterialButton TextColor style position problem
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 28/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- mobile-dev
調査の方向性
報告されている ContentPage.Resources スタイルと両方の Setter の順序を使って、まず Android Xamarin.Forms のケースを再現します。MaterialButton によるスタイルプロパティ TextColor と ButtonType の処理を追跡し、その後、Setter の順序にかかわらず TextColor が White のままであることを確認します。
索引モデルが issue の本文から書いたものです。
説明
🐛 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
- 主要言語
- C#
- スター
- 631
- フォーク
- 150
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Baseflow/XF-Material-Library のほかの issue
-
.Net Maui Supportオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
Baseflow/XF-Material-Library#458 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
Baseflow/XF-Material-Library#457 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
Baseflow/XF-Material-Library#456 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Baseflow/XF-Material-Library#454 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 58/100
Baseflow/XF-Material-Library#453 ·
Baseflow/XF-Material-Library の issue をすべて見る
似ている issue
-
bug P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nightscout/nocturne#1908 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation Needs: Triage :mag:
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
WPF: each page's `Title` overwrites the window title, and returning to a page does not restore itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
agentic-workflows area/Docs partner/agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jamesmontemagno/tiny-clips#378 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信