1
我無法將用戶控件添加爲MainWindow.xaml無法添加我的自定義用戶控件在主窗口WPF
這是我的解決方案資源管理器:(指針顯示我的用戶控制)
這是我的用戶控制頭部的XAML文件
<UserControl x:Class="SIManager.ucAddDevices"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SIManager"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500" FlowDirection="RightToLeft" FontFamily="B Nazanin">
這是MainWindows頭的XAML
<Window x:Class="SIManager.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SIManager"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="800">
現在我不能將我的用戶控件添加到標籤項目...爲什麼?
在下圖中我的用戶控件名稱不會出現... !!!!
我怎麼可以在我的用戶控件添加到選項卡項目????
您在創建用戶控件後重建了嗎? –
是的,你應該嘗試清理解決方案,然後重建它,有時智能感知不會識別控件之前構建 –
我清理和重建解決方案,但不會工作.... – abbas