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; }
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; }
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); }
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); }
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; }
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; }
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); }
public static void Main() { Controls.App app = new Controls.App(); app.InitializeComponent(); app.Run(); }
public override Application CreateApplication() { _app = new Controls.App(); return(_app); }