I am designing an calculator interface with visual studio 2013.I need to enclose "{" and "}" braces as two buttons in calculator.But when "{" button include as the button content,there is an error saying "mark up extension does not properly called".How can I enter the "{" brace just as a sign in the content field. Thanks.
In XAML you can escape the curly brace by adding extra opening and closing curly brace like this:
<Button Content="{}{This is a text with curly braces}" />
Or you can use the extended version without any escaping:
<Button>
<Button.Content>
{This is a text with curly braces}
</Button.Content>
</Button>
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.