1

I'm making a Windows Store Metro application and I have some issues..

I want to set the color of a control in C++ but I can't figure out how to do it..

I have the following code now:

txt1->Background = ?

1 Answers1

0

I have the solution, first make a brush object and set the color and assign that color to your controls background. I used the following:

SolidColorBrush^ myBrush = ref new SolidColorBrush(Windows::UI::Colors::Red);
TextBox^ txtID = ref new TextBox();
txtID->Background = myBrush;

Link to my question: How to set a background color of a control in windows 8 store application

Community
  • 1
  • 1
Napokue
  • 105
  • 13