Is it possible to create properties based on the selection from the available list of values?
For example, I have a step that lists options such as “Option A”, “Option B”. When the user selects an option such as Option A, the plugin would get a list of sub-categories (Param1, Param2, Param3) that must be displayed as individual fields (Display Name and a text box to enter a value) under "Test Step Settings ".
@priram a simple way to do is this if the other values are known is with the EnabledIf attribute. This allows you to show additional options based on a previous selection:
[Display("Radio Standard", Group: "DUT Setup", Order: 1)]
public RadioStandard Standard { get; set; }
// This setting is only enabled when Standard == LTE || Standard == WCDMA.
[Display("Measurement Bandwidth", Group: "DUT Setup", Order: 2.1)]
[EnabledIf("Standard", RadioStandard.Lte, RadioStandard.Wcdma)]
public double Bandwidth { get; set; }
As @david-wsd said, the topic he linked goes into other options for truly dynamic properties and more advanced controls.
@priram Yes, you’ll need to add reference to Keysight.OpenTap.Wpf. For me, it’s located here:
C:\Program Files\Keysight\Test Automation\Packages\WPF Controls\Keysight.OpenTap.Wpf.dll
Then add this using statement: using Keysight.OpenTap.Wpf;