正如我在网上找到的那样,我使用了此语法,但它抛出了一个错误:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<!-- Cool comment -->
xmlns:System="clr-namespace:System;assembly=mscorlib"
'名称不能以'<;'开头'字符,十六进制值0x3C.
正如我在网上找到的那样,我使用了此语法,但它抛出了一个错误:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<!-- Cool comment -->
xmlns:System="clr-namespace:System;assembly=mscorlib"
'名称不能以'<;'开头'字符,十六进制值0x3C.
我假设那些XAML命名空间声明在控件的父标记中?你不能把 comments 放在另一个标签里.除此之外,您使用的语法是正确的.
<UserControl xmlns="...">
<!-- Here's a valid comment. Notice it's outside the <UserControl> tag's braces -->
[..snip..]
</UserControl>