Create a WPF Browser Application (XBAP) in PowerBuilder 12?

Can I create XBAP applications in Powerbuilder 12? I found out that powerbuilder 12 supports WPF, but am not sure about WPF Browser (XBAP) applications.

Any help or link is appreciated.

Thanks!

+4
source share
2 answers

So, since it has not yet been released, nothing official, but from what I heard about the announcements, this is not the intention in this release. Keep in mind that previous versions did not support .NET controls, but people like Bruce Armstrong have found creative ways to do this anyway .

The announced intention is to take a look at the new post-PB12 web solution (PB12 is already quite massive), but it is not 100% clear if they agree to XBAP, which is a logical extension from their WPF work or something like HTML5

Good luck

Terry.

+3
source

No, but you can convert the WPF application target to XBAP manually. I followed the steps to publish the classic PB application as an XBAP application, and it worked, but the application was very simple; don't know if this will work for you.

  • PB12.NET creates .csproj files that Visual Studio cannot read because they are UTF-16 and do not have a specification. You can fix this by opening them in a notebook and saving.

  • Then you need to convert the project from the WPF Window App to the WPF Browser application. This can be done as follows: http://www.charlespetzold.com/blog/2006/11/120718.html

  • PB generates a PBApplicationEntryPoint.cs file containing the main function (application entry point). Main calls the instance method of PBSession.RunWPFApp, which calls the instance method of System.Windows.Application.Run (), but this is not allowed in XBAP applications. I don’t know what RunWPFApp () does, but PresentationHost (the program that executes XBAP on the client computer) can launch the application if you delete this call and call the PBApplication.create () and .open () methods this way:

    Remove:
    session.RunWPFApp();
    Add:
    c__a_your_application_name.GetCurrentApplication().create(); c__a_your_application_name.GetCurrentApplication().open("");

  • For some reason, I do not know if you open any window after closing the window, you will get an exception and the program will be interrupted. The solution I found is to use MDI (in PB12.NET MDI is visually equal to TDI) and open tabbed windows using OpenSheet (WithParm).

  • The PB12.NET script relies on some native libraries (i.e.), and therefore the application must be fully trusted to use these libraries. This tutorial shows how to deploy full trusted XBAP (worked for me): http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust -application.aspx

  • The client computer must have the PB12.NET and .NET 3.5 SP1 run-time packages installed.

Sybase is more interested in supporting Silverlight than XBAP, so we'll probably never see the officially approved XBAP deployment feature.

Good luck.

0
source

Source: https://habr.com/ru/post/1306329/


All Articles