AmazonScrape.MainWindow.ShowSearchProgressGrid C# (CSharp) Method

ShowSearchProgressGrid() private method

Replaces the search controls with "search progress" controls when a user searches A cancel button and a text area that displays which items were excluded from the results.
private ShowSearchProgressGrid ( ) : void
return void
        private void ShowSearchProgressGrid()
        {
            SearchLayoutGrid.Visibility = System.Windows.Visibility.Hidden;
            SearchProgressGrid.Visibility = System.Windows.Visibility.Visible;

            DataLayoutGrid.ColumnDefinitions[0].Width = new GridLength(84, GridUnitType.Star);
            DataLayoutGrid.ColumnDefinitions[1].Width = new GridLength(1, GridUnitType.Star);
            DataLayoutGrid.ColumnDefinitions[2].Width = new GridLength(15, GridUnitType.Star);

            // The initial page load can take a few moments, so make the
            // progress bar animate to show that work is being done.
            SolidColorBrush bg = new SolidColorBrush(Colors.Black);
            Progress.Background = bg;

            ColorAnimation animation = new ColorAnimation()
            {
                From = Colors.Black,
                To = Colors.Gray,
                Duration = TimeSpan.FromMilliseconds(750),
                RepeatBehavior = RepeatBehavior.Forever,
                AutoReverse = true,
            };

            bg.BeginAnimation(SolidColorBrush.ColorProperty, animation);

            CancelButton.Focus();
        }