Using WPF Controls in the Background or ASP.Net Environment

I noticed that some WPF controls have some nice effects (drop shadow, reflection, etc.) and was wondering if these WPF controls could be used solely for their available effects?

For example, I have an image processing library that resizes and mailboxes with different image sizes, but I would like to add drop shadow effects to the resulting images. This WPF control has this effect, but how easy it is to use in an environment where there will never be a GUI (console application or ASP.Net library / handler, for example).

Thoughts?

Greetings

Mu

+2


a source to share


3 answers


You can use them, yes. The only problem is that you have to use them in STA streams, which you probably cannot expect to be automatic (e.g. response streams in ASP.NET are MTAs).



I am using WPF controls in a windows app. I just need to go to the STA stream before I do the rendering.

+1


a source


Take a look at RenderTargetBitmap. You can do whatever you want with your WPF component and then render it as a bitmap and then use that bitmap in your ASP page.



I'm not sure if this is the best way to do it. Is Silverlight confusing to you?

0


a source


I recently wrote a post about a similar argument here .

0


a source







All Articles