Reputation: 832
I'm a newcomer to the world of Windows Phone development. I've googled and looked up the Windows Phone documentation but I still can't find what I'm looking for (or I probably missed it).
My question is how can I have a custom hex/rgb background color instead of the predefined colors the Windows Phone SDK gives? Is it possible?
Upvotes: 1
Views: 431
Reputation: 8161
Sure it can, otherwise everyone apps would look the same :D
using using System.Windows.Media;
Color pure_red = Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); // alpha,red,green,blue
sometimes an UI element wants a Brush
instead, if that is the case then you want something like this
this.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
good luck :D
Upvotes: 1