PDA

View Full Version : ExtSharp Article



cecilphillip
Apr 04, 2008, 1:22 PM
An interesting Ajaxian Article (http://ajaxian.com/archives/javascript-c-and-extsharp) that I thought might be of interest to the coolite community.
[/url]

[url]http://ajaxian.com/archives/javascript-c-and-extsharp (http://ajaxian.com/archives/javascript-c-and-extsharp)

geoffrey.mcgill
Apr 07, 2008, 8:07 AM
I thought it would be interesting to see how the Coolite Controls would be coded as per the samples provided in the Ajaxian post. The Examples below demonstrate using both C# (code-behind) and same control built in markup.

Example [C#]


Window win = new Window();
win.Title = "OrderViewer";
win.Width = 100;
win.Height = 200;
win.Modal = true;
win.Resizable = false;
win.Closable = false;
win.Draggable = false;
win.AutoShow = true;
win.Listeners.Render = new Listener("load(5)");

BorderLayout layout = new BorderLayout();
layout.EastRegion = frm;
layout.WestRegion = lst;

win.Controls.Add(layout);

this.form1.Controls.Add(win);

Example [markup]


<ext:Window
ID="Window1"
runat="server"
Title="OrderViewer"
Width="100px"
Height="200px"
Modal="true"
Resizable="true"
Closable="true"
Draggable="true"
AutoShow="true">
<Listeners>
<Render Handler="load(5)" />
</Listeners>
<Content>
<ext:BorderLayout runat="server">
<East>
<ext: Panel ID="frm" runat="server" Title="East Region" />
</East>
<West>
<ext: Panel ID="lst" runat="server" Title="West Region" />
</West>
</ext:BorderLayout>
</Content>
</ext:Window>

This sample demonstrates syntax from the upcoming Coolite 0.5.0 release.