xsharp.eu • How to use an X# WPF program/screen in VO?
Page 1 of 1

How to use an X# WPF program/screen in VO?

Posted: Mon Nov 13, 2017 10:56 pm
by ic2
What would be the best way to show an X# WPF program/screen in VO?

We want to create a specific program based on one of the Syncfusion components. This will databind to life data and show a graphic representation. In VO a split screen shows all kind of information, like planning, bBrowsers, etc. We would like to show this WPF screen in a pane. I could imagine this to be a OLE object control in VO, but I have not directly an idea how to get an X# program running in it.

Can anyone share some ideas or code?

Dick

How to use an X# WPF program/screen in VO?

Posted: Tue Nov 14, 2017 4:25 am
by wriedmann
Hi Dick,

indeed, that would be very useful!

I have done a quick search, but found nothing how to create a OLE control from a WPF window or control, but theoretically it should be possible (and would solve several problems for me).

Wolfgang

How to use an X# WPF program/screen in VO?

Posted: Tue Nov 14, 2017 10:17 pm
by ic2
Hello Wolfgang,

I hope someone else has an idea. I don't think the VO program in which it should run is converted to X# anytime soon. An approach of slowly introducing whatever works better in .Net has more success and then we can gradually convert code. I do the same on the programs I maintain and (unfortunately) I still find working in VO so much more productive than in VS.

About what I have in mind: often an OLE control just shows a document, like a picture or a text file. But if I install PDF-Xchange viewer and allow showing PDF's in browsers, the OLE control actually shows the whole program (including it's menu I mean). For just showing a PDF document I would rather not see that, but it proves it should be possible what I (we) want. I am not sure where to start however.

Dick

How to use an X# WPF program/screen in VO?

Posted: Wed Nov 15, 2017 5:08 am
by wriedmann
Hi Dick,

to display a PDF file in a control you can use Acrobat Reader (ok, seems to be a bit fat...).

About using a WPF control in a VO application I will try to find something because I would need that also for myself.

Wolfgang

How to use an X# WPF program/screen in VO?

Posted: Wed Nov 15, 2017 9:23 am
by wriedmann
Hi Dick,

I have yet to try it, but I have found a sample for this:

https://www.codeguru.com/cpp/cpp/cpp_managed/nfc/article.php/c14589/Hosting-WPF-Content-in-an-MFC-Application.htm

Maybe I can build a sample later this week.

Wolfgang