General information
Category:
Windows Presentation Foundation (WPF)
>>>While VS2008 (the current one) has drag drop, it does not have true Visual editing and creation. I can create a form and UserControl Visually but when it comes to a class - which is THE basic building block of C# and VB I cannot design it visually in my VISUAL studio. I have to revert to code.
>>>
>>>Why not ?
>>
>>I think part of the answer to that is that when using WPF you should rarely, if ever, need to sub-class an element for *visual* reasons - that is usually (and properly) achieved by using Styles/Templates. And, if you use a MVVM pattern, there's no reason to subclass for functional reasons either.
>>
>
>Viv
>
>This part above, should have been (again my bad) in reference to normal Visual Studio, not WPF. I understand now, having read a lot more, that with templates and styles I can change things without subclassing. Although that is moving away from normal Dev, I understand and accept that as a valid way to develop.
>
>My statement above was strictly about Visual Studio and its inability to visually design classes, one of the basic building blocks. Any reference to WPF is inadvertent. :)
>
>So in the light of this, the Q is still open and unanswered.
OK.Now I'm a bit confused (a normal state of affairs) So, to be clear, when you refer to "desiging a class" you're referring to the sub-classing of a visual base class such as a button in Winforms?
If so, the best option is just to throw a button on a form and configure the appearance to your liking. You can then copy the relevant code from the designer.cs file and use it to create a button derived class. I know it's a kludge but it doesn't take long...
Best,
Viv
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only