public Window() { var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled | NSWindowStyle.Miniaturizable; var preferredWindowSize = ApplicationView.PreferredLaunchViewSize; if (preferredWindowSize != Windows.Foundation.Size.Empty) { var rect = new CoreGraphics.CGRect(100, 100, (int)preferredWindowSize.Width, (int)preferredWindowSize.Height); _window = new Uno.UI.Controls.Window(rect, style, NSBackingStore.Buffered, false); } else { var rect = new CoreGraphics.CGRect(100, 100, 1024, 768); _window = new Uno.UI.Controls.Window(rect, style, NSBackingStore.Buffered, false); } _mainController = ViewControllerGenerator?.Invoke() ?? new RootViewController(); ObserveOrientationAndSize(); Dispatcher = CoreDispatcher.Main; CoreWindow = new CoreWindow(_window); _window.CoreWindowEvents = CoreWindow; InitializeCommon(); }
public Window() { _window = new Uno.UI.Controls.Window(); _mainController = ViewControllerGenerator?.Invoke() ?? new RootViewController(); _mainController.View.BackgroundColor = UIColor.White; _mainController.NavigationBarHidden = true; ObserveOrientationAndSize(); Dispatcher = CoreDispatcher.Main; CoreWindow = new CoreWindow(_window); }
public Window() { var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled; var rect = new CoreGraphics.CGRect(100, 100, 1024, 768); _window = new Uno.UI.Controls.Window(rect, style, NSBackingStore.Buffered, false); _mainController = ViewControllerGenerator?.Invoke() ?? new RootViewController(); ObserveOrientationAndSize(); Dispatcher = CoreDispatcher.Main; CoreWindow = new CoreWindow(_window); InitializeCommon(); }