[Mono-osx] Menu Bar for Mac OS X?

Joanna Carter cocoasharp at carterconsulting.org.uk
Sun Apr 4 05:40:28 EDT 2010


Hi Elfen

> That seems strange...  Do you have any reference / documentation / tutorial about this?
> 
> Just to clarify, I'm not talking about MonoTouch for iPhone OS...  I'm talking about using the Mac OS X application menu / menu bar, so that my C# and .NET with Mono application will run on Windows (such as Windows 7), Linux, and Mac OS X...  And use the menu bar / application menu when on Mac OS X.

If you want an application that looks and feels correct on OS X, you will need to adhere to the Apple HIG. Java written apps do not usually comply unless they use Interface Builder to create the UI, neither will any "cross-platform" approach.

It is *very* important that you don't fall into the trap of thinking that you can design the UI for an application once and expect it to work correctly for Windows and OS X, there are just too many differences in style and design.

When working with development tools that use Mono, you need to separate out your functionality so that you can create separate controller classes for Windows, Linux and OS X. Apple makes extensive use of the MVC (Model View Controller) design pattern and it is nigh on impossible to create the correct UI for OS X unless you are prepared to also enforce the MVC design on your Windows and Linux versions as well.

The idea is to create the Model part of MVC in common C# assemblies as a class library, then to create separate applications that use the Model class library and design the Views and Controllers for each platform in those applications to use the common business logic of the Model.

Joanna

--
Joanna Carter
Carter Consulting



More information about the Mono-osx mailing list