0

I am using user input images as the Frame Background in my app and I want to darken the image. Reducing opacity does the opposite and brightens the image as the Window color is white on Desktop and not black and I can't see any function to change the color of window.

  • Changing TitleBar Color doesn't work.
  • Changing the RequestedTheme from Light to Dark doesn't change the color.
  • Processing the image to darken is too slow and can't be used.

Here's the code to change the Frame background where 'image' is my BitmapImage object.

ImageBrush b = new ImageBrush();
b.ImageSource = image;
b.Stretch = Stretch.UniformToFill;
(Window.Current.Content as Frame).Background = b;

I need to use the Background on Frame and not on Page as navigation to other pages needs to be smooth and keep the background in place.

Akshay Jain
  • 884
  • 5
  • 19
  • 4
    The way I have done this is to put another control over the image such as a rectangle and set the fill color to black and set the opacity of the rectangle to darken the image. – Jon May 26 '16 at 22:17
  • That's one of the solution but as I mentioned I need to use the background on Frame. If I add a rectangle on the page above the Frame background, the rectangle animates on Navigation and isn't as smooth. – Akshay Jain May 27 '16 at 06:00

0 Answers0