【发布时间】:2009-02-12 08:38:42
【问题描述】:
我读到“默认命名空间很重要,否则 XAML 解析器将无法识别元素”。
然而,作为一个测试,我把它拿出来,虽然视觉设计师不能再识别元素名称,但这个 Silverlight XAML 运行得很好:
<UserControl x:Class="Second12.Page"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<TextBlock Text="This is a test."/>
</Grid>
</UserControl>
这是为什么呢?
【问题讨论】: