I am creating and with content 'Save & Add'. I write it in XAML, but the symbol '&' is not accepting. What is the reason for that. How can I do that?
Create a Basic Button in WPFClick the file menu and select New then click on the project. Find the Windows Desktop WPF Application template. Step 3: Change the default Grid element into StackPanel and use the default buttons inside the StackPanel, as in the following code: <Window x:Class="WpfApplication1.
Its content property is Content. Handle the ButtonBase. Click event to respond when the user clicks a Button. The OnMouseLeftButtonDown method marks the MouseLeftButtonDown event as handled.
The TextBlock control provides flexible text support for UI scenarios that do not require more than one paragraph of text. It supports a number of properties that enable precise control of presentation, such as FontFamily, FontSize, FontWeight, TextEffects, and TextWrapping.
Use & instead of &.
You might find this article of some use - How to: Use Special Characters in XAML
From Wikipedia:
Unlike traditional HTML with its large range of character entity references, in XML there are only five predefined character entity references. These are used to escape characters that are markup sensitive in certain contexts:
- & → & (ampersand, U+0026)
- < → < (less-than sign, U+003C)
- > → > (greater-than sign, U+003E)
- " → " (quotation mark, U+0022)
- ' → ' (apostrophe, U+0027)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With