public OuterNavPage(OuterNavViewModel viewModel) { if (viewModel == null) { throw new ArgumentNullException("viewModel"); } _viewModel = viewModel; _viewModel.NavigateToItem += _viewModel_NavigateToItem; this.InitializeComponent(); NavigateToViewModel(_viewModel.SelectedNavItem); }
private void _viewModel_NavigateToItem(OuterNavViewModel source, INavItem navItem) { NavigateToViewModel(navItem); }