Answer the question
In order to leave comments, you need to log in
Why doesn't xaml see the class in the namespace?
Let's say there is such xaml code with an error in the windows.datacontext block
<Window x:Class="TestProject.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:TestProject"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Window.DataContext>
<!-- ошибка здесь -->
<local:MainWindowClass/>
</Window.DataContext>
<Grid>
</Grid>
</Window>
namespace TestProject
{
class MainWindowClass
{
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question