07-24-2016 05:06 AM
Hey,
In my project I want to hide / show the Y axis, It works usually.
But when BaselineStrokeThickness is 0 and TickVisibility of the MinorDivisons is collapsed, I am able to hide the Y axis but can not re-present it.
I attach a project, for example.
07-25-2016 10:19 AM
I was able to reproduce the problem, and have file a task to correct this in the next release.
As a workaround, you can trigger a manual referesh of the scale. For example, adding the following changes to your example corrected the problem:
public partial class MainWindow : Window {
public MainWindow( ) {
InitializeComponent( );
ShowYAxis.Checked += OnShowYAxisChecked;
}
private void OnShowYAxisChecked( object sender, RoutedEventArgs e ) {
Dispatcher.BeginInvoke( new Action( delegate {
NationalInstruments.Controls.Primitives.IScale scale = YAxis;
scale.OnInvalidated( EventArgs.Empty );
} ) );
}
}
(I used a BeginInvoke
call, because the binding updates after the Checked event occurs. Depending on how you are setting visibility in your application, there may be a more appropriate place to put the workaround logic.)
07-08-2019 04:36 PM
Just wanted to let you know this issue was fixed in the Measurement Studio 2019 release.