,wpf,xaml,Wpf,Xaml" /> ,wpf,xaml,Wpf,Xaml" />

Wpf 生成期间出现XAML错误-标记不存在 xmlns:sdk=”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" Title=“MainWindow”Height=“350”Width=“525”>

Wpf 生成期间出现XAML错误-标记不存在 xmlns:sdk=”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" Title=“MainWindow”Height=“350”Width=“525”>,wpf,xaml,Wpf,Xaml,在构建解决方案时,我一直会遇到此错误 XML命名空间中不存在标记“TreeView”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk'. 第8行位置10。在WPF中,您不需要对TreeView使用sdk:。简单地将放入WPF中,您不需要为TreeView使用sdk:。简单的put它实际上起作用了。我用了:它确实有效。我用了: xmlns:sdk="http://schemas.microsoft.com/winfx/200

在构建解决方案时,我一直会遇到此错误


XML命名空间中不存在标记“TreeView”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk'. 第8行位置10。

在WPF中,您不需要对TreeView使用
sdk:
。简单地将
放入WPF中,您不需要为TreeView使用
sdk:
。简单的put
它实际上起作用了。我用了:
它确实有效。我用了:
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
        Title="MainWindow" Height="350" Width="525">
    <Grid>

        <sdk:TreeView Height="197" HorizontalAlignment="Left" Margin="242,80,0,0" Name="treeView1" VerticalAlignment="Top" Width="175" DataContext="{Binding}">
            <sdk:TreeView.ItemTemplate>
                <sdk:HierarchicalDataTemplate ItemsSource="{Binding Path=Childen}">
                    <StackPanel>
                        <TextBlock Text="{Binding Path=Value}"/>
                    </StackPanel>
                </sdk:HierarchicalDataTemplate>
            </sdk:TreeView.ItemTemplate>
        </sdk:TreeView>