본문 바로가기
Windows/C#/WPF

[WPF] & 등의 이스케이프 문자 처리

by hirudev 2021. 5. 13.

https://stackoverflow.com/questions/32348307/using-in-textblock-text-wpf

 

Using & in textblock text WPF

When I was adding a hardcoded text in WPF textbox I found a diificulty in adding "&" symbol. I wonder why it is like that . Anybody having a reason and solution? stackoverflow.com

https://en.wikipedia.org/wiki/Character_encodings_in_HTML#XML_character_references

 

Unlike traditional HTML with its large range of character entity references, in XML there are only five predefined character entity references. These are used to escape characters that are markup sensitive in certain contexts(remove space & use):
•& amp; → & (ampersand, U+0026)
•& lt; → < (less-than sign, U+003C)
•& gt;→ > (greater-than sign, U+003E)
•& quot; → " (quotation mark, U+0022)
•& apos; → ' (apostrophe, U+0027)

 

'Windows > C#/WPF' 카테고리의 다른 글

Controls Styles and Templates  (0) 2022.04.14
[WPF] 내 나름대로의 MVVM 요약 (수정. 210515_1836)  (0) 2021.05.15
[WPF] 나중에 참고할 링크  (0) 2021.05.12
커멘드  (0) 2021.05.12
데이터 바인딩 2  (0) 2021.05.11

댓글