10-06-2017 07:23 AM - edited 10-06-2017 07:24 AM
Hi all,
I have a problem regarding the labels of some graphs within a tab control:
I use the EngineeringValuePresenter from here and the hint on the <RangeLabeledDivisions/> from here to avoid the error relating to the frozen poperty. Thanks btw for the two topics, the EngineeringValuePresenter solves a lot of problems at once!
I have a set of graphs each set within one TabItem of a TabControl with each graph's DataSources set to an ObservableCollection<Point[]>.
When my displayed data change during runtime, the axis (numeric) labels of the graphs within the active TabItem are updated correctly, but the axis labels of the graphs within the inactive TabItem stay as they were before - only the display, because when I click on the max/min-values of the axis, the right values are there. I attached a screenshot of this behaviour for better understanding:
Only if I change e.g. the max-Value of the axis by adding another decimal place, the axis is updated correctly.
Did I miss to set any properties or is there another way to force each graph's axis to also update, when the according DataSource is changed?
Any hint would be appreciated, thank you.
Solved! Go to Solution.
10-06-2017 01:23 PM
It looks like your problem is due to the same underlying issue as the “incorrect x axis” question, where the scales do not get updated when the graph is in an inactive tab and unloaded. To workaround the issue, you can use this Loaded
event handler to manually refresh the scales whenever a tab is activated:
private void OnGraphLoaded( object sender, RoutedEventArgs e ) { var graph = (LayeredGraph)sender; foreach( IScale scale in graph.AllScales ) scale.OnInvalidated( new PropertyChangedEventArgs( "Tab Loaded" ) ); }
10-09-2017 06:16 AM
Thanks Paul, this works as it should!
07-09-2019
10:48 AM
- last edited on
11-20-2024
08:15 AM
by
Content Cleaner
Just wanted to let you know this issue was fixed in the Measurement Studio 2019 release.