Search code examples
windows-phone-8windows-phone-8-emulator

how to change the background color of message box in WP8


Actually, windows phone provide default message box with black background. I am already using custom message box using its toolkit. It has background property but I am unable to assign any value. It gives type casting error.

hope so someone will tell the right value, I alreay tried (0,0,0,0) / "grey" / colors.grey but same error

CustomMessageBox msgbox = new CustomMessageBox()
{
Caption = "Memory Race",
Message ="This is custom message box!",
LeftButtonContent = "OK",
Background = "what?"
};

Solution

  • you can set backgroundcolor

    Background =  new SolidColorBrush(Colors.Green);