// Function to Factorise the navigation code public void NavigateToView(IModule menu) { try { Log.Info("Navigate To View"); TileChildrenCollection = menu.GetTileChildren(menu.Color); string viewName = menu.UserInterface.GetType().Name; ChildMenuVisibility = System.Windows.Visibility.Visible; ChildMenuColor = menu.Color; CurrentView = viewName; Log.Info(CurrentView); Service.Navigate(viewName, null, this, true); } catch (Exception ex) { Log.Error(ex.Message); } }