Hello,
I am trying to have a MultiStopLinearGradient for a Bar marker in a Linear gauge, going from Green to Red, stepping through Yellow. I can't find a way, so far, to get the gradient working the way I need, i.e. spreading the range from 0% to 100%, with Green at the base and Red at the top. Waht I have obtained, instead, is that the gradient always appears 'compressed' from 0 to current value of the bar. In order to clarify my issue, see 3 images attached, each containing a UltraProgressBar at the left and a UltraGauge at the right, with values at 10%, 50% and 100% of available range. ProgressBar uses a background image for the bar.
The goal is to get an appearance for UltraGauge similar to the one from ProgressBar.
Any hint/suggestion would be appreciated. Thank you.
Thanks Max and Hristo,
the suggested solution does the job. At least until you don't need to use the Response object: in a quick test I just did, it seems that Response is triggered on a Value_change base.
I thing that having a 'Background image' for Bar marker appearance could be a valid feature for your Gauge control.
Thank you, and have a nice day
Hello ,
I was following Max’s suggestion to create a sample for you. Please run the sample and let me know if this is what you are looking for.
Thank you for using Infragistics Components.
The gradient brush, or any other brush, will always scale to the size of the UI element, so what you're trying to do isn't directly supported, but can be done if you take slightly different approach.For a vertical bar marker spanning from bottom to top, you can do the following:1. Set the bar marker value to the maximum allowed (typically the max value of the scale), so that the gradient is layed out and scaled to represent 100%2. Set the RelativeClipBoundsMeasure of the bar marker's BrushElement to Percent.3. Instead of changing the value of the marker, change the Y-value of marker's BrushElement.RelativeClipBounds. Setting Y to 100% will hide the marker and is visually equivalent to a zero value. 0% will be visually equivalent to the marker's max value. (Note, that you will have to assign the RelativeClipBounds property each time you want to change the Y value)