Special characters in XAML
This part is only restricted in XAML,Code.
1. Special Character escape
Special characters escape in XAML |
Special characters |
Escape |
Minor signs < |
& Lt; |
Yu no.> |
& Gt; |
Accessors & |
& Amp; |
Quotation marks" |
& Quot; |
2. Blank characters
By default, XAML collapse all white spaces, which means that long strings containing spaces, Tab keys, and hard carriage returns are converted to a single space. In addition, if a blank space is added before or after the content of an element, the space is ignored completely. If you want to retain these white spaces, you need to use the XML: Space = "preserve" feature for the element.
For example, <textbox XML: Space = "preserve"> there is a lot of space... </Textbox>
Special characters in XAML
This part is only restricted in XAML and is not restricted in code.
1. Special Character escape
Special characters escape in XAML |
Special characters |
Escape |
Minor signs < |
& Lt; |
Yu no.> |
& Gt; |
Accessors & |
& Amp; |
Quotation marks" |
& Quot; |
2. Blank characters
By default, XAML collapse all white spaces, which means that long strings containing spaces, Tab keys, and hard carriage returns are converted to a single space. In addition, if a blank space is added before or after the content of an element, the space is ignored completely. If you want to retain these white spaces, you need to use the XML: Space = "preserve" feature for the element.
example: there is a lot of space...