1

I want to use an ImageBrush to use in the Rectangle.Fill. The file is a .PNG. It comes out looking like it is sitting on a little gray pad. The ImageBrush is returned from a converter with something like this:

        BitmapImage image = new BitmapImage(new Uri(fileName));
        ImageBrush imageBrush = new ImageBrush();
        imageBrush.ImageSource = image;
Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
jeff
  • 3,269
  • 3
  • 28
  • 45

1 Answers1

1

I was using this in a UserControl and it is either the UserControl or the Grid (that the rectangle sits in that is not transparent. The image\imagebrush is fine.

jeff
  • 3,269
  • 3
  • 28
  • 45
  • Does the Bitmap support transparency (have you called .MakeTransparent on the bitmap or used a ImageFormat with an alpha channel, such as a PNG)? Just a thought. – Dr1Ku Oct 18 '11 at 14:12