i'm trying to put a UserControl in a Window, for a strange reason it's not working. Even after rebuilding and cleaning the project.
<Window xmlns:Header="JWKBouwWPF.Controls.Header" x:Class="JWKBouwWPF.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:JWKBouwWPF"
mc:Ignorable="d"
Title="MainWindow" WindowState="Maximized">
This is my code, as it states it should be accesable by doing
I rebuild it a couple of times, deleted and re-added the UserControl, but to no avail.
Your namespace mapping is missing clr-namespace
token. Replace xmlns:Header="JWKBouwWPF.Controls.Header"
with xmlns:Header="clr-namespace:JWKBouwWPF.Controls.Header"
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.