Search code examples
winformsxamarin.iosmonomac

Can Managed.Windows.Forms be used in MonoTouch?


I have a .NET application that I am porting to Mono so it can run on both Mac and iOS. Currently my application uses System.Windows.Forms for mouse and keyboard events. In MonoMac I know I can just port the code over with minimal tweaks but can I do the same with MonoTouch?


Solution

  • System.Windows.Forms does not run on iOS using MonoTouch, as it (currently) relies on Carbon apis which are only present on OS X. Windows Forms is a desktop UI, and even if it did run on iOS via MonoTouch, your app would be unusable to say the least.

    You need to re-write the UI to use MonoTouch api's, which will provide a better experience for the user.