Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I know this question has been asked multiple times, and I've gone through them all. Hopefully I didn't just miss something in the previous answers, but I'm stumped.

My application was working fine yesterday, but today I booted it up and now none of my file references, including ViewModels or DependencyProperties which I have defined in external files, can be found. I'm coding in VB (as you'll see), I've tried changing / adding Namespaces and nothing!

If someone has some insight into this issue I'm all ears!

Solution Structure

Image Of Solution

XAML Code

XML
<Window
xmlns:l="clr-namespace:PrairieWestIceCreamWPF"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
x:Class="WeeklyOutlookView" Title="WeeklyOutlookView" Name="WeeklyOutlookView"    Height="463.5" Width="1280" l:WindowBehavior.WindowClosing="{Binding WindowClosingCommand}">


<Window.DataContext>
    <l:WeeklyOutlookViewModel />
</Window.DataContext>


Errors

The Name "WindowBehavior" does not exist in the namespace "clr-namespace:PrairieWestIceCreamWPF"

The Name "WeeklyOutlookViewModel" does not exist in the namespace "clr-namespace:PrairieWestIceCreamWPF"
Posted
Updated 19-Mar-14 6:31am
v5

Please see my comment to your "Solution 1". This is not a solution at all. Actually, referencing the types defined in the same project is not a problem at all. It is not easy, it is very easy.

To start, start adding the xmlns attribute to your top XAML element by typing "xmlns:". The intellisense will show you the variants of local namespaces you can reference. Choose an appropriate one; and you will be done. Sorry if Intellisense is not working on some settings. I never faced this bug and can assure you that it is generally working. What you can do? Find out a single case of valid syntax for namespace value and learn it, enter manually.

—SA
 
Share this answer
 
v2
Finally found the culprit!!

At my work, our desktops are hosted on a network share. I had brought two applications I was working on from home and dropped the application files temporarily on the desktop to make some quick minor changes. Turns out there is a bug in the WPF Designer where the application will not be able to resolve assembly references if the application is being run from a share. As soon as I moved it to my local D drive, everything work perfectly.

Found answer here ->
http://social.msdn.microsoft.com/Forums/vstudio/en-US/75c4cc8d-9a81-4bda-84f0-f619f7493b3b/vs2010-xaml-namespace-intellisense-not-working?forum=vswpfdesigner
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Mar-14 12:55pm    
Moving to your local D drive? Gibberish. And what if you did not have this drive? And you totally broke the integrity of your project; move it onto another computer and it won't compile. All file references should be relative.

Forget about this solution, you did not find it. Your original XAML code is just ridiculous. You did not even try to add a proper namespace to bind with your project types. If you do nothing, you will have nothing.

—SA
Justin Shepertycki 20-Mar-14 13:47pm    
You have some anger issues. Look, I'm very new to WPF. I hope to god you're not some sort of instructor cause with that attitude you'd have to pay me to be in that class. I ended up getting a personal response from the MSDN guys and he said that my XAML was correct, and that opening a project on a LAN Share has been an issue in the WPF designer for a long time now. So before you start on another one of your temper tantrums, try some constructive criticism, not an all out verbal beating.
Sergey Alexandrovich Kryukov 20-Mar-14 14:09pm    
Be it your way. After all, you have this problem, not me. No one forces you to get a solution. Probably you don't want to accept any help (did you even notice I suggested some answer, good or bad?) just because you don't like criticism. So, how is going to loose then?
--SA
Justin Shepertycki 20-Mar-14 14:16pm    
I enjoy constructive criticism. It's the best way to learn in my opinion. Maybe it's a language barrier thing, and if it is I apologize. Clearly I was willing to accept help considering I got help from the MSDN team, so your comment on that is moot. And you may have offered a valid solution, but you present your solutions like a jerk, as if you think your better than everyone else. Which in the end, has clearly caused more problems than they have solved. I appreciate your knowledge, that does not mean I appreciate you. Good day.
Sergey Alexandrovich Kryukov 20-Mar-14 14:27pm    
My criticism is constructive, you just failed to notice it. If it happened because I did not express myself clearly, I apologize.

Now, a big note: I readily accept even non-constructive criticism, and would advise you to do the same. Non-constructive criticism can be very useful, too. To give you an example: supposed I found some solution and proven that it is correct, but my proof was wrong due to some mistake. Suppose you found my mistake, point it out, and told me "I don't know the solution, by yours is wrong, by this and this reason". You disprove the solution and did not put forward any. Should we all be thankful for that. Of course! You prevented wrong solution and found the mistake.

Can you see my point?

Cheers,
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900