Using WPF controls in a background or ASP.Net environment

后端 未结 2 394
青春惊慌失措
青春惊慌失措 2021-01-21 19:16

I have noticed that some WPF controls have some decent effects available to them (drop shadow, reflection etc), and was wondering if it was possible to use these WPF controls so

2条回答
  •  别那么骄傲
    2021-01-21 19:56

    You can use them, yes. The only problem is that you have to use them within STA threads, which you probably can't count on happening automagically (e.g., response threads in ASP.NET are MTA).

    I'm using WPF controls in a windows service app. I just have to transition to an STA thread before I do my rendering.

提交回复
热议问题