locked
Set Foreground Color and Using System Resources RRS feed

  • Question

  • Hi, 

    I am attempting to set the foreground color on a button using C#, but I have not been able to find a way to do this (even the MS document does not work). Here is the code I am attempting to use: 

    ItemHDSCustodySignBtn.Foreground = Brushes.Blue;

    This code is invalid. Additionally, I would prefer to use the exact numeric value rather than the string name of the color. 

    My second problem is how I can apply a style to my button. I have a style that is accessible throughout the app, however, I cannot find documentation anywhere in how to do this in C# rather than XAML. 

    Thanks for your help with this. 

    Tuesday, June 24, 2014 5:48 PM

Answers

All replies