I used the example script ExpandableClassPropertyBrushesExample to create a collection of input properties that starts out as collapsed. Thus the user can expand that category if needed to access them. So far so good.
One of the properties in there is a BarsPeriod.
Normally, changing the BarsPeriodType dropdown would instantly change the configuration of the BarsPeriod property appropriately (e.g. changing name, adding or subtracting necessary inputs (e.g. from Minute to UniRenko and back). Inside the ExpandableObjectConverter, this doesn't happen. Changing it does nothing, and the Apply button does not become available. Only when changing some other parameter will the Apply button become available and can be clicked, at which point the BarsPeriod property finally reconfigures itself.
Do you have any advice to sort this out?
Below is how the ExpandableObjectConverter is written.
Thanks!
saltminer
[TypeConverter(typeof(ExpandableObjectConverter))]
[RefreshProperties(RefreshProperties.All)]
public class TimeFrameCollection
{
[Display(Name="Enabled", Order=1)]
public bool TimeframeEnabled
{ get; set; }
//[NinjaScriptProperty]
[RefreshProperties(RefreshProperties.All)]
[Display(Name="BarsPeriod", Description="", Order=5, GroupName="TimeFrame B")]
public NinjaTrader.Data.BarsPeriod BarsPeriod
{ get; set; }
// .... and etc with other properties
}
[Display(Name = "TimeFrame B", Description = "", Order = 1000, GroupName = "TimeFrames")]
[RefreshProperties(RefreshProperties.All)]
[NinjaScriptProperty]
public NinjaTrader.NinjaScript.Indicators.ATRProjections. TimeFrameCollection TimeFrameB
{ get; set; }

Comment