locked
Change textblock foreground programatically RRS feed

  • Question

  • Hello,

    just started developing for WP8.1 and now I am stuck with this;

    textBlock.Foreground = new SolidColorBrush(Colors.White);
    

    Issue is that the "colors" does not exist in the current context. I have searched for a fix but no result.

    If anyone is able to help, it'd be appreciated.

    -Vincent

    Sunday, October 19, 2014 8:06 PM

Answers

  • Visual Studio will help you resolve it. Select/highlight "Colors" in your code and right click on it. In the popup menu, click on "Resolve" and select one of the options.

    • Marked as answer by Vincent Gio Sunday, October 19, 2014 8:42 PM
    Sunday, October 19, 2014 8:29 PM

All replies

  • Visual Studio will help you resolve it. Select/highlight "Colors" in your code and right click on it. In the popup menu, click on "Resolve" and select one of the options.

    • Marked as answer by Vincent Gio Sunday, October 19, 2014 8:42 PM
    Sunday, October 19, 2014 8:29 PM
  • Oh, neat. Thanks mate!
    Sunday, October 19, 2014 8:42 PM