2009-10-20 Chris Toshok <toshok@ximian.com>
[moon.git] / examples / standalone-sample / Main.cs
blobfd46524000454438eacafb4648dd791b8b52f26e
1 //
2 // Main.cs
3 //
4 // A sample standalone program showcasing the xaml embedding/class resolving
5 // capabilities.
6 //
7 // Authors:
8 // Michael Dominic K. (mdk@mdk.am)
9 //
10 // Copyright 2008 Novell, Inc. (http://www.novell.com)
12 // See LICENSE file in the Moonlight distribution for licensing details
14 using System;
15 using System.IO;
16 using System.Net;
17 using System.Xml;
18 using Gtk;
19 using Gtk.Moonlight;
21 namespace StandaloneSample {
23 public static class StandaloneSample {
25 public static int Main (string [] args)
27 Application.Init ();
28 GtkSilver.Init ();
30 Window window = new Window ("My Canvas");
31 window.DeleteEvent += DeleteEventHandler;
33 GtkSilver silver = new GtkSilver (400, 400);
34 silver.LoadFile ("MyCanvas.xaml");
36 window.Add (silver);
37 window.ShowAll ();
38 Application.Run ();
40 return 0;
43 public static void DeleteEventHandler (object o, DeleteEventArgs args)
45 Application.Quit ();