Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

XYCursor.Plot property exposes strange behaviour

Set up a simple application with a WaveformGraph control and a property grid that shows the waveform graphs properties.
One can browse the cursor collection and add XYCursors.
At runtime, it is not possible to choose another plot using the Plot property of XYCursor.

Does anyone have an explanation or work around for this behaviour?

Thanks
Christian Marrocco


Christian
0 Kudos
Message 1 of 3
(3,493 Views)

Design-time support for Windows Forms controls depends on several designer services. Several of these services are listed in the System.ComponentModel.Design namespace. These services are available at design-time because they are implemented by the designer. Only a subset of these services are available at run-time, though, because the services that are only implemented by the designer are not available. If you're using the type editors at run-time via PropertyGrid, the editors only have access to services that are implemented by PropertyGrid.

The drop-down editor to select the plot for the XYCursor.Plot property depends on IReferenceService. It uses IReferenceService.GetReferences to find the plot references that can be set to the XYCursor.Plot property, and then it uses IReferenceService.GetName to get the name of the reference to display in the drop-down.

IReferenceService is a designer service interface that is implemented by the designer, but is not implemented by PropertyGrid. Therefore, editors that depend on IReferenceService, such as the editor for XYCursor.Plot, cannot support the same functionality at run-time as they do at design-time when they're accessed via PropertyGrid.

- Elton

0 Kudos
Message 2 of 3
(3,480 Views)
Thank you for the explanation.

Christian
Christian
0 Kudos
Message 3 of 3
(3,470 Views)