mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-13 23:31:48 +01:00
34 lines
1006 B
C#
34 lines
1006 B
C#
|
using AppKit;
|
|||
|
using Foundation;
|
|||
|
using Xamarin.Forms;
|
|||
|
using Xamarin.Forms.Platform.MacOS;
|
|||
|
|
|||
|
namespace Borepin.macOS
|
|||
|
{
|
|||
|
[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 = "Xamarin.Forms on Mac!"; // choose your own Title here
|
|||
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|