for example i have button in my window with name "mybutton" and a textbox for writing code. in runtime if i write
mybutton.Foreground = new SolidCol