views:

461

answers:

4

I just installed the latest Mono framework and MonoDevelop.

When I create a new solution under C# there is no GUI based application.

How do I create an app that has a GUI and buttons etc

A: 

Did you create a solution with a GTK template?

eschneider
+2  A: 

If you are on Linux or Windows, the project type is called "Gtk# 2.0 Project". If you are on Mac, there is no visual designer for Gtk#, you will have to code it by hand.

jpobst
A: 

There are a number of bindings for Mono and Cocoa which allow you to build OS X apps using Mono with native looking interfaces.

Some time ago there was the Cocoa# project, which is still shipped with Mono, but is now dead on the water and no longer updated.

However, just a few days ago, I myself asked about the state of Cocoa# and other solutions were highlighted. The best (IMHO) is Monobj, which also has Monodevelop/IB templates.

Ira Rainey
A: 

If you're already familiar with WinForms and C# development using Visual Studio--and if you don't mind developing a GUI without a visual editor--then you can develop a WinForms application in MonoDevelop.

This tutorial should get you started: http://zetcode.com/tutorials/monowinformstutorial/firststeps/

After creating a new C# solution (File|New > Solution...), add references to System.Drawing and System.Windows.Forms (Project|Edit References...). In the constructor for your Form subclass you can define buttons and other controls. That should get you on your way.

There may still be bugs and odd quirks in MonoDevelop. For example, autocomplete for adding an event handler (such as MyButton.Click += HandleMyButtonClick) works if I insert a space after "+=", but not if I tab. Otherwise the environment should feel familiar.

Rethunk