小编jed*_*dai的帖子

'Controls'是未声明的前缀; XML无效

所以这是我的xaml:

<Window x:Class="KinectButton.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:Coding4Fun.Kinect.Wpf.Controls;assembly=Coding4Fun.Kinect.Wpf"
        Title="Weather" Height="1024" Width="1280" WindowStartupLocation="CenterScreen">
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="812*" />
            <ColumnDefinition Width="446*" />
        </Grid.ColumnDefinitions>
        <Canvas Background="#FF371780" Grid.ColumnSpan="2">
            <Controls:HoverButton Margin="0" Padding="0" x:Name="kinectButton" ImageSize="50"                                           
                                ImageSource="/Images/RightHand.png"  
                                ActiveImageSource="/Images/RightHand.png" 
                                TimeInterval="2000"  Panel.ZIndex="1000" Canvas.Left="0" Canvas.Top="0" />
            <Button x:Name="button1" Content="Close" Height="141" Canvas.Left="979" Canvas.Top="6" Width="273" Background="#FFFFF600" FontSize="53.333" Click="button1_Click" BorderThickness="4" Foreground="#FF1A1717" />
            <Label Canvas.Left="0" Canvas.Top="733" Content="" Height="1024" Name="message" Width="1280" Foreground="White" FontSize="40" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
            <Image Height="128" Name="videoStream" Stretch="Fill" Width="191" Canvas.Left="539" Canvas.Top="825" />
        </Canvas>
    </Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)

它不断给出错误:''Controls'是一个未声明的前缀.第11行,第14行.' XML无效.

wpf xaml visual-studio-2010

2
推荐指数
1
解决办法
2083
查看次数

标签 统计

visual-studio-2010 ×1

wpf ×1

xaml ×1