How can I programmatically set the button background for an image? I know how to do this in XAML, but I'm constantly stuck in the code, I tried
Button.Background = new ImageBrush{ ImageSource = "source" };
but then I get an error that the string could not be converted to ImageSource.
source
share