Partilhar via


XamlName Grammar

Microsoft Silverlight will reach end of support after October 2021. Learn more.

The following is the normative grammar for a string that is used as a name or key in Silverlight.

XamlName ::= NameStartChar (NameChar)*
NameStartChar ::= LetterCharacter | '_'
NameChar ::= NameStartChar | DecimalDigit
LetterCharacter ::= ('a'-'z') | ('A'–'Z')
DecimalDigit ::= '0'-'9'
CombiningCharacter::= none

Remarks

Characters are restricted to the lower ASCII range, and more specifically to Roman alphabet uppercase and lowercase letters, digits, and the underscore (_) character.

The Unicode character range is not supported.

A name cannot begin with a digit. Some tool implementations prepend an underscore (_) to a string if the user supplies a digit as the initial character.

See Also

Reference

Other Resources