| 12345678910111213141516171819202122232425262728293031323334 |
- using AppKit;
- using Foundation;
- using Xamarin.Forms;
- using Xamarin.Forms.Platform.MacOS;
- namespace macOSForms
- {
- [Register("AppDelegate")]
- public class AppDelegate : FormsApplicationDelegate
- {
- NSWindow _window;
- public AppDelegate()
- {
- var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
- var rect = new CoreGraphics.CGRect(200, 1000, 1024, 768);
- _window = new NSWindow(rect, style, NSBackingStore.Buffered, false);
- _window.Title = "TipCalc";
- _window.TitleVisibility = NSWindowTitleVisibility.Hidden;
- }
- public override NSWindow MainWindow
- {
- get { return _window; }
- }
- public override void DidFinishLaunching(NSNotification notification)
- {
- Forms.Init();
- LoadApplication(new App());
- base.DidFinishLaunching(notification);
- }
- }
- }
|