0

Is it possible to have a code (server and all that) in Winform and then instead of setting an image to a panel/picturebox, i can set it to WPF (which is faster?).

If so, will this operation be fast, or will it have to invoke or something which causes some delay in it?

I have tried doing this, settings an image on WPF from winform, sadly it wasn´t as easy as i expected.

4
  • 1
    What exactly are you trying to do? Commented Aug 8, 2013 at 1:03
  • Misses this. Well if you have seen my other posts, i am trying desperately to find a way to display images fast. And SlimDX isn´t going my way. So i am trying my luck in WPF. So in other words, i want to display images very fast, and it should be able ti withstand higher resolutions (Panel and Picturebox slow down at 800x600+). Commented Aug 8, 2013 at 1:24
  • For your specific intent of displaying images very fast, please consider looking for or posting a new question, Commented Aug 8, 2013 at 8:41
  • Well, i have asked it before, but i get no answer. So i guess i must be more specific, as Faster is quite the term. Commented Aug 9, 2013 at 1:22

2 Answers 2

2

I had a Windows Forms project and was able to : create new WPF pages : add WPF controls to existing Windows Forms

First of all you need to change you .csproj in order to have the option of creating a new WPF page and control available. I do not know now by heart, but basically it's a GUID you add.

From what i read you want the second. While on the Windows Forms designer you can just go to you toolbox and drop a WPF control into the Windows Forms. By doing so VS creates to things: 1. Your wpf control 2. ElementHost control

You can then access your wpf control just as usual by accessing its variable name.

Sign up to request clarification or add additional context in comments.

2 Comments

Are you talking about that (WPF integration) thing in the toolbox? cause i wanted to get it working. I followed as stated, i created a WPF project and user control, added it to reference, but it still wasn´t available to choose from.
I did it some time ago. Try here msdn.microsoft.com/en-us/library/ms742215.aspx
1

Sounds like you want a WindowsFormHost It allows you to utilize WinForm controls in a WPF application. It still renders through GDI though. If you want it to utilize WPF, you could pass the data you use to render the image up to WPF.

1 Comment

What i wans is the second one, IF it´s faster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.