private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var selectedId = (sender as ListBox).SelectedIndex;
     Problems clickedProblem = (Problems)listofitems[selectedId];
     var navCont = new CodeEditorContext(clickedProblem, "Problems");
     Frame.Navigate(typeof(CodeEditor), navCont);
 }
 private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     Examples clickedExample = (Examples)(sender as ListBox).SelectedItem;
     var navCont = new CodeEditorContext(clickedExample, "Examples");
     Frame.Navigate(typeof(CodeEditor), navCont);
 }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            navParam = e.Parameter as CodeEditorContext;

            if (navParam.tableName != "Problems")
            {
                CommandBar bottomCommandBar = this.BottomAppBar as CommandBar;
                AppBarButton b = bottomCommandBar.PrimaryCommands[0] as AppBarButton;
                //b.Click -= Solution;
                bottomCommandBar.PrimaryCommands.RemoveAt(0);
            }

            createHtmlFileInLocalState();
            this.navigationHelper.OnNavigatedTo(e);
        }