如何在WP8中更改消息框的背景颜色 [英] how to change the background color of message box in WP8
本文介绍了如何在WP8中更改消息框的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实际上,Windows Phone 提供黑色背景的默认消息框.我已经在使用它的工具包使用自定义消息框.它具有背景属性,但我无法分配任何值.它给出了类型转换错误.
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.
希望有人能说出正确的值,我已经尝试过 (0,0,0,0)/"grey"/colors.grey 但同样的错误
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?"
};
推荐答案
可以设置背景色
Background = new SolidColorBrush(Colors.Green);
这篇关于如何在WP8中更改消息框的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文