Hi all,
I want to be able to extend ASP.Net designer (VS 2005) for my own
markup language, which is based on WPF/XAML?
The design view is a mix of Richtext and UI controls (button, textbox,
radio button etc) and the Cider designer doesn't seem to solve all the
problems. I've defined my own WPF/XAML based language as 'source' for
the 'design' view.
My thoughts are that if I am able to extend ASP.Net designer and
manage to map my own WPF/XAML language to this, that should be it.
Any ideas/directions how to extend ASP.Net designer? at all?
Any small tip, pointer would be really appreciated.
Best Regards/- Vinayak
Justin Chase - 11 Sep 2007 21:04 GMT
Unfortunately I don't know how to 'extend' the asp.net designers but
I'll see if I can be of some other help because there is another
solution: you can create your own custom project types that use your
own parsers. I have been working on something similar, I have a
project that is called NBusiness (http://www.codeplex.com/nbusiness),
it has a domain specific language and visual studio integration. It
uses C# or VB as the code beside, similar to the ASP.NET model. I can
give you two pieces of advice about doing this if you can't figure out
how to 'extend' asp.net the way you're wanting to.
1.) Don't do it. It's incredibly hard and not worth the trouble.
2.) If you're as sadistic and single mided as I am :) and decide to
try it anyway then take a look at the Iron Python example that comes
with the SDK. You can also take a look at the code in my project from
the above link. It is very much like the Iron Python example only
probably a little simpler and comes with the code for the parser as
well (though I think you can get the iron python parser somewhere
too).
I'll throw out a general overview to give you some things to ruminate
on while you move forward. Basically what you need to do is create a
visual studio integration package. This package will use a custom
language which you will be implementing. This custom language will
parse the files you've been talking about. The code files (C# or VB)
will be code beside files and the way they will be brought together is
by creating an MSBuild task that will parse your files, generate
designer code files (C# or VB ,I would reccommend using the CodeDom or
else you'll end up doing a lot of work to support multiple languages)
then your msbuild task will bring together all of your generated code
files and your non-generated code beside files and use the CodeDom to
compile it into an assembly. That's the path I took and it's working
pretty well other than a few bugs here and there (there are some known
bugs in the SDK examples). Also I made the mistake of not adding the
designer code files to the projects automatically and it basically
screws up the intellisense so be sure to do that.
Good Luck (you poor sadistic fool)!!