我想在TabItem
s 中打开用户控件TabControl
。
我这样做是这样的:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:a="clr-namespace:Pauspan_WPF_"
Title="Pauspan" Height="568" Width="1095" Name="FrmMain">
<Grid Name="MainGrid">
<TabControl Height="400" Margin="187,33,16,0" Name="TbCtrlMain" >
<TabItem Header="TabItem1" Name="TabItem1">
<a:UserControl1 />
</TabItem>
</TabControl>
但它在这一行给出了一个错误:
<a:usercontrol1/>
错误是:
**The type 'a:UserControl1' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.**
UserControl1 的名称为 UserControl。
我怎样才能做到这一点?为什么会出现这个错误?