private async void Page_Loaded(object sender, RoutedEventArgs e) { if (_speakersLoaded == false) { MainWindow window = (MainWindow)Application.Current.MainWindow; _serviceClient = new SpeechIdServiceClient(window.ScenarioControl.SubscriptionKey); await UpdateAllSpeakersAsync(); } }
/// <summary> /// Constructor to initialize the Identify File page /// </summary> public IdentifyFilePage() { InitializeComponent(); _speakersListFrame.Navigate(SpeakersListPage.SpeakersList); MainWindow window = (MainWindow)Application.Current.MainWindow; _serviceClient = new SpeechIdServiceClient(window.ScenarioControl.SubscriptionKey); }