如何在XAML中转义大括号

                               如何在XAML中转义大括号
                                       周银辉


我们知道大括号"{}"在XAML中是用来处理"标记扩展的,
比如:

<Button Content="{Binding}"/>

 
但如何转义而表示普通大括号的字符串呢? 比如

 <Button Content="{these are braces}, {Others}"/>

但这会编译不过,说未定义的扩展标记. 正确的写法

<Button Content="{}{these are braces}, {Others}"/> 

如此tricky的写法, 天晓得, 我一直误认为应该写成"\{\}"或"{{}}" 之类的~   

原文地址:https://www.cnblogs.com/zhouyinhui/p/1524717.html