ImageBrush brush = new ImageBrush(); // create new ImageBrush object brush.ImageSource = new BitmapImage(new Uri("image.png", UriKind.Relative)); // set the ImageSource property to an image brush.Freeze(); // freeze the ImageBrush objectIn this example, we create an ImageBrush object and set its ImageSource to an image. We then call the Freeze() method to create a frozen copy of the ImageBrush object. The package library for System.Windows.Media.ImageBrush is part of the .NET Framework.