Stylus Epson

Stylus Epson

  • NA
  • 7
  • 486

Give a Togglebutton this Color "#FF5D0000" in the MainWindow

Dec 4 2017 4:03 AM
Hello Folks
 
I want to give mij text on my button a customized color in the MainWindow.xaml.cs
 
Normally you give the color in the cs file by this way to the  command:
 
ToggleButton.Foreground = Brushes.Green; 
 
But I want to give the hexnumber
 
I've already tried something like this :
 
SolidColorBrush Owncolor = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF5D0000"));
ToggleButton.Foreground = Brushes.Owncolor; 
 
Please can someone help me?
 
Thanks in advance
 
Greetings
 
Stylus

Answers (1)