(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

How to create a Visual WebGui Silverlight 2 application

(1 votes)
Joined Nov 15, 2008
Articles:   4
Comments:   2
More Articles
1 comments   /   posted on Nov 18, 2008
Tags:   visual-webgui
Categories:   General

In this “How to” we are going to learn how to create a Visual WebGui Silverlight Application.

After installing Visual WebGui we will open Visual Studio and create a new Visual WebGui Silverlight application.

We’ll open the Main form “Form1.cs” in designer mode. 

Now we’ll add a few Visual WebGui controls to display the richness of a Visual WebGui Silverlight application.

First we’ll add a TextBox. As you can see Visual WebGui design time mimics .Net Windows forms design time abilities.


Lets add a few more controls to our application. 

Next we’ll build the application to allow the VWG Silverlight packaging tool to build the application Silverlight packages. you will be prompted to set the solution that this project is related to.

After selecting the solution you will see the Visual WebGui Silverlight Packaging tool that will allow you to modify the package structure of your application.
We can see the primary package (the orange folder) that will be download to the client at the initial connection and holds the base of the VWG Silverlight application. The rest of the minor packages will be download on a need to base according to user actions to save on communication.

Press ok and you can see the result of the packaging tool in the Web.Config file and the ClientBin folder.

<Themes Selected="Blend">
  <Theme Name="Default" Assembly="Gizmox.WebGUI.Themes.Vista" SilverlightAssembly="Gizmox.WebGUI.Silverlight.Themes.Default, Version=, Culture=neutral, PublicKeyToken=null" />
  <Theme Name="Blend" Assembly="Gizmox.WebGUI.Themes.Vista" SilverlightAssembly="Gizmox.WebGUI.Silverlight.Themes.Blend, Version=, Culture=neutral, PublicKeyToken=null" />
  <Theme Name="XP" Assembly="Gizmox.WebGUI.Themes.Vista" SilverlightAssembly="Gizmox.WebGUI.Silverlight.Themes.XP, Version=, Culture=neutral, PublicKeyToken=null" />
<!--  WebGUI Silverlight Client Packages  -->
<SilverlightPackages primary="MyFirstApp">
  <SilverlightPackage name="MyFirstApp">
    <Assembly name="Gizmox.WebGUI.Silverlight.Common, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Gizmox.WebGUI.Silverlight.Controls, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Gizmox.WebGUI.Silverlight, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="System.Windows.Controls.Data, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <Assembly name="System.Windows.Controls.Extended, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <Assembly name="Gizmox.WebGUI.Silverlight.Themes.Default, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Gizmox.WebGUI.Silverlight.Themes.Blend, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Gizmox.WebGUI.Silverlight.Themes.XP, Version=, Culture=neutral, PublicKeyToken=null" />
  <SilverlightPackage name="Gizmox.WebGUI.Silverlight.Controls.Extended">
    <Assembly name="Gizmox.WebGUI.Silverlight.Controls.Extended, Version=, Culture=neutral, PublicKeyToken=null" />
  <SilverlightPackage name="Gizmox.WebGUI.Silverlight.Controls.Charts">
    <Assembly name="Gizmox.WebGUI.Silverlight.Controls.Charts, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Visifire.Charts, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="Visifire.Commons, Version=, Culture=neutral, PublicKeyToken=null" />
    <Assembly name="VisifireCharts, Version=, Culture=neutral, PublicKeyToken=null" />
  <SilverlightPackage name="Gizmox.WebGUI.Silverlight.Controls.Office">
    <Assembly name="Gizmox.WebGUI.Silverlight.Controls.Office, Version=, Culture=neutral, PublicKeyToken=null" />

The packaging tool from now will run is silent mode and will not be visible to you when you compile. Every change you make and new projects that you will add will be included into the project in the primary package. At this point we’ll not go into the process of configuring the package structure of a Visual WebGui Silverlight application we’ll have a full “How To” about that.  But if you need to change the structure you can run the tool manually from the programs in the start menu and select the project you need to edit.

Now we can run our Visual WebGui application but first let set the application entry point.
Right click on the project and select properties.

Go to the Web tab and set the start action to “Specific Page” and add you main form with the Visual WebGui silverlight extension “ swgx “.


Now we can run our application Visual WebGui Silverlight application in explorer.

 And we can also view our application in FireFox

We can easily change the theme of our application by editing our web.config file. In the Theme section in the web.config file will change the select them from default to xp.

<Themes Selected="XP">

And refresh our application



In this “How to” we’ve seen that Visual WebGui framework enables developers to create cross browser Silverlight applications while using visual studio .Net windows forms design time abilities.

We’ve also seen how easy it is to apply different themes in our Silverlight Visual WebGui application

-- Eyal Albert @ Eyal.Albert (at) Gizmox.com



  • Todd6940

    RE: How to create a Visual WebGui Silverlight application

    posted by Todd6940 on Dec 03, 2008 12:05

    Hi, I just creatred a VB project. I added some controls to form1.swgx, but when I run it the page is blank. What am I doing wrong?


Add Comment

Login to comment:
  *      *