I would like for my app to read out text from a page when the user asks Cortana. The text that populates my MainPage however comes from SQLite like below when the user clicks on it from another page.
private void gridView_SelectionChanged(object sender, ItemClickEventArgs e)
{
var user = e.ClickedItem as Cars;
this.Frame.Navigate(typeof(MainPage), user.ID.ToString());
}
The problem is in App.xaml.cs when I want Cortana to navigate to that page I use:
rootFrame.Navigate(typeof(MainPage));
MainPage page = rootFrame.Content as MainPage;
So this doesn't go to the MainPage I have open on my screen that contains the Car details from SQLite that I click on, and therefore the app can't execute the method I want to read the data from the page. Is there any way to fix this? Thanks.
Aucun commentaire:
Enregistrer un commentaire