mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using AppKit;
|
|
using Foundation;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.MacOS;
|
|
|
|
namespace Borepin.macOS
|
|
{
|
|
[Register("AppDelegate")]
|
|
public class AppDelegate : FormsApplicationDelegate
|
|
{
|
|
readonly 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)
|
|
{
|
|
Title = "Xamarin.Forms on Mac!", // choose your own Title here
|
|
TitleVisibility = NSWindowTitleVisibility.Hidden
|
|
};
|
|
}
|
|
|
|
public override NSWindow MainWindow
|
|
{
|
|
get { return window; }
|
|
}
|
|
|
|
public override void DidFinishLaunching(NSNotification notification)
|
|
{
|
|
Forms.Init();
|
|
LoadApplication(new App(new PlatformInitializer()));
|
|
base.DidFinishLaunching(notification);
|
|
}
|
|
}
|
|
} |