我已经在 Visual Studio 中创建了一个测试 Silverlight 2 应用程序,只是 copying the Tim Heuer video ,但是当我在 Blend 中打开它时,出现此错误
UserControl is not supported in a Windows Presentation Foundation (WPF) project
这是XAML代码
<UserControl x:Class="MyFirstApp.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Orientation="Vertical">
<TextBox x:Name="myTextBox" FontSize="60" />
<Button Content="Click Me" FontSize="60" Click="Button_Click" />
</StackPanel>
</Grid>
</UserControl>
我是否缺少引用资料或其他内容?
最佳答案
您需要安装Expression Blend 2.0 SP1 .
关于silverlight - 关于 Expression Blend 2 中的 WPF 不支持 UserControl 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/818526/