From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to know the undo zoom/pan count

Whenever user performs zoom, pan or axis range changes on WPF graph, the actions are remembered by graph. Calling UndoZoomPan() will bring graph display to previous state. Is there a way to know the undo count, so undo zoom context menu item (user code) can be enabled or disabled accordingly?

0 Kudos
Message 1 of 3
(2,272 Views)

Unfortunately, there is no member that reflects the current number of undo items saved by the graph. I have created a task to expose the current undo count as a read-only property.

 

You could get a rough approximation of available undo operations by monitoring axis change events, but this will have limited accuracy, due to the way those events are processed by the graph (for example, the graph combines a continuous mouse drag, composed of many small pans, into a single "undo pan" item).

~ Paul H
0 Kudos
Message 2 of 3
(2,238 Views)

Just wanted to let you know that the InteractionHistoryCurrentCount property was added to the graph controls in Measurement Studio 2019.

~ Paul H
0 Kudos
Message 3 of 3
(1,755 Views)