Currently, I have a binding from a textblock in XAML to a Brush variable in the code. If I set this variable statically, before I run the code, it will change it correctly. However, if I change the variable during runtime, on a click for example, the textblock doesn't update. Is there some function that needs to be used to update the window or something like that?
My guess is that you change to color without notifying. The binding cannot know the color changed.
What you need to do is implement the INotifyPropertyChanged interface and raise the propertyChanged event in the Color property' setter. This way, your binding will work as expected. (look at this : https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx)
Another way is to implement Color as a dependency property. That way, you won't have to implement the INotifyPropertyChanged interface./
Have a look at this :