Beispiel #1
0
        private void ConnectMasterViewModel(NavigationControllerViewModel viewModel)
        {
            _viewModel = viewModel;

            if (_viewModel.CurrentPage == null)
            {
                throw new NotSupportedException("You must specify a current page for the master navigation controller.");
            }

            BarBackgroundColor = viewModel.NavigationBarColour;
            BarTextColor       = viewModel.NavigationBarTextColour;
            this.SetBinding(BarBackgroundColorProperty, "NavigationBarColour");
            this.SetBinding(BarTextColorProperty, "NavigationBarTextColour");

            var page = _viewFactory.CreatePage(_viewModel.CurrentPage);

            PushAsync(page);
        }
Beispiel #2
0
 private void DisconnectCurrentModel()
 {
     _viewModel = null;
 }