简体   繁体   中英

Can I use sign “<-” in Content property of Control?

I've tried to name Button like that:

<Button  Content="<-Delete" /> 

But I've seen the error:

The token " - Delete" is unexpected

How to include < sign in the Content property of Button ?

Use :

<Button  Content="&lt;-Delete" /> 

Reference for Use Special Characters in XAML

在此输入图像描述

You can use

<Button Content="&lt;-Delete" />

or

<Button Content="&#60;-Delete" />

to accomplish this task.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM