5

I was looking at Silverlight for building a "cross platform" desktop application (Windows and Mac anyway), but there is one show stopper that I cannot find a workaround for. On the Mac OS, in Adobe AIR, the AIR apps have a way to modify the main window's menu on the Mac OS's menu bar (File, Edit, View, Help, etc). I cannot find a way to do this from a Silverlight OOB.

For Windows obviously I could just make my own menu right in XAML and use that. However, this does not fit in at all with the Mac OS and it will look very funky to Mac users. This may not be a show stopper for many people, but for me it is. What can I possibly do to get around this short of waiting for Microsoft to implement it? (Which I doubt they ever will.)

The only thing I can think of is to build my own OS X app with a single window that has a WebView in it and then navigate that to my silverlight app. However, I lose full trust elevation at that point which really sucks.

Wayne Bloss
  • 5,370
  • 7
  • 50
  • 81
  • 1
    One option is to separate the GUI and use MonoMac on OSX and Silverlight/Winforms on Windows. – kenny Mar 23 '11 at 22:17
  • Silverlight does everything I need it to except for modifying that one menu. It would be such a shame if I have to build 2 completely different UI projects just because of that one little feature. This is so frustrating. There is nothing GREAT out there for cross platform UIs, but Silverlight comes pretty close. – Wayne Bloss Mar 24 '11 at 01:04
  • Yeah, no silver bullet. Does Silverlight on the Mac allow you to call anything local, like a script? Maybe you can build a small OSX for that one feature...does seem like a shame though. – kenny Mar 24 '11 at 13:47
  • Wrapping it in a mac application seems a good solution. I'd try that out. – texmex5 Apr 26 '11 at 10:16

1 Answers1

0

Create the menu bar in XAML, but only show it if you're running on Windows.

See https://stackoverflow.com/a/1429517/270348 for code about how to tell whether or not you're running on Mac.

Community
  • 1
  • 1
RobSiklos
  • 8,348
  • 5
  • 47
  • 77