Pre loader

Binding to axes ranges broken when manually adjusting ranges on UI.

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums



We have the WPF 2D version.

We have bound the VisibleRange on both X and Y axes to our viewmodel.
A combo-box selection triggers the OnPropertyChanged which will assign a default range depending on the type of data we want to display.
We also have allowed for the user to drag the axes and adjust the ranges as desired.

This all works as we’d expect, until the user does a manual adjustment, then the binding to the combo-box seems to be broken (the default ranges we set for the given data no longer update the X and Y axes).

  • You must to post comments

Hi Geoffrey,

This is a common way of how WPF binding works. If you have setup a binding in XAML, then you set the property value in code, the binding will be overwritten by the property value.

The solution is — if you must set VisibleRange in code, to use TwoWay bindings, and to use the SetCurrentValue method as follows:

  axis.SetCurrentValue(AxisBase.VisibleRangeProperty, new DoubleRange()); // set your new VisibleRange

Best regards

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.