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