Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Force Refresh an Axis
posted

The label of my Y-axis is tied to a converter that sets the labels in either whole dollars, K dollars or M dollars. This functionality works initially but doesn’t refresh unless I resize the window or change the data being shown.

I’ve seen other people with similar problems on the forums (http://ko.infragistics.com/community/forums/t/75986.aspx comes to mind), but the button that allows you to switch between the different labels isn’t a property, so I can’t bind to it. In order to change the label, my converter casts the value given to my custom object, then calls that object’s ToString which handles the formatting.

I’m hoping there is just a simple way to get the axis to force refresh in code behind, even without a noticeable change. I’ve tried all the typical UpdateLayout, InvalidateVisual, InvalidateMeasure methods in hopes that those would work, but they weren’t successful either.

Thanks in advance and let me know if more detail is needed.

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    Hello Gary,

     

    Thank you for  your post. I have been looking into your question and what I can suggest is using the MinimumValue or MaximumValue of the NumericYAxis to fore the refresh. You can set the MinimumValue for example to some value (0 for example) and then set it to the value that you wish, if you are setting those properties or set to double.NaN, if the range of the axis is automatically generated. I have modified the sample from the thread that you have referred to show how you can use this approach.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    AxisDataTemplateAndFormatBinding_ForceUpdate.zip
Children