Exemplo n.º 1
0
        private async void BtnFind_Click(object sender, RoutedEventArgs e)
        {
            TextToFind = TxtTextToFind.Text;
            if (string.IsNullOrEmpty(TextToFind) == false)
            {
                PgbProgress.Visibility  = Visibility.Visible;
                CancellationTokenSource = new CancellationTokenSource();
                Running           = true;
                BtnFind.IsEnabled = false;
                await TextControl.FindText(TextToFind, ProgressStatus, CancellationTokenSource.Token);

                Running                = false;
                BtnFind.IsEnabled      = true;
                PgbProgress.Visibility = Visibility.Hidden;
            }
        }