if some function is running, when u want to change other tabs it should not happen, i need to give pop up like "please stop test and change tab"... how to do this
private async void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.OriginalSource == MainTabControl)
{
if (MainTabControl.SelectedIndex != -1)
{
if (SharedInfo.TestInProgress)
{
//e.Handled = true;
if (MainTabControl.SelectedIndex != 0)
{
MainTabControl.SelectedIndex = 0;
await this.ShowMessageAsync(
"Test is in Progress...",
"Let the test be completed...");
return;
}
}
}
}
}