Hello,
I'm embedding an UltraProgressBar into my Win grid and am having a problem with the OnValueChanged method. I want to use this invocation to set the color differently depending upon the Value.
For instances of UltraProgressBar that appear at the GroupBy or Summary levels this seems to work fine. However, for instances that are embedded into the grid itself in a given row, the OnValueChanged method and the ValueChanged events never get called or fired. This despite the fact that the Value that I see displayed by the UltraProgressBar itself does change.
Any ideas on what might be happening?
Thanks,Brandon
I've figured out why the Summary and GroupBy instances are working properly...elsewhere in the code, I update the Value property directly in a call that looks like this:
void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if (parent is SummaryValueUIElement) { //Update it here } }
If you remove the above call - the ValueChanged event never fires at all for the ProgressBar so it seems like the Grid doesn't call Value on the ProgressBar which is set as its Editor?
I'm not sure I understand what you are doing. If you are using an editor control in a grid cell, then a single control provides an editor for useby the grid and the editor services multiple rows or even columns in the grid. So you can't really use the events on the editor control, The editor control has only one value, so the events would be useless, since there would be no way to provide information about which cell or which value you are dealing with.
If you want different colors to be used for different values of the progress bar, then the thing to do is use the PercentSettings on the control. This allows you to specify different appearances for different ranges of values and you don't have to handle any events or write any code.
Yup, I don't know how I missed that - thanks.