[Mono-osx] Stetic GUI designer for Mac OS?

Joanna Carter cocoasharp at carterconsulting.org.uk
Wed Mar 3 12:39:01 EST 2010


Hi Ralf

> I'm absolutely new to Mac OS (Snow Leopard) and MonoDevelop. My MacBook is
> now 3 days old:-)
> I have been developing under Visual Studio for about 6 years and now I want
> to give mono a try.

Welcome to the clan of wannabe Mac programmers :-)

Having trodden that same route, Can I tell you that you have to change your thinking a little bit if you are going to ceate proper, native look and feel, Mac apps.

Don't even attempt to create either Winforms or Gtk apps for a Mac, they don't look or feel right.

> My problem is that there seems to be no visual designer for Mac. Is that
> right? The corresponding C# template for a Gtk2 project is also missing.
> I've been searching a whole day but I couldn't find anything:-(

The normal way to develop the UI for a Mac app is to use the Interface Builder tool that comes with the Mac development tools, delivered free with every Mac.

> Or do I have to learn Objective-C? That would be bad. I would like to
> program in C#.

Yes, you can program in C#, using Mono and the Monobjc bridge to talk to the wealth of Cocoa libraries that you will need to create a "native" looking app.

Be warned that, although you will be using C# as a language, you will not be able to use a great many of the .NET library classes when dealing with a Cocoa UI. You will find the Monobjc bridge framework is the way to go and that your code will end up resembling Objective-C, mainly due to the fact that the method names, although in C# syntax, will look unusual in their signatures when compared with .NET classes.

Of course, all your non-GUI classes can be written in pure .NET framework C#, but do be aware that one of the great powers of the Cocoa frameworks is its binding mechanism, which requires every C# class, to which you wish to bind, to be marked with Monobjc attributes for them to visible to the Cocoa side of the Monobjc bridge.

> Please don't tell me I have to create all the gui objects by hand in the
> code (if that's possible).

It is possible but not necessary.

Joanna

--
Joanna Carter
Carter Consulting


More information about the Mono-osx mailing list