1

I am learning data binding in xaml and this xmlns problem is stopping me. My cs code is in namespace "Ping". Here is my MainWindow.xaml:

<Window x:Class="Ping.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:custom="clr-namespace:WPFDemo;assembly=WPFDemo"
    xmlns:local="clr-namespace:Ping"

The last line complains as in the title. Why is it not working? I am using "Ping" and it's the only namespace I got.

Thanks

pnuts
  • 54,806
  • 9
  • 74
  • 122
Charlie
  • 704
  • 1
  • 13
  • 23
  • Are you sure your local namespace is `Ping`? – dlev Aug 20 '11 at 06:47
  • @dlev, I am very sure my local namespace is "Ping". However my project name is something else. Would this be a problem? – Charlie Aug 20 '11 at 23:13
  • 1. [The 'clr-namespace' URI refers to a namespace that is not included in the assembly](http://stackoverflow.com/questions/3425954/the-clr-namespace-uri-refers-to-a-namespace-that-is-not-included-in-the-assemb). 2. [Undefined CLR namespace](http://stackoverflow.com/questions/5470158/undefined-clr-namespace). – Joel Purra Feb 26 '12 at 10:47

1 Answers1

0

If Ping is the only namespace you're using, you should remove the reference to WPFDemo

Paul Keister
  • 12,243
  • 4
  • 41
  • 71
  • WPFDemo is another projext I'm referencing to (need to use a custom control in that project.) Do they conflict? – Charlie Aug 20 '11 at 06:39
  • Thanks for the clarification - so you are using multiple namespaces after all. I would suggest that you post more code; there's nothing wrong with the XAML you've posted so far. It would be helpful to see the XAML that uses the local namespace and the declaration of the classes inside of Ping that you're using. – Paul Keister Aug 22 '11 at 00:43