Add ClearButton support for TextArea with ClearButton class combination

Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-25 06:10:49 +00:00
parent ec2202e2ef
commit 2d2f2afec1
2 changed files with 17 additions and 0 deletions

View File

@@ -170,6 +170,14 @@
<Setter Property="IsVisible" Value="True" />
</Style>
</Style>
<Style Selector="^.TextArea.clearButton, ^.TextArea.ClearButton">
<Style Selector="^[IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton">
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="^[IsReadOnly=False]:pointerover:not(:empty) /template/ Button#PART_ClearButton">
<Setter Property="IsVisible" Value="True" />
</Style>
</Style>
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
<Setter Property="PasswordChar" Value="•" />
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
@@ -378,6 +386,14 @@
<Setter Property="IsVisible" Value="True" />
</Style>
</Style>
<Style Selector="^.TextArea.clearButton, ^.TextArea.ClearButton">
<Style Selector="^[IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton">
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="^[IsReadOnly=False]:pointerover:not(:empty) /template/ Button#PART_ClearButton">
<Setter Property="IsVisible" Value="True" />
</Style>
</Style>
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
<Setter Property="PasswordChar" Value="•" />
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">