[SOLVED] A desktop Wisej application - Theme Builder

Answered Closed


All this theming made me explore the Theme Builder and think about how it works. It must embed some browser engine, so it can execute Javascript. Click on the “Edit custom preview script” button to see what I mean. On the other hand, there is no server, not even an embedded one. So we have an Wisej application running out of browser. Some parts of Theme Builder run under Wisej and I guess some other parts run under Windows Forms (like loading and saving themes).

What if the dynamic Wisej team could turn the solution used on this tool into a build option? Remember you could (can) build Silverlight to run as a Web application or as an Out of Browser application.

You could use the exact same source code to build for the desktop (no web server needed) or for the web. Since this wouldn’t be a true desktop application, there would be some restrictions like you get on a web application:

  1. you can’t drag a window outside of the browser area;
  2. you can’t interact directly with computer hardware (USB port, scanner, printer, etc)…

Then again, the Javascript running in the browser engine can’t interact with computer hardware but no restrictions apply on the C# dll.

Can it be done?

Sending JSON packets to the browser engine doesn’t seem to be the hard part. When you change a property on the left side list, the display gets updated according to the new value (provided Live Update is on).

I would say that getting the browser’s response on the C# code would be the difficult part. Maybe it’s not that hard: when you click on a visual element, the corresponding component gets selected on the left side list.

So I think it’s mostly done.


  • You must to post comments
Best Answer

Hi Tiago,

We do have plans for later to distribute an extension to package a full Wisej app into a single executable in two flavors:

  • Desktop application: Runs locally, opens a browser in a customizable frame.
  • Embedded server: Starts a server process and can serve multiple sessions to clients, doesn’t need any IIS or other installations.

In both cases the executable will run an internal web server. It’s a lot easier and more flexible than trying to manage the browser directly.

We handle the browser through a combination of OLE interfaces, scripts, and callbacks in the theme builder and the designers. It works but it’s limited. Also the designer already has an internal web server to support the renderer. The theme builder doesn’t, it simply injects the theme on every change.



  • You must to post comments
Showing 1 result