1)
In the OnStateChange()...SetDefaults... function
I write the code:
colorRSI = new SolidColorBrush(Color.FromArgb(50, 0, 255, 0)); //crBveryDarkGreen;
colorRSI.Freeze();
And I am thread safe even though the color is non standard.
Then in the OnBarUpdate() function
I write the code.
this.ColorRSIX = ColorRSI;
// this.ColorRSIX.Freeze(); this freezing code is commented out
or
base.BarBrushes[0] = ColorRSI;
Is this code thread safe?
2)
I don't find the equivalent of
SolidColorBrush(Color.FromArgb(100, colorRSI))
I used to be able to write
Color.FromArgb(100, colorRSI))
but now it gives error "No overload for method 'FromArgb' takes 2 arguments.
How can I take an existing standard color contained in a instance of a class and get an equivalent one with altered opacity ?
Thank you
G

Comment