Esempio n. 1
0
        public static void Main(string[] args)
        {
            Gtk.Application.Init ();
              Mono.MoonDesk.MoonBase.Init();

              var anames = Application.Current.GetType().Assembly.GetReferencedAssemblies();
              foreach ( var aname in anames ){
            Console.WriteLine("load {0}", aname );
            var a = Assembly.Load( aname );
            Mono.MoonDesk.MoonBase.Assemblies.Add( a );
              }
              var asm = System.Reflection.Assembly.LoadFile("/usr/local/lib/mono/moonlight/System.Windows.Controls.dll");
              Mono.MoonDesk.MoonBase.Assemblies.Add( asm );

              IWindow win = new Mono.MoonDesk.AWindow();

              ViewMappings.Resolver =  new ViewLoader( win.Host );

              var homevvm = ViewMappings.Resolver.LoadViewViewModel<HomeViewModel>("/Views;component/Views/Home.xaml");
              win.Content = homevvm.View;

              win.Show ();
              win.Resize( 440,350 );
              Gtk.Application.Run ();
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            Gtk.Application.Init();
            Mono.MoonDesk.MoonBase.Init();

            var anames = Application.Current.GetType().Assembly.GetReferencedAssemblies();

            foreach (var aname in anames)
            {
                Console.WriteLine("load {0}", aname);
                var a = Assembly.Load(aname);
                Mono.MoonDesk.MoonBase.Assemblies.Add(a);
            }
            var asm = System.Reflection.Assembly.LoadFile("/usr/local/lib/mono/moonlight/System.Windows.Controls.dll");

            Mono.MoonDesk.MoonBase.Assemblies.Add(asm);

            IWindow win = new Mono.MoonDesk.AWindow();

            ViewMappings.Resolver = new ViewLoader(win.Host);


            var homevvm = ViewMappings.Resolver.LoadViewViewModel <HomeViewModel>("/Views;component/Views/Home.xaml");

            win.Content = homevvm.View;

            win.Show();
            win.Resize(440, 350);
            Gtk.Application.Run();
        }
Esempio n. 3
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var win = new Mono.MoonDesk.AWindow();

            var home = ViewMappings.Resolver.LoadViewViewModel<HomeViewModel>("/Views;component/Views/Home.xaml");
            win.Content = home.View;
            home.View.Visibility = Visibility.Visible;
            win.Show();
            win.Resize(420, 200);
            win.Title = "Hello Moon";
            ((Window)win).ResizeMode = ResizeMode.NoResize;
        }
Esempio n. 4
0
        protected override void  OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var win = new Mono.MoonDesk.AWindow();

            var home = ViewMappings.Resolver.LoadViewViewModel <HomeViewModel>("/Views;component/Views/Home.xaml");

            win.Content          = home.View;
            home.View.Visibility = Visibility.Visible;
            win.Show();
            win.Resize(420, 200);
            win.Title = "Hello Moon";
            ((Window)win).ResizeMode = ResizeMode.NoResize;
        }