zoukankan      html  css  js  c++  java
  • WPF的xaml中特殊字符表示

    直接看表,描述很清晰

    字符

    转义字符

    备注

    & (ampersand)

    &

    这个没什么特别的,几乎所有的地方都需要使用转义字符

    > (greater-than character)

    >

    在属性(Attribute values)中必须进行转义,在内容(Content)中 如果没有<在>符号的前面,可以不进行转义,直接使用>

    < (less-than character)

    &lt;

    在属性(Attribute values)中必须进行转义,在内容(Content)中 如果没有>在<符号的后面,可以不进行转义,直接使用<

    " (straight quotation mark)

    &quot;

    在属性(Attribute Values)中必须进行转义,在内容(Content)中可以直接使用,而不进行转义。需要注意的是如果属性使用'来定义属性,那么"可以直接使用如

    Text='test"test"test',反之如果是用”来定义属性,那么'可以直接使用而不需要转义字符,如Text="test'test"

    ' (single straight quotation mark)

    &apos;

    同上

    (numeric character mappings)

    &#[integer]; or &#x[hex];

    可以和字符集合映射,如&#100;(10进制)或者&#xff;(16进制)

    回车:&#x000D;换行:&#x000A;Tab:&#x0009;空格:&#x0020;

    (nonbreaking space)

    &#160; (assuming UTF-8 encoding)

    Flow Document的元素或者有Text属性的元素,输出不间断空格

    {

    {}{

    当{}使用的时候,{可以直接使用(功能类似与string text=@"E: est.txt";中的@)

  • 相关阅读:
    LeetCode "Jump Game"
    LeetCode "Pow(x,n)"
    LeetCode "Reverse Linked List II"
    LeetCode "Unique Binary Search Trees II"
    LeetCode "Combination Sum II"
    LeetCode "Divide Two Integers"
    LeetCode "First Missing Positive"
    LeetCode "Clone Graph"
    LeetCode "Decode Ways"
    LeetCode "Combinations"
  • 原文地址:https://www.cnblogs.com/Laggage/p/10425423.html
Copyright © 2011-2022 走看看