Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);

            bizLogic = new BizLogic(this);
            if (savedInstanceState == null)
            {
                var currentView = bizLogic.GetCurrentView();
                System.Diagnostics.Debug.WriteLine(currentView);
                NavigateTo(currentView);
            }
        }
Example #2
0
        public MainPage()
        {
            this.InitializeComponent();

            ApplicationView.PreferredLaunchViewSize = new Size {
                Width = 480, Height = 640
            };
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;

            bizLogic = new BizLogic(this);

            var app = Application.Current as App;

            app.BizLogic = bizLogic;

            ContentFrame = new Frame();
            GridContent.Children.Add(ContentFrame);
            var viewName = bizLogic.GetCurrentView();

            ContentFrame.Navigate(stringToPage[viewName]);
        }