Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

special character wpf

a simple WPF question. I would like to have a button with content="<" (the "backward button") How to I achieve this because the following is wrong:

Content="<"
like image 477
niao Avatar asked Jan 07 '10 09:01

niao


1 Answers

<Button Content="&lt;"/>

Remember that XAML is still XML, so the same escapes apply.

This is also what the compiler tells you in that case, at least it does for me:

The open angle bracket character '<' is not valid in an attribute. It should be written as '&lt;'.

like image 180
Joey Avatar answered Nov 09 '22 09:11

Joey