Hope I can illustrate the problem using a lot of images. First of all, I was not a true XAML fan (Silverlight issues, Preview crashes, etc.)
Now, with VS2010, the situation has become better. There are many more things that I like best in the code, but I also need a preview in my VS.
So, take a look at the following control: it's really simple, a todo parts list. The first screenshot shows the control code, which is pretty good:
CodebasedControl http://img28.imageshack.us/img28/2263/invoicea49.png
There is no XAML, so obviously there is no preview. Of course, I could encapsulate it in another control, as shown in the following screenshot:
CodebasedControl http://img11.imageshack.us/img11/9515/invoicea48.png
But in this case, I have an additional file that I do not need or do not need. So I had the idea of moving init stuff inside the XAML control loop. For simplicity, I used simple elements. But they do not appear in the preview ...
CodebasedControl http://img99.imageshack.us/img99/5547/invoicea47.png
CodebasedControl http://img512.imageshack.us/img512/9625/invoicea46.png
Finally, I know that when creating user interfaces, I could use controls in other parts of my application. But I use the layout manager, PRISM, and many other things, so I just need a simple preview of some specific control that I created (without having to have a XAML wrapper file for each control)
Thanks for the help and sorry for the post structure, but I, although with the images, better understand ...
Chris