我想打開一個TabControl
的TabItem
中的用戶控件。在tabcontrol的tabitem中顯示UserControl
我這樣做的:
<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。
我該怎麼做?爲什麼會出現這個錯誤?
http://www.codeproject.com/Articles/32825/How-to-Creating-a-WPF-User-Control-using-it-in-aW –
你肯定的UserControl1是Pauspan_WPF_命名空間相同的程序集? – Nitin
我不知道如何檢查它?或如何添加它在組裝? – user2689704