The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
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