コード例 #1
0
ファイル: Window.macOS.cs プロジェクト: terwoord/uno
        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();
        }
コード例 #2
0
ファイル: Window.iOS.cs プロジェクト: nepronen/Uno
        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);
        }
コード例 #3
0
        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();
        }