public static async Task <ColorToWall> Create(Color color, int numberOfPixels, EventHandler <WallSelectorChangedEventArgs> selectedColorChanged)
        {
            var colorToWall = new ColorToWall();

            colorToWall.cbWall.ItemsSource         = await ColorToWall.Walls;
            colorToWall.cbWallColor.ItemsSource    = ColorToWall.Colors;
            colorToWall.DataContext.Color          = colorToWall.DataContext.SelectedColor = color;
            colorToWall.DataContext.NumberOfPixels = numberOfPixels;
            colorToWall.SelectedColorChanged      += selectedColorChanged;
            colorToWall.ProcessColorChange         = true;
            if (color.A == 0)
            {
                colorToWall.DataContext.SelectedWall = await WallItem.Create("Glass Wall");

                colorToWall.Wall_SelectionChanged(colorToWall, null);
            }
            return(colorToWall);
        }
        async void FindClosestColor_Click(object sender, RoutedEventArgs e)
        {
            // Show the overlay on the main window and show the Find Closest Color dialog box.
            var mainWindow = Window.GetWindow(this) as MainWindow;

            mainWindow.ShowOverlay(false);
            var findClosestColor = await FindClosestColor.Create(this.DataContext.Color);

            findClosestColor.Owner = mainWindow;
            if (findClosestColor.ShowDialog() ?? false)
            {
                // This will only happen if the user clicked OK in the Find Closest Color dialog box.
                this.ProcessColorChange       = false;
                this.DataContext.SelectedWall = await WallItem.Create(findClosestColor.DataContext.SelectedColorItem.WallName);

                this.DataContext.SelectedWallColor = findClosestColor.DataContext.SelectedColorItem.ColorName;
                this.ProcessColorChange            = true;
                this.Wall_SelectionChanged(this, null);
            }
            mainWindow.HideOverlay();
        }