//Create a new WriteableBitmap WriteableBitmap bitmap = new WriteableBitmap(200, 200, 96, 96, PixelFormats.Rgb24, null); // Set pixels to black color for (int x = 0; x < 200; x++) { for (int y = 0; y < 200; y++) { bitmap.SetPixel(x, y, Colors.Black); } }The code example creates a new WriteableBitmap with a size of 200x200 and a pixel format of RGB24. It then uses a nested loop to iterate through each pixel and sets its color value to black using the SetPixel method. The SetPixel method belongs to the WriteableBitmapExtensions class in the System.Windows.Media.Imaging library.