In such case I would recommend you as first to create two configuration objects for your horizontal value bar. The default configuration object is fix preconfigured with the green images so it can't change the colors. Please se the section: Customize your own Horizontal Value Bar.
The idea here: you provide one configuration object for a green slider and a second fro red slider. Then when you change the current value of the value bar you additionally test whether the value is above/below some threshold. Depending on the result of thios test you modify the property Appearance of the horizontal value bar - you assign the right configuration object. For example:
var int32 newValue = ...
HorizontalValueBar.CurrentValue = newValue;
if ( newValue > 50 )
HorizontalValueBar.Appearance = Your_ConfigurationObject_Red;
else
HorizontalValueBar.Appearance = Your_ConfigurationObject_Green;
Regarding your second question, please see the documentation:
Implementing component interface
Creating a property and implementing an onset method
Using Property Observer
The last two document links describe the aspects in context of an interface between GUI and the target device. These concepts can however also be used to manage data internally within the GUI application. Just ignore the native sections to exchange the data with the target. Limit to create Device Driver class and add all the desired properties to it.
Best regards
Paul Banach