I'm just starting with WPF so this is a very basic question.
I try to map XAML namespace to my custom class which is in the same assembly as my window. I however receive the error: "Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'myNamespace' that is not included in the assembly."
The XAML code looks like this:
And my custom class like thisCode:<Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:custom="clr-namespace:myNamespace" Title="MainWindow" Height="367" Width="483"> <Grid ShowGridLines="True"> </Grid> </Window>
What goes wrong here?Code:Namespace myNamespace Public Class Person Private _name As String = "[Insert the name here...]" Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value End Set End Property Private _age As Integer = 30 Public Property Age As Integer Get Return _age End Get Set(ByVal value As Integer) _age = value End Set End Property Public Sub New() End Sub End Class End Namespace


Reply With Quote