コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: zmtzawqlp/maui
        public MainPage()
        {
            InitializeComponent();

            // some tests need to window to be large enough to click on things
            // can we make this only open to window size for UI Tests?
            //var bounds = ApplicationView.GetForCurrentView().VisibleBounds;
            //var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
            //var size = new global::Windows.Foundation.Size(bounds.Width * scaleFactor, bounds.Height * scaleFactor);
            //ApplicationView.PreferredLaunchViewSize = size;
            //ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;


            _app = new Controls.App();

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);

            // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
            MessagingCenter.Subscribe <NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);

            LoadApplication(_app);

            CoreWindow.GetForCurrentThread().KeyDown += OnKeyDown;
        }
コード例 #2
0
        public MainPage()
        {
            InitializeComponent();

            if (Xamarin.Forms.ControlGallery.WindowsUniversal.App.RunningAsUITests)
            {
                var bounds      = ApplicationView.GetForCurrentView().VisibleBounds;
                var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
                var size        = new Windows.Foundation.Size(bounds.Width * scaleFactor, bounds.Height * scaleFactor);
                ApplicationView.PreferredLaunchViewSize      = size;
                ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
            }


            _app = new Controls.App();

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);

            // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
            MessagingCenter.Subscribe <NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);

            LoadApplication(_app);

            CoreWindow.GetForCurrentThread().KeyDown += OnKeyDown;
        }
コード例 #3
0
        public MainPage()
        {
            InitializeComponent();

            var app = new Controls.App();

            var mdp = app.MainPage as MasterDetailPage;

            var detail = mdp?.Detail as NavigationPage;

            if (detail != null)
            {
                detail.Pushed += (sender, args) => {
                    var nncgPage = args.Page as NestedNativeControlGalleryPage;

                    if (nncgPage != null)
                    {
                        AddNativeControls(nncgPage);
                    }

                    var nncgPage1 = args.Page as NativeBindingGalleryPage;

                    if (nncgPage1 != null)
                    {
                        AddNativeBindings(nncgPage1);
                    }
                };
            }

            LoadApplication(app);
        }
コード例 #4
0
        public MainPage()
        {
            InitializeComponent();

            var app = new Controls.App();

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);

            LoadApplication(app);
        }
コード例 #5
0
        public MainWindow()
        {
            InitializeComponent();

            Xamarin.Forms.Platform.WPF.Forms.Init();

            Controls.App app = new Controls.App();

            Platform.WPF.Platform platform = app.MainPage.GetPlatform(this);;

            cp.Content = (UIElement)platform;
        }
コード例 #6
0
        public MainPage()
        {
            InitializeComponent();



            _app = new Controls.App();

            // When the native control gallery loads up, it'll let us know so we can add the nested native controls
            MessagingCenter.Subscribe <NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);

            // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
            MessagingCenter.Subscribe <NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);

            LoadApplication(_app);

            CoreWindow.GetForCurrentThread().KeyDown += OnKeyDown;
        }
コード例 #7
0
ファイル: MainPage.xaml.cs プロジェクト: Costo/Xamarin.Forms
		public MainPage ()
		{
			InitializeComponent ();

			var app = new Controls.App ();

			var mdp = app.MainPage as MasterDetailPage;

			var detail = mdp?.Detail as NavigationPage;
			if (detail != null) {
				detail.Pushed += (sender, args) => {
					var nncgPage = args.Page as NestedNativeControlGalleryPage;

					if (nncgPage != null) {
						AddNativeControls (nncgPage);
					}
				};
			}

			LoadApplication (app);
		}
コード例 #8
0
ファイル: App.g.i.cs プロジェクト: Shoop123/Reworder-C-Sharp
 public static void Main() {
     Controls.App app = new Controls.App();
     app.InitializeComponent();
     app.Run();
 }
コード例 #9
0
ファイル: MainPage.xaml.cs プロジェクト: gywerd/CPUI
 public override Application CreateApplication()
 {
     _app = new Controls.App();
     return(_app);
 }
コード例 #10
0
 public static void Main()
 {
     Controls.App app = new Controls.App();
     app.InitializeComponent();
     app.Run();
 }