It is possible to change the background color of an image in which this image is all white in xamarin.ios

0

I have an image that is white by default, is it possible to change this color via code?

  Cor ImagemFundobackground = CriarCor(RecursosCores.preto);  
  ImagemFundo.BackgroundColor =
  UIColor.FromRGB(ImagemFundobackground.Red,
  ImagemFundobackground.Green,  ImagemFundobackground.Blue);

Being CreateColor is a function that brings color from the resources UImageView is an element that is a UIImageView     

asked by anonymous 29.08.2018 / 17:22

1 answer

0

For the problem in question as the image was only white what I did was take the picture and assign a color:

  Cor ImagemFundobackground = CriarCor(RecursosCores.preto);  
  ImagemFundo.Image = null;
  ImagemFundo.BackgroundColor =
  UIColor.FromRGB(ImagemFundobackground.Red,
  ImagemFundobackground.Green,  ImagemFundobackground.Blue);
    
30.08.2018 / 11:33