dotnet / dotnet/wpf

TextBlock.Style end tag has 2 > symbols but xaml not seeing them- Causing the symbol to be shown as part of render.

Open
#9,358 3 comments 1 reaction 0 assignees View on GitHub
:mailbox_with_no_mail: waiting-author-feedback Investigate
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/TextBlockStyle-end-tag-has-2--symbols-/10481103)._

---
The GT symbol in the end tag of TextBlock.Style is rendered when it is entered twice at the end of the endtag as shown in the screenshot. I thought the render was an error in the Trigger since the text is supposed to be changed to Yes! when the Checkbox is checked. It would change the color of the text 'NO' to green but would not change the text to 'Yes!' as per the code.

![tb issue](https://github.com/dotnet/wpf/assets/105205215/bcd8e39a-c4e1-4e78-97c9-b773c3a96bf4)

---
### Original Comments

#### Feedback Bot on 10/3/2023, 00:51 PM:

(private comment, text removed)
#### Feedback Bot on 12/28/2023, 02:19 PM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

----
### Repro steps

1.Create a WPF Application (.NET7.0)
2.Replace Grid with the blow code.

```




<Setter Property="Text" Value="No"/>
<Setter Property="Foreground" Value="red"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=cdSample, Path=IsChecked}" Value="True">
<Setter Property="Text" Value="Yes"/>
<Setter Property="Foreground" Value="Green"/>
</DataTrigger>
</Style.Triggers>




```
3.Press F5 to run the app.
Issue1: TextBlock.Style end tag has 2 > symbols but xaml not seeing them, and > symbol is rendered in running app.
Issue 2: When the Checkbox is checked. the text is supposed to be changed to Yes! but not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.