While learning about WPF, I came across an article explaining how to set the DataContext in XAML. I was able to do it in C# and X# without making any change to the XAML. The problem I ran into with X# is that it think "vm:ViewModeGroupExplorer" does not exist in namespace "clr-namespace:xWpfAppDemo.ViewModel", but it compile and run no problem at all. But I during development, I don't see what the UI look like, but instead I see "Invalid Markup". So with X# I simply use the code-behind to set the DataContext. This issue is still happening with beta 12. Anyone know how to fix this?
Also, I'm a lazy programmer. Will the General Release improve the intellsense so X# know the properties and methods of my classes? So it will auto complete my typing.
The General Release will most certainly improve intellisense in the Sourcecode Editor.
However I am not sure about intellisense in the XAML editor. That may take a little longer.
Unfortunately every subsystem in VS has its own technique of adding things.
And intellisense for both editors is handled differently.
XSharp Development Team
It's a long time since I was looking at this sort of detail, but the issue with not having the UI visible at design time is simply because your ViewModel is not instantiated when you're in the xaml editor.
You can get around this by the following, but the VM must have a parameterless constructor for this to work.
Since I learned my WPF stuff following Nick's samples some years ago now, it is not surprising that I agree with him on trying NOT to include the runtime DataContext in XAML.
Since getting going with Nick's User Group session samples, and developing a good number of my own, things seem to work well on the MVVM pattern by assigning the DataContext property of the View to the ViewModel in code. It is possible to still create complex Views with data templates of deeply structured data from Models.
CARE with XAML, it is so flexible and powerful that we as designer / coders can end up trying to apply more than one 'pattern' of approach at the same time. That means mixing stuff up.
Try to look at some of my published samples to see what Nick and I are referring to. My approach now seems quite simple or straight forward - thanks to Nick ;-0)
Here are a couple of image 'pointers' :-
The above is the best I can do at the moment, off the top of my head !