简体   繁体   English

我可以在Control的Content属性中使用“< - ”符号吗?

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

I've tried to name Button like that: 我试过像这样命名Button

<Button  Content="<-Delete" /> 

But I've seen the error: 但我看到了错误:

The token " - Delete" is unexpected 令牌“ - 删除”是意外的

How to include < sign in the Content property of Button ? 如何包含<登录ButtonContent属性?

Use : 使用 :

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

Reference for Use Special Characters in XAML XAML中使用特殊字符的参考

在此输入图像描述

You can use 您可以使用

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

or 要么

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

to accomplish this task. 完成这项任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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