Wpf special character

simple WPF question. I would like to have a button with the content = "<" (back button) How to do this because the following is not true:

Content="<"
+5
source share
4 answers
<Button Content="&lt;"/>

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

This is what the compiler tells you in this case, at least for me:

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

+18
source

try the following:

Content = "&lt;"
+5
source

,

    <Button Content="&lt;" />
+5

, ISO

-1

All Articles