Start Page

0
0

I created a sample application, and I’m a bit confused about the page structure.  I have only one form, and when I run the project, the form appears as a child window.  How do you add controls to the main, underlying page?

  • You must to post comments
0
0

Hi Danny,

The default project template creates a child window by default. It doesn’t create the main page or main desktop. We are adding more templates.

In Wisej there are 3 top level controls and a main canvas HTML page:

  • The main HTML page is default.html or [application-name].html. You can use it as you’d use any html (aspx, cshml) page. It will always be the “canvas” where all wisej widgets are rendered. This is usually left blank, or with a company logo, background, etc.
  • Floating windows (Form), they are always on top of the Default.html page, or on top of the main page (Application.MainPage) or as children of the desktop (Application.Desktop).
  • A single main page: Application.MainPage. It’s a Wisej.Web.Page control. Add-NewItems->Wisej->Page. When you show a page (new Page1().Show()) it automatically becomes the main page (Application.MainPage). You don’t have to have a main page and it can be null. You can navigate from page to page either by showing a new page or by assigning Application.MainPage. See ChartJS or Buttons, or BackgroundTasks in https://wisej.com/examples/.
  • A single desktop: Application.Desktop. It’s a Wisej.Web.Desktop control. Add->NewItem->Wisej.Desktop. You can either create the default desktop: Application.Desktop = new Desktop(), or create your own. See UserDesktop sample. A desktop control can also be a child of a Wisej.Web.Page in case you want to develop a page “frame” and a desktop inside it. All Wisej.Web.Form are always children of the active Desktop if there is one.

In your sample app, add a Wisej.Web.Page control, open it in design mode, add controls, then in Program.Main() add new Page1().Show() – or Application.MainPage = new Page1(), the two are equivalent.

HTH

Best,

Luca

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.