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

0
0

Hi,

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).

Version
5.2.1.11757
  • You must to post comments
0
0

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
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies